Commit:     110ed28246a0063a5984d7f72ba5c97f154a51cf
Parent:     0e670685e4925930000a678c74eb1cbf23b415fa
Author:     Paul Mundt <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 2 12:16:51 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Fri Nov 2 12:16:51 2007 +0900

    sh: Decouple 4k and soft/hardirq stacks.
    While using separate IRQ stacks can cut down on stack consumption,
    many users can also use 4k stacks directly without the additional
    need of separate stacks for soft and hardirqs.
    With this split, we support the same rationale for 4KSTACKS as
    m68knommu, with the IRQSTACKS abstraction as per ppc64.
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
 arch/sh/Kconfig.debug |    8 ++++++++
 arch/sh/kernel/irq.c  |    8 ++++----
 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 b507b50..ab2f9f3 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -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.
+       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
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 4b49d03..348da19 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -69,7 +69,7 @@ unlock:
  * per-CPU IRQ handling contexts (thread information and stack)
@@ -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);
        union irq_ctx *curctx, *irqctx;
@@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs 
        irq = irq_demux(evt2irq(irq));
        curctx = (union irq_ctx *)current_thread_info();
        irqctx = hardirq_ctx[smp_processor_id()];
@@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs 
        return 1;
 static char softirq_stack[NR_CPUS * THREAD_SIZE]
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index c61d902..11850f6 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)
 #define irq_canonicalize(irq)  (irq)
 #define irq_demux(irq)         sh_mv.mv_irq_demux(irq)
 extern void irq_ctx_init(int cpu);
 extern void irq_ctx_exit(int cpu);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to