--- linux-2.6.9/arch/i386/kernel/apic.c.orig 2005-08-04 08:11:13.000000000 -0400 +++ linux-2.6.9/arch/i386/kernel/apic.c 2005-08-04 08:27:04.000000000 -0400 @@ -1125,8 +1125,10 @@ asmlinkage void smp_local_timer_interrup void smp_apic_timer_interrupt(struct pt_regs regs) { +#ifdef CONFIG_4KSTACKS union irq_ctx *curctx; union irq_ctx *irqctx; +#endif int cpu; u32 *isp; @@ -1147,11 +1149,11 @@ void smp_apic_timer_interrupt(struct pt_ * interrupt lock, which is the WrongThing (tm) to do. */ irq_enter(); + +#ifdef CONFIG_4KSTACKS curctx = (union irq_ctx *) current_thread_info(); irqctx = hardirq_ctx[cpu]; - if (curctx == irqctx) { - smp_local_timer_interrupt(®s); - } else { + if (curctx != irqctx) { /* build the stack frame on the IRQ stack */ isp = (u32*) ((char*)irqctx + sizeof(*irqctx)); irqctx->tinfo.task = curctx->tinfo.task; @@ -1167,7 +1169,10 @@ void smp_apic_timer_interrupt(struct pt_ : : "b"(isp) : "memory", "cc", "edx", "ecx" ); - } + } else +#endif + smp_local_timer_interrupt(®s); + irq_exit(); } --- linux-2.6.9/include/asm-i386/crashdump.h.orig 2005-08-04 08:11:22.000000000 -0400 +++ linux-2.6.9/include/asm-i386/crashdump.h 2005-08-04 08:27:04.000000000 -0400 @@ -48,12 +48,14 @@ extern unsigned long next_ram_page (unsi static inline void platform_init_stack(void **stackptr) { +#ifdef CONFIG_4KSTACKS *stackptr = (void *)kmalloc(sizeof(union irq_ctx), GFP_KERNEL); if (*stackptr) memset(*stackptr, 0, sizeof(union irq_ctx)); else printk(KERN_WARNING "crashdump: unable to allocate separate stack\n"); +#endif } typedef asmlinkage void (*crashdump_func_t)(struct pt_regs *, void *); @@ -62,6 +64,7 @@ static inline void platform_start_crashd crashdump_func_t dumpfunc, struct pt_regs *regs) { +#ifdef CONFIG_4KSTACKS u32 *dsp; union irq_ctx * curctx; union irq_ctx * dumpctx; @@ -90,6 +93,10 @@ static inline void platform_start_crashd : "memory", "cc", "edx", "ecx" ); } +#else + dumpfunc(regs, NULL); +#endif + } #define platform_cleanup_stack(stackptr) \