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

Commit 1006fae3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull IRQ changes from Ingo Molnar:
 "The biggest change this cycle are the softirq/hardirq stack
  interaction and nesting fixes, cleanups and reorganizations from
  Frederic.  This is the longer followup story to the softirq nesting
  fix that is already upstream (commit ded79754: "irq: Force hardirq
  exit's softirq processing on its own stack")"

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro
  powerpc: Tell about irq stack coverage
  x86: Tell about irq stack coverage
  irq: Optimize softirq stack selection in irq exit
  irq: Justify the various softirq stack choices
  irq: Improve a bit softirq debugging
  irq: Optimize call to softirq on hardirq exit
  irq: Consolidate do_softirq() arch overriden implementations
  x86/irq: Correct comment about i8259 initialization
parents 70fdcb83 5702941e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -390,6 +390,16 @@ config HAVE_UNDERSCORE_SYMBOL_PREFIX
	  Some architectures generate an _ in front of C symbols; things like
	  module loading and assembly files need to know about this.

config HAVE_IRQ_EXIT_ON_IRQ_STACK
	bool
	help
	  Architecture doesn't only execute the irq handler on the irq stack
	  but also irq_exit(). This way we can process softirqs on this irq
	  stack instead of switching to a new one when we call __do_softirq()
	  in the end of an hardirq.
	  This spares a stack switch and improves cache usage on softirq
	  processing.

#
# ABI hall of shame
#
+2 −3
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@

#include <linux/delay.h>
#include <linux/init.h>
#include <linux/irqchip/bcm2835.h>
#include <linux/irqchip.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/clk/bcm2835.h>
@@ -130,8 +130,7 @@ static const char * const bcm2835_compat[] = {

DT_MACHINE_START(BCM2835, "BCM2835")
	.map_io = bcm2835_map_io,
	.init_irq = bcm2835_init_irq,
	.handle_irq = bcm2835_handle_irq,
	.init_irq = irqchip_init,
	.init_machine = bcm2835_init,
	.restart = bcm2835_restart,
	.dt_compat = bcm2835_compat
+19 −33
Original line number Diff line number Diff line
@@ -159,19 +159,12 @@ void irq_ctx_exit(int cpu)

extern asmlinkage void __do_softirq(void);

asmlinkage void do_softirq(void)
void do_softirq_own_stack(void)
{
	unsigned long flags;
	struct thread_info *curctx;
	union irq_ctx *irqctx;
	u32 *isp;

	if (in_interrupt())
		return;

	local_irq_save(flags);

	if (local_softirq_pending()) {
	curctx = current_thread_info();
	irqctx = softirq_ctx[smp_processor_id()];
	irqctx->tinfo.task = curctx->task;
@@ -190,13 +183,6 @@ asmlinkage void do_softirq(void)
		  "D1Ar5", "D0Ar6", "D0Re0", "D1Re0", "D0.4", "D1RtP",
		  "D0.5"
		);
		/*
		 * Shouldn't happen, we returned above if in_interrupt():
		 */
		WARN_ON_ONCE(softirq_count());
	}

	local_irq_restore(flags);
}
#endif

+2 −15
Original line number Diff line number Diff line
@@ -495,22 +495,9 @@ static void execute_on_irq_stack(void *func, unsigned long param1)
	*irq_stack_in_use = 1;
}

asmlinkage void do_softirq(void)
void do_softirq_own_stack(void)
{
	__u32 pending;
	unsigned long flags;

	if (in_interrupt())
		return;

	local_irq_save(flags);

	pending = local_softirq_pending();

	if (pending)
	execute_on_irq_stack(__do_softirq, 0);

	local_irq_restore(flags);
}
#endif /* CONFIG_IRQSTACKS */

+1 −0
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ config PPC
	select OLD_SIGSUSPEND
	select OLD_SIGACTION if PPC32
	select HAVE_DEBUG_STACKOVERFLOW
	select HAVE_IRQ_EXIT_ON_IRQ_STACK

config EARLY_PRINTK
	bool
Loading