--- 25-akpm/arch/i386/Kconfig | 9 -------- 25-akpm/arch/i386/kernel/irq.c | 37 +++++++-------------------------- 25-akpm/include/asm-i386/irq.h | 4 --- 25-akpm/include/asm-i386/thread_info.h | 6 ----- 4 files changed, 9 insertions(+), 47 deletions(-) diff -puN arch/i386/Kconfig~make-4k-stacks-permanent arch/i386/Kconfig --- 25/arch/i386/Kconfig~make-4k-stacks-permanent 2004-05-01 16:32:17.662250776 -0700 +++ 25-akpm/arch/i386/Kconfig 2004-05-01 16:32:17.671249408 -0700 @@ -1476,15 +1476,6 @@ config FRAME_POINTER If you don't debug the kernel, you can say N, but we may not be able to solve problems without frame pointers. -config 4KSTACKS - bool "Use 4Kb for kernel stacks instead of 8Kb" - help - If you say Y here the kernel will use a 4Kb stacksize for the - kernel stack attached to each process/thread. This facilitates - running more threads on a system and also reduces the pressure - on the VM subsystem for higher order allocations. This option - will also use IRQ stacks to compensate for the reduced stackspace. - config SCHEDSTATS bool "Collect scheduler statistics" depends on PROC_FS diff -puN arch/i386/kernel/irq.c~make-4k-stacks-permanent arch/i386/kernel/irq.c --- 25/arch/i386/kernel/irq.c~make-4k-stacks-permanent 2004-05-01 16:32:17.664250472 -0700 +++ 25-akpm/arch/i386/kernel/irq.c 2004-05-01 16:32:17.672249256 -0700 @@ -76,10 +76,8 @@ static void register_irq_proc (unsigned /* * per-CPU IRQ handling stacks */ -#ifdef CONFIG_4KSTACKS union irq_ctx *hardirq_ctx[NR_CPUS]; union irq_ctx *softirq_ctx[NR_CPUS]; -#endif /* * Special irq handlers. @@ -487,8 +485,6 @@ asmlinkage unsigned int do_IRQ(struct pt * useful for irq hardware that does not mask cleanly in an * SMP environment. */ -#ifdef CONFIG_4KSTACKS - for (;;) { irqreturn_t action_ret; u32 *isp; @@ -501,9 +497,10 @@ asmlinkage unsigned int do_IRQ(struct pt spin_unlock(&desc->lock); /* - * this is where we switch to the IRQ stack. However, if we are already using - * the IRQ stack (because we interrupted a hardirq handler) we can't do that - * and just have to keep using the current stack (which is the irq stack already + * this is where we switch to the IRQ stack. However, if we are + * already using the IRQ stack (because we interrupted a + * hardirq handler) we can't do that and just have to keep + * using the current stack (which is the irq stack already * after all) */ @@ -540,23 +537,6 @@ asmlinkage unsigned int do_IRQ(struct pt desc->status &= ~IRQ_PENDING; } -#else - - for (;;) { - irqreturn_t action_ret; - - spin_unlock(&desc->lock); - - action_ret = handle_IRQ_event(irq, ®s, action); - - spin_lock(&desc->lock); - if (!noirqdebug) - note_interrupt(irq, desc, action_ret); - if (likely(!(desc->status & IRQ_PENDING))) - break; - desc->status &= ~IRQ_PENDING; - } -#endif desc->status &= ~IRQ_INPROGRESS; out: @@ -1117,9 +1097,10 @@ void init_irq_proc (void) } -#ifdef CONFIG_4KSTACKS -static char softirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE))); -static char hardirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE))); +static char softirq_stack[NR_CPUS * THREAD_SIZE] + __attribute__((__aligned__(THREAD_SIZE))); +static char hardirq_stack[NR_CPUS * THREAD_SIZE] + __attribute__((__aligned__(THREAD_SIZE))); /* * allocate per-cpu stacks for hardirq and for softirq processing @@ -1189,6 +1170,4 @@ asmlinkage void do_softirq(void) local_irq_restore(flags); } - EXPORT_SYMBOL(do_softirq); -#endif diff -puN include/asm-i386/irq.h~make-4k-stacks-permanent include/asm-i386/irq.h --- 25/include/asm-i386/irq.h~make-4k-stacks-permanent 2004-05-01 16:32:17.665250320 -0700 +++ 25-akpm/include/asm-i386/irq.h 2004-05-01 16:32:17.673249104 -0700 @@ -31,7 +31,6 @@ extern int can_request_irq(unsigned int, #define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ #endif -#ifdef CONFIG_4KSTACKS /* * per-CPU IRQ handling contexts (thread information and stack) */ @@ -46,9 +45,6 @@ extern union irq_ctx *softirq_ctx[NR_CPU extern void irq_ctx_init(int cpu); #define __ARCH_HAS_DO_SOFTIRQ -#else -#define irq_ctx_init(cpu) do { ; } while (0) -#endif struct irqaction; struct pt_regs; diff -puN include/asm-i386/thread_info.h~make-4k-stacks-permanent include/asm-i386/thread_info.h --- 25/include/asm-i386/thread_info.h~make-4k-stacks-permanent 2004-05-01 16:32:17.667250016 -0700 +++ 25-akpm/include/asm-i386/thread_info.h 2004-05-01 16:32:17.673249104 -0700 @@ -60,13 +60,9 @@ struct thread_info { #endif #define PREEMPT_ACTIVE 0x4000000 -#ifdef CONFIG_4KSTACKS #define THREAD_SIZE (4096) -#else -#define THREAD_SIZE (8192) -#endif - #define STACK_WARN (THREAD_SIZE/8) + /* * macros/functions for gaining access to the thread information structure * _