--- zzzz-none-000/linux-2.6.32.60/kernel/sched.c 2012-10-07 21:41:24.000000000 +0000 +++ ur8-7270-606/linux-2.6.32.60/kernel/sched.c 2013-10-07 12:57:12.000000000 +0000 @@ -2616,7 +2616,7 @@ * It may be assumed that this function implies a write memory barrier before * changing the task state if and only if any tasks are woken up. */ -int wake_up_process(struct task_struct *p) +inline int wake_up_process(struct task_struct *p) { return try_to_wake_up(p, TASK_ALL, 0); } @@ -5596,6 +5596,8 @@ { struct pt_regs *regs = get_irq_regs(); + console_verbose(); + restore_printk(); printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", prev->comm, prev->pid, preempt_count()); @@ -5608,6 +5610,13 @@ show_regs(regs); else dump_stack(); + +#ifdef CONFIG_SMP + /*--- get information about all cpus ! ---*/ + BUG(); +#else + panic("BUG: scheduling while atomic: %s/%d/0x%08x\n", prev->comm, prev->pid, preempt_count()); +#endif } /* @@ -6362,6 +6371,7 @@ return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur || capable(CAP_SYS_NICE)); } +EXPORT_SYMBOL_GPL(can_nice); #ifdef __ARCH_WANT_SYS_NICE @@ -6413,7 +6423,7 @@ * RT tasks are offset by -200. Normal tasks are centered * around 0, value goes from -16 to +15. */ -int task_prio(const struct task_struct *p) +inline int task_prio(const struct task_struct *p) { return p->prio - MAX_RT_PRIO; } @@ -6422,7 +6432,7 @@ * task_nice - return the nice value of a given task. * @p: the task in question. */ -int task_nice(const struct task_struct *p) +inline int task_nice(const struct task_struct *p) { return TASK_NICE(p); } @@ -9656,7 +9666,7 @@ void __init sched_init(void) { int i, j; - unsigned long alloc_size = 0, ptr; + unsigned long alloc_size = 0, ptr __maybe_unused__; #ifdef CONFIG_FAIR_GROUP_SCHED alloc_size += 2 * nr_cpu_ids * sizeof(void **); @@ -9869,9 +9879,9 @@ "BUG: sleeping function called from invalid context at %s:%d\n", file, line); printk(KERN_ERR - "in_atomic(): %d, irqs_disabled(): %d, pid: %d, name: %s\n", + "in_atomic(): %d, irqs_disabled(): %d, pid: %d, name: %s preempt_count=%d\n", in_atomic(), irqs_disabled(), - current->pid, current->comm); + current->pid, current->comm, preempt_count()); debug_show_held_locks(current); if (irqs_disabled()) @@ -9943,9 +9953,8 @@ #endif /* CONFIG_MAGIC_SYSRQ */ -#ifdef CONFIG_IA64 +#if defined(CONFIG_IA64) || defined(CONFIG_MIPS) /* - * These functions are only useful for the IA64 MCA handling. * * They can only be called when the whole system has been * stopped - every CPU needs to be quiescent, and no scheduling @@ -9964,7 +9973,9 @@ { return cpu_curr(cpu); } +#endif/*--- #if defined(CONFIG_IA64) || defined(CONFIG_MIPS) ---*/ +#ifdef CONFIG_IA64 /** * set_curr_task - set the current task for a given cpu. * @cpu: the processor in question.