blob: aee3a1088a5a5995f0ff9ee322f8b55a2bd151ed [file] [log] [blame]
Magnus Damm1c51ed42010-12-14 16:56:55 +09001/*
2 * SMP support for R-Mobile / SH-Mobile
3 *
4 * Copyright (C) 2010 Magnus Damm
5 *
6 * Based on realview, Copyright (C) 2002 ARM Ltd, All Rights Reserved
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#include <linux/kernel.h>
13#include <linux/errno.h>
14#include <linux/smp.h>
Magnus Damm8b306792011-12-28 16:47:16 +090015#include <mach/common.h>
Magnus Damm1c51ed42010-12-14 16:56:55 +090016
17int platform_cpu_kill(unsigned int cpu)
18{
Magnus Damm8b306792011-12-28 16:47:16 +090019 return shmobile_platform_cpu_kill(cpu);
Magnus Damm1c51ed42010-12-14 16:56:55 +090020}
21
22void platform_cpu_die(unsigned int cpu)
23{
24 while (1) {
25 /*
26 * here's the WFI
27 */
28 asm(".word 0xe320f003\n"
29 :
30 :
31 : "memory", "cc");
32 }
33}
34
35int platform_cpu_disable(unsigned int cpu)
36{
37 /*
38 * we don't allow CPU 0 to be shutdown (it is still too special
39 * e.g. clock tick interrupts)
40 */
41 return cpu == 0 ? -EPERM : 0;
42}