X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fh8300%2Fkernel%2Fprocess.c;h=d7c058d64030ecbd21a14f8882412fc313d92fdb;hb=2c66a62d2d9e2315e6e748b96643f7f141c4d017;hp=afe7417c02c85b57e66fcf38afe69a906b5a36f2;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index afe7417c0..d7c058d64 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c @@ -55,9 +55,9 @@ void default_idle(void) { while(1) { if (need_resched()) { - sti(); + local_irq_enable(); __asm__("sleep"); - cli(); + local_irq_disable(); } schedule(); } @@ -112,14 +112,13 @@ EXPORT_SYMBOL(machine_power_off); void show_regs(struct pt_regs * regs) { - printk("\n"); - printk("PC: %08lx Status: %02x\n", + printk("\nPC: %08lx Status: %02x", regs->pc, regs->ccr); - printk("ORIG_ER0: %08lx ER0: %08lx ER1: %08lx\n", + printk("\nORIG_ER0: %08lx ER0: %08lx ER1: %08lx", regs->orig_er0, regs->er0, regs->er1); - printk("ER2: %08lx ER3: %08lx ER4: %08lx ER5: %08lx\n", + printk("\nER2: %08lx ER3: %08lx ER4: %08lx ER5: %08lx", regs->er2, regs->er3, regs->er4, regs->er5); - printk("ER6' %08lx ",regs->er6); + printk("\nER6' %08lx ",regs->er6); if (user_mode(regs)) printk("USP: %08lx\n", rdusp()); else @@ -261,12 +260,6 @@ out: return error; } -/* - * These bracket the sleeping functions.. - */ -#define first_sched ((unsigned long) scheduling_functions_start_here) -#define last_sched ((unsigned long) scheduling_functions_end_here) - unsigned long thread_saved_pc(struct task_struct *tsk) { return ((struct pt_regs *)tsk->thread.esp0)->pc; @@ -287,7 +280,7 @@ unsigned long get_wchan(struct task_struct *p) fp >= 8184+stack_page) return 0; pc = ((unsigned long *)fp)[1]; - if (pc < first_sched || pc >= last_sched) + if (!in_sched_functions(pc)) return pc; fp = *(unsigned long *) fp; } while (count++ < 16);