Merge branch 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, 32-bit: Align percpu area and irq stacks to THREAD_SIZE
x86: Move alloc_desk_mask variables inside ifdef
x86-32: Align IRQ stacks properly
x86: Remove CONFIG_4KSTACKS
x86: Always use irq stacks

Fixed up trivial conflicts in include/linux/{irq.h, percpu-defs.h}

+25 -40
+3 -3
Documentation/x86/x86_64/kernel-stacks
··· 18 18 Used for external hardware interrupts. If this is the first external 19 19 hardware interrupt (i.e. not a nested hardware interrupt) then the 20 20 kernel switches from the current task to the interrupt stack. Like 21 - the split thread and interrupt stacks on i386 (with CONFIG_4KSTACKS), 22 - this gives more room for kernel interrupt processing without having 23 - to increase the size of every per thread stack. 21 + the split thread and interrupt stacks on i386, this gives more room 22 + for kernel interrupt processing without having to increase the size 23 + of every per thread stack. 24 24 25 25 The interrupt stack is also used when processing a softirq. 26 26
-10
arch/x86/Kconfig.debug
··· 125 125 and the software setup of this feature. 126 126 If in doubt, say "N" 127 127 128 - config 4KSTACKS 129 - bool "Use 4Kb for kernel stacks instead of 8Kb" 130 - depends on X86_32 131 - ---help--- 132 - If you say Y here the kernel will use a 4Kb stacksize for the 133 - kernel stack attached to each process/thread. This facilitates 134 - running more threads on a system and also reduces the pressure 135 - on the VM subsystem for higher order allocations. This option 136 - will also use IRQ stacks to compensate for the reduced stackspace. 137 - 138 128 config DOUBLEFAULT 139 129 default y 140 130 bool "Enable doublefault exception handler" if EMBEDDED
+5 -7
arch/x86/include/asm/irq.h
··· 19 19 # define ARCH_HAS_NMI_WATCHDOG 20 20 #endif 21 21 22 - #ifdef CONFIG_4KSTACKS 23 - extern void irq_ctx_init(int cpu); 24 - extern void irq_ctx_exit(int cpu); 25 - # define __ARCH_HAS_DO_SOFTIRQ 22 + #ifdef CONFIG_X86_32 23 + extern void irq_ctx_init(int cpu); 24 + extern void irq_ctx_exit(int cpu); 26 25 #else 27 26 # define irq_ctx_init(cpu) do { } while (0) 28 27 # define irq_ctx_exit(cpu) do { } while (0) 29 - # ifdef CONFIG_X86_64 30 - # define __ARCH_HAS_DO_SOFTIRQ 31 - # endif 32 28 #endif 29 + 30 + #define __ARCH_HAS_DO_SOFTIRQ 33 31 34 32 #ifdef CONFIG_HOTPLUG_CPU 35 33 #include <linux/cpumask.h>
+1 -6
arch/x86/include/asm/module.h
··· 60 60 #endif 61 61 62 62 #ifdef CONFIG_X86_32 63 - # ifdef CONFIG_4KSTACKS 64 - # define MODULE_STACKSIZE "4KSTACKS " 65 - # else 66 - # define MODULE_STACKSIZE "" 67 - # endif 68 - # define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE 63 + # define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY 69 64 #endif 70 65 71 66 #endif /* _ASM_X86_MODULE_H */
-4
arch/x86/include/asm/page_32_types.h
··· 15 15 */ 16 16 #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) 17 17 18 - #ifdef CONFIG_4KSTACKS 19 - #define THREAD_ORDER 0 20 - #else 21 18 #define THREAD_ORDER 1 22 - #endif 23 19 #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) 24 20 25 21 #define STACKFAULT_STACK 0
+3 -9
arch/x86/kernel/irq_32.c
··· 49 49 static inline void print_stack_overflow(void) { } 50 50 #endif 51 51 52 - #ifdef CONFIG_4KSTACKS 53 52 /* 54 53 * per-CPU IRQ handling contexts (thread information and stack) 55 54 */ 56 55 union irq_ctx { 57 56 struct thread_info tinfo; 58 57 u32 stack[THREAD_SIZE/sizeof(u32)]; 59 - } __attribute__((aligned(PAGE_SIZE))); 58 + } __attribute__((aligned(THREAD_SIZE))); 60 59 61 60 static DEFINE_PER_CPU(union irq_ctx *, hardirq_ctx); 62 61 static DEFINE_PER_CPU(union irq_ctx *, softirq_ctx); 63 62 64 - static DEFINE_PER_CPU_PAGE_ALIGNED(union irq_ctx, hardirq_stack); 65 - static DEFINE_PER_CPU_PAGE_ALIGNED(union irq_ctx, softirq_stack); 63 + static DEFINE_PER_CPU_MULTIPAGE_ALIGNED(union irq_ctx, hardirq_stack, THREAD_SIZE); 64 + static DEFINE_PER_CPU_MULTIPAGE_ALIGNED(union irq_ctx, softirq_stack, THREAD_SIZE); 66 65 67 66 static void call_on_stack(void *func, void *stack) 68 67 { ··· 185 186 186 187 local_irq_restore(flags); 187 188 } 188 - 189 - #else 190 - static inline int 191 - execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) { return 0; } 192 - #endif 193 189 194 190 bool handle_irq(unsigned irq, struct pt_regs *regs) 195 191 {
+1 -1
arch/x86/kernel/vmlinux.lds.S
··· 301 301 } 302 302 303 303 #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) 304 - PERCPU(PAGE_SIZE) 304 + PERCPU(THREAD_SIZE) 305 305 #endif 306 306 307 307 . = ALIGN(PAGE_SIZE);
+12
include/linux/percpu-defs.h
··· 148 148 DEFINE_PER_CPU_SECTION(type, name, "..readmostly") 149 149 150 150 /* 151 + * Declaration/definition used for large per-CPU variables that must be 152 + * aligned to something larger than the pagesize. 153 + */ 154 + #define DECLARE_PER_CPU_MULTIPAGE_ALIGNED(type, name, size) \ 155 + DECLARE_PER_CPU_SECTION(type, name, "..page_aligned") \ 156 + __aligned(size) 157 + 158 + #define DEFINE_PER_CPU_MULTIPAGE_ALIGNED(type, name, size) \ 159 + DEFINE_PER_CPU_SECTION(type, name, "..page_aligned") \ 160 + __aligned(size) 161 + 162 + /* 151 163 * Intermodule exports for per-CPU variables. sparse forgets about 152 164 * address space across EXPORT_SYMBOL(), change EXPORT_SYMBOL() to 153 165 * noop if __CHECKER__.