Commit 29c395c7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 irq entry updates from Thomas Gleixner:
 "The irq stack switching was moved out of the ASM entry code in course
  of the entry code consolidation. It ended up being suboptimal in
  various ways.

  This reworks the X86 irq stack handling:

   - Make the stack switching inline so the stackpointer manipulation is
     not longer at an easy to find place.

   - Get rid of the unnecessary indirect call.

   - Avoid the double stack switching in interrupt return and reuse the
     interrupt stack for softirq handling.

   - A objtool fix for CONFIG_FRAME_POINTER=y builds where it got
     confused about the stack pointer manipulation"

* tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Fix stack-swizzle for FRAME_POINTER=y
  um: Enforce the usage of asm-generic/softirq_stack.h
  x86/softirq/64: Inline do_softirq_own_stack()
  softirq: Move do_softirq_own_stack() to generic asm header
  softirq: Move __ARCH_HAS_DO_SOFTIRQ to Kconfig
  x86: Select CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK
  x86/softirq: Remove indirection in do_softirq_own_stack()
  x86/entry: Use run_sysvec_on_irqstack_cond() for XEN upcall
  x86/entry: Convert device interrupts to inline stack switching
  x86/entry: Convert system vectors to irq stack macro
  x86/irq: Provide macro for inlining irq stack switching
  x86/apic: Split out spurious handling code
  x86/irq/64: Adjust the per CPU irq stack pointer by 8
  x86/irq: Sanitize irq stack tracking
  x86/entry: Fix instrumentation annotation
parents 4c48faba 724c8a23
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -821,6 +821,12 @@ config HAVE_IRQ_EXIT_ON_IRQ_STACK
	  This spares a stack switch and improves cache usage on softirq
	  processing.

config HAVE_SOFTIRQ_ON_OWN_STACK
	bool
	help
	  Architecture provides a function to run __do_softirq() on a
	  seperate stack.

config PGTABLE_LEVELS
	int
	default 2
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ config PARISC
	select HAVE_FTRACE_MCOUNT_RECORD if HAVE_DYNAMIC_FTRACE
	select HAVE_KPROBES_ON_FTRACE
	select HAVE_DYNAMIC_FTRACE_WITH_REGS
	select HAVE_SOFTIRQ_ON_OWN_STACK if IRQSTACKS
	select SET_FS

	help
+0 −4
Original line number Diff line number Diff line
@@ -12,10 +12,6 @@
#include <linux/threads.h>
#include <linux/irq.h>

#ifdef CONFIG_IRQSTACKS
#define __ARCH_HAS_DO_SOFTIRQ
#endif

typedef struct {
	unsigned int __softirq_pending;
	unsigned int kernel_stack_usage;
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/types.h>
#include <asm/io.h>

#include <asm/softirq_stack.h>
#include <asm/smp.h>
#include <asm/ldcw.h>

+1 −0
Original line number Diff line number Diff line
@@ -235,6 +235,7 @@ config PPC
	select MMU_GATHER_PAGE_SIZE
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RELIABLE_STACKTRACE		if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
	select HAVE_SOFTIRQ_ON_OWN_STACK
	select HAVE_SYSCALL_TRACEPOINTS
	select HAVE_VIRT_CPU_ACCOUNTING
	select HAVE_IRQ_TIME_ACCOUNTING
Loading