diff options
Diffstat (limited to 'arch/h8300/kernel/process.c')
-rw-r--r-- | arch/h8300/kernel/process.c | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index b609f63f1590..1a744ab7e7e5 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -53,40 +53,13 @@ asmlinkage void ret_from_kernel_thread(void); | |||
53 | * The idle loop on an H8/300.. | 53 | * The idle loop on an H8/300.. |
54 | */ | 54 | */ |
55 | #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) | 55 | #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) |
56 | static void default_idle(void) | 56 | void arch_cpu_idle(void) |
57 | { | 57 | { |
58 | local_irq_disable(); | 58 | local_irq_enable(); |
59 | if (!need_resched()) { | 59 | /* XXX: race here! What if need_resched() gets set now? */ |
60 | local_irq_enable(); | 60 | __asm__("sleep"); |
61 | /* XXX: race here! What if need_resched() gets set now? */ | ||
62 | __asm__("sleep"); | ||
63 | } else | ||
64 | local_irq_enable(); | ||
65 | } | ||
66 | #else | ||
67 | static void default_idle(void) | ||
68 | { | ||
69 | cpu_relax(); | ||
70 | } | 61 | } |
71 | #endif | 62 | #endif |
72 | void (*idle)(void) = default_idle; | ||
73 | |||
74 | /* | ||
75 | * The idle thread. There's no useful work to be | ||
76 | * done, so just try to conserve power and have a | ||
77 | * low exit latency (ie sit in a loop waiting for | ||
78 | * somebody to say that they'd like to reschedule) | ||
79 | */ | ||
80 | void cpu_idle(void) | ||
81 | { | ||
82 | while (1) { | ||
83 | rcu_idle_enter(); | ||
84 | while (!need_resched()) | ||
85 | idle(); | ||
86 | rcu_idle_exit(); | ||
87 | schedule_preempt_disabled(); | ||
88 | } | ||
89 | } | ||
90 | 63 | ||
91 | void machine_restart(char * __unused) | 64 | void machine_restart(char * __unused) |
92 | { | 65 | { |
@@ -110,6 +83,8 @@ void machine_power_off(void) | |||
110 | 83 | ||
111 | void show_regs(struct pt_regs * regs) | 84 | void show_regs(struct pt_regs * regs) |
112 | { | 85 | { |
86 | show_regs_print_info(KERN_DEFAULT); | ||
87 | |||
113 | printk("\nPC: %08lx Status: %02x", | 88 | printk("\nPC: %08lx Status: %02x", |
114 | regs->pc, regs->ccr); | 89 | regs->pc, regs->ccr); |
115 | printk("\nORIG_ER0: %08lx ER0: %08lx ER1: %08lx", | 90 | printk("\nORIG_ER0: %08lx ER0: %08lx ER1: %08lx", |