2 * Cloned from linux/arch/arm/mach-realview/hotplug.c
4 * Copyright (C) 2002 ARM Ltd.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/errno.h>
14 #include <linux/smp.h>
17 #include <asm/cacheflush.h>
19 #include <asm/smp_plat.h>
24 static inline void cpu_leave_lowpower(void)
29 "mrc p15, 0, %0, c1, c0, 0\n"
31 " mcr p15, 0, %0, c1, c0, 0\n"
32 " mrc p15, 0, %0, c1, c0, 1\n"
34 " mcr p15, 0, %0, c1, c0, 1\n"
36 : "Ir" (CR_C
), "Ir" (0x40)
40 static inline void platform_do_lowpower(unsigned int cpu
, int *spurious
)
44 /* make cpu1 to be turned off at next WFI command */
46 exynos_cpu_power_down(cpu
);
50 if (pen_release
== cpu_logical_map(cpu
)) {
52 * OK, proper wakeup, we're done
58 * Getting here, means that we have come out of WFI without
59 * having been woken up - this shouldn't happen
61 * Just note it happening - when we're woken, we can report
69 * platform-specific code to shutdown a CPU
71 * Called with IRQs disabled
73 void __ref
exynos_cpu_die(unsigned int cpu
)
77 v7_exit_coherency_flush(louis
);
79 platform_do_lowpower(cpu
, &spurious
);
82 * bring this CPU back into the world of cache
83 * coherency, and then restore interrupts
88 pr_warn("CPU%u: %u spurious wakeup calls\n", cpu
, spurious
);
This page took 0.034935 seconds and 5 git commands to generate.