diff options
author | Christoph Hellwig <hch@lst.de> | 2010-06-28 08:15:54 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-06-29 06:12:59 -0400 |
commit | 7974891db234467eaf1fec613ec0129cb4ac2332 (patch) | |
tree | 09de403e54e39f4f25a1c15a29f5b201d4c11729 /arch/x86/include/asm/irq.h | |
parent | 5904b3b81d25166e5e39b9727645bb47937618e3 (diff) |
x86: Always use irq stacks
IRQ stacks provide much better safety against unexpected stack use from
interrupts, at the minimal downside of slightly higher memory usage.
Enable irq stacks also for the default 8k stack on 32-bit kernels to
minimize the problem of stack overflows through interrupt activity.
This is what the 64-bit kernel and various other architectures already do.
Signed-off-by: Christoph Hellwig <hch@lst.de>
LKML-Reference: <20100628121554.GA6605@lst.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm/irq.h')
-rw-r--r-- | arch/x86/include/asm/irq.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h index 5458380b6ef8..0bf5b0083650 100644 --- a/arch/x86/include/asm/irq.h +++ b/arch/x86/include/asm/irq.h | |||
@@ -19,18 +19,16 @@ static inline int irq_canonicalize(int irq) | |||
19 | # define ARCH_HAS_NMI_WATCHDOG | 19 | # define ARCH_HAS_NMI_WATCHDOG |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #ifdef CONFIG_4KSTACKS | 22 | #ifdef CONFIG_X86_32 |
23 | extern void irq_ctx_init(int cpu); | 23 | extern void irq_ctx_init(int cpu); |
24 | extern void irq_ctx_exit(int cpu); | 24 | extern void irq_ctx_exit(int cpu); |
25 | # define __ARCH_HAS_DO_SOFTIRQ | ||
26 | #else | 25 | #else |
27 | # define irq_ctx_init(cpu) do { } while (0) | 26 | # define irq_ctx_init(cpu) do { } while (0) |
28 | # define irq_ctx_exit(cpu) do { } while (0) | 27 | # define irq_ctx_exit(cpu) do { } while (0) |
29 | # ifdef CONFIG_X86_64 | ||
30 | # define __ARCH_HAS_DO_SOFTIRQ | ||
31 | # endif | ||
32 | #endif | 28 | #endif |
33 | 29 | ||
30 | #define __ARCH_HAS_DO_SOFTIRQ | ||
31 | |||
34 | #ifdef CONFIG_HOTPLUG_CPU | 32 | #ifdef CONFIG_HOTPLUG_CPU |
35 | #include <linux/cpumask.h> | 33 | #include <linux/cpumask.h> |
36 | extern void fixup_irqs(void); | 34 | extern void fixup_irqs(void); |