Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1ba9a5b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Benjamin Herrenschmidt
Browse files

powerpc: Unconditionally enabled irq stacks



Irq stacks provide an essential protection from stack overflows through
external interrupts, at the cost of two additionals stacks per CPU.

Enable them unconditionally to simplify the kernel build and prevent
people from accidentally disabling them.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent b636f137
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -135,13 +135,6 @@ config DEBUGGER
	depends on KGDB || XMON
	default y

config IRQSTACKS
	bool "Use separate kernel stacks when processing interrupts"
	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 VIRQ_DEBUG
	bool "Expose hardware/virtual IRQ mapping via debugfs"
	depends on DEBUG_FS
+0 −6
Original line number Diff line number Diff line
@@ -358,7 +358,6 @@ extern void exc_lvl_ctx_init(void);
#define exc_lvl_ctx_init()
#endif

#ifdef CONFIG_IRQSTACKS
/*
 * Per-cpu stacks for handling hard and soft interrupts.
 */
@@ -369,11 +368,6 @@ extern void irq_ctx_init(void);
extern void call_do_softirq(struct thread_info *tp);
extern int call_handle_irq(int irq, void *p1,
			   struct thread_info *tp, void *func);
#else
#define irq_ctx_init()

#endif /* CONFIG_IRQSTACKS */

extern void do_IRQ(struct pt_regs *regs);

#endif /* _ASM_IRQ_H */
+0 −12
Original line number Diff line number Diff line
@@ -317,7 +317,6 @@ void fixup_irqs(const struct cpumask *map)
}
#endif

#ifdef CONFIG_IRQSTACKS
static inline void handle_one_irq(unsigned int irq)
{
	struct thread_info *curtp, *irqtp;
@@ -358,12 +357,6 @@ static inline void handle_one_irq(unsigned int irq)
	if (irqtp->flags)
		set_bits(irqtp->flags, &curtp->flags);
}
#else
static inline void handle_one_irq(unsigned int irq)
{
	generic_handle_irq(irq);
}
#endif

static inline void check_stack_overflow(void)
{
@@ -455,7 +448,6 @@ void exc_lvl_ctx_init(void)
}
#endif

#ifdef CONFIG_IRQSTACKS
struct thread_info *softirq_ctx[NR_CPUS] __read_mostly;
struct thread_info *hardirq_ctx[NR_CPUS] __read_mostly;

@@ -492,10 +484,6 @@ static inline void do_softirq_onstack(void)
	irqtp->task = NULL;
}

#else
#define do_softirq_onstack()	__do_softirq()
#endif /* CONFIG_IRQSTACKS */

void do_softirq(void)
{
	unsigned long flags;
+0 −2
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@

	.text

#ifdef CONFIG_IRQSTACKS
_GLOBAL(call_do_softirq)
	mflr	r0
	stw	r0,4(r1)
@@ -56,7 +55,6 @@ _GLOBAL(call_handle_irq)
	lwz	r0,4(r1)
	mtlr	r0
	blr
#endif /* CONFIG_IRQSTACKS */

/*
 * This returns the high 64 bits of the product of two 64-bit numbers.
+0 −2
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@

	.text

#ifdef CONFIG_IRQSTACKS
_GLOBAL(call_do_softirq)
	mflr	r0
	std	r0,16(r1)
@@ -52,7 +51,6 @@ _GLOBAL(call_handle_irq)
	ld	r0,16(r1)
	mtlr	r0
	blr
#endif /* CONFIG_IRQSTACKS */

	.section	".toc","aw"
PPC64_CACHES:
Loading