Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73082
b: refs/heads/master
c: 110ed28
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Nov 2, 2007
1 parent cc68ddf commit a3fdfb7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e670685e4925930000a678c74eb1cbf23b415fa
refs/heads/master: 110ed28246a0063a5984d7f72ba5c97f154a51cf
8 changes: 8 additions & 0 deletions trunk/arch/sh/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ config 4KSTACKS
on the VM subsystem for higher order allocations. This option
will also use IRQ stacks to compensate for the reduced stackspace.

config IRQSTACKS
bool "Use separate kernel stacks when processing interrupts"
depends on DEBUG_KERNEL
help
If you say Y here the kernel will use separate kernel stacks
for handling hard and soft interrupts. This can help avoid
overflowing the process kernel stacks.

config SH_KGDB
bool "Include KGDB kernel debugger"
select FRAME_POINTER
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/sh/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
}
#endif

#ifdef CONFIG_4KSTACKS
#ifdef CONFIG_IRQSTACKS
/*
* per-CPU IRQ handling contexts (thread information and stack)
*/
Expand All @@ -85,7 +85,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
#ifdef CONFIG_4KSTACKS
#ifdef CONFIG_IRQSTACKS
union irq_ctx *curctx, *irqctx;
#endif

Expand All @@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)

irq = irq_demux(evt2irq(irq));

#ifdef CONFIG_4KSTACKS
#ifdef CONFIG_IRQSTACKS
curctx = (union irq_ctx *)current_thread_info();
irqctx = hardirq_ctx[smp_processor_id()];

Expand Down Expand Up @@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
return 1;
}

#ifdef CONFIG_4KSTACKS
#ifdef CONFIG_IRQSTACKS
static char softirq_stack[NR_CPUS * THREAD_SIZE]
__attribute__((__section__(".bss.page_aligned")));

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-sh/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq)
#define irq_canonicalize(irq) (irq)
#define irq_demux(irq) sh_mv.mv_irq_demux(irq)

#ifdef CONFIG_4KSTACKS
#ifdef CONFIG_IRQSTACKS
extern void irq_ctx_init(int cpu);
extern void irq_ctx_exit(int cpu);
# define __ARCH_HAS_DO_SOFTIRQ
Expand Down

0 comments on commit a3fdfb7

Please sign in to comment.