diff options
-rw-r--r-- | arch/sh/Kconfig.debug | 8 | ||||
-rw-r--r-- | arch/sh/kernel/irq.c | 8 | ||||
-rw-r--r-- | include/asm-sh/irq.h | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index b507b501f0cf..ab2f9f3c354c 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
@@ -86,6 +86,14 @@ config 4KSTACKS | |||
86 | on the VM subsystem for higher order allocations. This option | 86 | on the VM subsystem for higher order allocations. This option |
87 | will also use IRQ stacks to compensate for the reduced stackspace. | 87 | will also use IRQ stacks to compensate for the reduced stackspace. |
88 | 88 | ||
89 | config IRQSTACKS | ||
90 | bool "Use separate kernel stacks when processing interrupts" | ||
91 | depends on DEBUG_KERNEL | ||
92 | help | ||
93 | If you say Y here the kernel will use separate kernel stacks | ||
94 | for handling hard and soft interrupts. This can help avoid | ||
95 | overflowing the process kernel stacks. | ||
96 | |||
89 | config SH_KGDB | 97 | config SH_KGDB |
90 | bool "Include KGDB kernel debugger" | 98 | bool "Include KGDB kernel debugger" |
91 | select FRAME_POINTER | 99 | select FRAME_POINTER |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 4b49d03ffbd2..348da194ec99 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -69,7 +69,7 @@ unlock: | |||
69 | } | 69 | } |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #ifdef CONFIG_4KSTACKS | 72 | #ifdef CONFIG_IRQSTACKS |
73 | /* | 73 | /* |
74 | * per-CPU IRQ handling contexts (thread information and stack) | 74 | * per-CPU IRQ handling contexts (thread information and stack) |
75 | */ | 75 | */ |
@@ -85,7 +85,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; | |||
85 | asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) | 85 | asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) |
86 | { | 86 | { |
87 | struct pt_regs *old_regs = set_irq_regs(regs); | 87 | struct pt_regs *old_regs = set_irq_regs(regs); |
88 | #ifdef CONFIG_4KSTACKS | 88 | #ifdef CONFIG_IRQSTACKS |
89 | union irq_ctx *curctx, *irqctx; | 89 | union irq_ctx *curctx, *irqctx; |
90 | #endif | 90 | #endif |
91 | 91 | ||
@@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
109 | 109 | ||
110 | irq = irq_demux(evt2irq(irq)); | 110 | irq = irq_demux(evt2irq(irq)); |
111 | 111 | ||
112 | #ifdef CONFIG_4KSTACKS | 112 | #ifdef CONFIG_IRQSTACKS |
113 | curctx = (union irq_ctx *)current_thread_info(); | 113 | curctx = (union irq_ctx *)current_thread_info(); |
114 | irqctx = hardirq_ctx[smp_processor_id()]; | 114 | irqctx = hardirq_ctx[smp_processor_id()]; |
115 | 115 | ||
@@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
157 | return 1; | 157 | return 1; |
158 | } | 158 | } |
159 | 159 | ||
160 | #ifdef CONFIG_4KSTACKS | 160 | #ifdef CONFIG_IRQSTACKS |
161 | static char softirq_stack[NR_CPUS * THREAD_SIZE] | 161 | static char softirq_stack[NR_CPUS * THREAD_SIZE] |
162 | __attribute__((__section__(".bss.page_aligned"))); | 162 | __attribute__((__section__(".bss.page_aligned"))); |
163 | 163 | ||
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index c61d902b8bff..11850f65c922 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq) | |||
41 | #define irq_canonicalize(irq) (irq) | 41 | #define irq_canonicalize(irq) (irq) |
42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) | 42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) |
43 | 43 | ||
44 | #ifdef CONFIG_4KSTACKS | 44 | #ifdef CONFIG_IRQSTACKS |
45 | extern void irq_ctx_init(int cpu); | 45 | extern void irq_ctx_init(int cpu); |
46 | extern void irq_ctx_exit(int cpu); | 46 | extern void irq_ctx_exit(int cpu); |
47 | # define __ARCH_HAS_DO_SOFTIRQ | 47 | # define __ARCH_HAS_DO_SOFTIRQ |