There are 2 buglets in the code:
* the kernel stack size is THREAD_SIZE (ie 8192), your patch assumes
that the stack size is 4096.
* your CPU enumeration (for_all_cpus) is wrong: the cpu number
(smp_processor_id()) are set by the motherboard, and they are not
guaranteed to be contiguous:
> +#define for_all_cpus(i) for((i)=0;(i)<smp_num_cpus;(i)++)
you must use "cpu_logical_map()", eg get_irq_list() in
linux/arch/i386/kernel/irq.c does that.
>
> + if (smp_call_function(getstack, sps, 1, 1) < 0)
> + printk("smp_call_function failed\n");
> + else {
I should really fix smp_call_function(): have you checked the actual
implementation:
it uses a semaphore, ie panic() waits for a semaphore before stopping
the kernel...
-
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/