Re: [PATCH] cpu hotplug fix

From: Andrew Morton
Date: Sat Mar 20 2004 - 18:14:31 EST


Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
>
> Name: Remove Strange start_cpu_timer Code
> Status: Untested
>
> Why is start_cpu_timer checking for fn being NULL? And why isn't
> every CPU's reap_timer initialized in cpucache_init (which is an
> __init function).
>
> Clean up this mess by just starting the timer in start_cpu_timer.

oy.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xc0128e32 in add_timer_on (timer=0xc120d880, cpu=1) at kernel/timer.c:225
225 BUG_ON(timer_pending(timer) || !timer->function);
(gdb) bt
#0 0xc0128e32 in add_timer_on (timer=0xc120d880, cpu=1) at kernel/timer.c:225
#1 0xc01446b5 in cpuup_callback (nfb=0xc0472800, action=4, hcpu=0x1) at mm/slab.c:595
#2 0xc012dc67 in notifier_call_chain (n=0x4, val=2, v=0x1) at kernel/sys.c:169
#3 0xc0134b63 in cpu_up (cpu=1) at kernel/cpu.c:192
#4 0xc05e0650 in smp_init () at init/main.c:364
#5 0xc0103161 in init (unused=0x0) at init/main.c:626
#6 0xc010728d in kernel_thread_helper () at arch/i386/kernel/process.c:246
(gdb) p timer->function
$1 = (void (*)(long unsigned int)) 0


I'll simply mark start_cpu_timer() as __devinit.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/