diff options
| author | Olof Johansson <olof@lixom.net> | 2012-10-04 20:17:25 -0700 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2012-10-04 20:17:25 -0700 |
| commit | 54d69df5849ec2e660aa12ac75562618c10fb499 (patch) | |
| tree | adbfb8bcc7cc73b83bf2b784fa331911ba03573a /arch/arm/mach-shmobile/hotplug.c | |
| parent | ad932bb6b549722a561fb31ac2fa50dcbcb3e36b (diff) | |
| parent | 46f2007c1efadfa4071c17e75f140c47f09293de (diff) | |
| download | olio-linux-3.10-54d69df5849ec2e660aa12ac75562618c10fb499.tar.xz olio-linux-3.10-54d69df5849ec2e660aa12ac75562618c10fb499.zip | |
Merge branch 'late/kirkwood' into late/soc
Merge in the late Kirkwood branch with the OMAP late branch for upstream
submission.
Final contents described in shared tag.
Fixup remove/change conflicts in arch/arm/mach-omap2/devices.c and
drivers/spi/spi-omap2-mcspi.c.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-shmobile/hotplug.c')
| -rw-r--r-- | arch/arm/mach-shmobile/hotplug.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c index 828d22f3af5..b09a0bdbf81 100644 --- a/arch/arm/mach-shmobile/hotplug.c +++ b/arch/arm/mach-shmobile/hotplug.c @@ -14,30 +14,16 @@ #include <linux/smp.h> #include <linux/cpumask.h> #include <linux/delay.h> +#include <linux/of.h> #include <mach/common.h> +#include <mach/r8a7779.h> +#include <mach/emev2.h> #include <asm/cacheflush.h> +#include <asm/mach-types.h> static cpumask_t dead_cpus; -int platform_cpu_kill(unsigned int cpu) -{ - int k; - - /* this function is running on another CPU than the offline target, - * here we need wait for shutdown code in platform_cpu_die() to - * finish before asking SoC-specific code to power off the CPU core. - */ - for (k = 0; k < 1000; k++) { - if (cpumask_test_cpu(cpu, &dead_cpus)) - return shmobile_platform_cpu_kill(cpu); - - mdelay(1); - } - - return 0; -} - -void platform_cpu_die(unsigned int cpu) +void shmobile_cpu_die(unsigned int cpu) { /* hardware shutdown code running on the CPU that is being offlined */ flush_cache_all(); @@ -60,7 +46,7 @@ void platform_cpu_die(unsigned int cpu) } } -int platform_cpu_disable(unsigned int cpu) +int shmobile_cpu_disable(unsigned int cpu) { cpumask_clear_cpu(cpu, &dead_cpus); /* @@ -69,3 +55,8 @@ int platform_cpu_disable(unsigned int cpu) */ return cpu == 0 ? -EPERM : 0; } + +int shmobile_cpu_is_dead(unsigned int cpu) +{ + return cpumask_test_cpu(cpu, &dead_cpus); +} |