diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:49:41 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:24 -0400 |
commit | 25d67f860f3a29d216f8206092a284cacbc6127e (patch) | |
tree | a1990f28ad875669431a3d856a671e00a702f56c /arch/blackfin | |
parent | 01426478df3a8791ff5c8b6b82d409e699cfaf38 (diff) |
bfin: Use generic idle loop
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Link: http://lkml.kernel.org/r/20130321215234.014923303@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/Kconfig | 1 | ||||
-rw-r--r-- | arch/blackfin/kernel/process.c | 32 | ||||
-rw-r--r-- | arch/blackfin/mach-common/smp.c | 2 |
3 files changed, 8 insertions, 27 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index c3f2e0bc644a..3d769a7c4941 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -41,6 +41,7 @@ config BLACKFIN | |||
41 | select USE_GENERIC_SMP_HELPERS if SMP | 41 | select USE_GENERIC_SMP_HELPERS if SMP |
42 | select HAVE_NMI_WATCHDOG if NMI_WATCHDOG | 42 | select HAVE_NMI_WATCHDOG if NMI_WATCHDOG |
43 | select GENERIC_SMP_IDLE_THREAD | 43 | select GENERIC_SMP_IDLE_THREAD |
44 | select GENERIC_IDLE_LOOP | ||
44 | select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS | 45 | select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS |
45 | select HAVE_MOD_ARCH_SPECIFIC | 46 | select HAVE_MOD_ARCH_SPECIFIC |
46 | select MODULES_USE_ELF_RELA | 47 | select MODULES_USE_ELF_RELA |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 9782c0329c14..f34323a90541 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -46,15 +46,14 @@ EXPORT_SYMBOL(pm_power_off); | |||
46 | * The idle loop on BFIN | 46 | * The idle loop on BFIN |
47 | */ | 47 | */ |
48 | #ifdef CONFIG_IDLE_L1 | 48 | #ifdef CONFIG_IDLE_L1 |
49 | static void default_idle(void)__attribute__((l1_text)); | 49 | void arch_cpu_idle(void)__attribute__((l1_text)); |
50 | void cpu_idle(void)__attribute__((l1_text)); | ||
51 | #endif | 50 | #endif |
52 | 51 | ||
53 | /* | 52 | /* |
54 | * This is our default idle handler. We need to disable | 53 | * This is our default idle handler. We need to disable |
55 | * interrupts here to ensure we don't miss a wakeup call. | 54 | * interrupts here to ensure we don't miss a wakeup call. |
56 | */ | 55 | */ |
57 | static void default_idle(void) | 56 | void arch_cpu_idle(void) |
58 | { | 57 | { |
59 | #ifdef CONFIG_IPIPE | 58 | #ifdef CONFIG_IPIPE |
60 | ipipe_suspend_domain(); | 59 | ipipe_suspend_domain(); |
@@ -66,31 +65,12 @@ static void default_idle(void) | |||
66 | hard_local_irq_enable(); | 65 | hard_local_irq_enable(); |
67 | } | 66 | } |
68 | 67 | ||
69 | /* | 68 | #ufdef CONFIG_HOTPLUG_CPU |
70 | * The idle thread. We try to conserve power, while trying to keep | 69 | void arch_cpu_idle_dead(void) |
71 | * overall latency low. The architecture specific idle is passed | ||
72 | * a value to indicate the level of "idleness" of the system. | ||
73 | */ | ||
74 | void cpu_idle(void) | ||
75 | { | 70 | { |
76 | /* endless idle loop with no priority at all */ | 71 | cpu_die(); |
77 | while (1) { | ||
78 | |||
79 | #ifdef CONFIG_HOTPLUG_CPU | ||
80 | if (cpu_is_offline(smp_processor_id())) | ||
81 | cpu_die(); | ||
82 | #endif | ||
83 | tick_nohz_idle_enter(); | ||
84 | rcu_idle_enter(); | ||
85 | while (!need_resched()) | ||
86 | default_idle(); | ||
87 | rcu_idle_exit(); | ||
88 | tick_nohz_idle_exit(); | ||
89 | preempt_enable_no_resched(); | ||
90 | schedule(); | ||
91 | preempt_disable(); | ||
92 | } | ||
93 | } | 72 | } |
73 | #endif | ||
94 | 74 | ||
95 | /* | 75 | /* |
96 | * Do necessary setup to start up a newly executed thread. | 76 | * Do necessary setup to start up a newly executed thread. |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index bb61ae4986e4..1bc2ce6f3c94 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -335,7 +335,7 @@ void __cpuinit secondary_start_kernel(void) | |||
335 | */ | 335 | */ |
336 | calibrate_delay(); | 336 | calibrate_delay(); |
337 | 337 | ||
338 | cpu_idle(); | 338 | cpu_startup_entry(CPUHP_ONLINE); |
339 | } | 339 | } |
340 | 340 | ||
341 | void __init smp_prepare_boot_cpu(void) | 341 | void __init smp_prepare_boot_cpu(void) |