linux/arch
Mark Rutland 26dc129342 irq: arm64: perform irqentry in entry code
In preparation for removing HANDLE_DOMAIN_IRQ_IRQENTRY, have arch/arm64
perform all the irqentry accounting in its entry code.

As arch/arm64 already performs portions of the irqentry logic in
enter_from_kernel_mode() and exit_to_kernel_mode(), including
rcu_irq_{enter,exit}(), the only additional calls that need to be made
are to irq_{enter,exit}_rcu(). Removing the calls to
rcu_irq_{enter,exit}() from handle_domain_irq() ensures that we inform
RCU once per IRQ entry and will correctly identify quiescent periods.

Since we should not call irq_{enter,exit}_rcu() when entering a
pseudo-NMI, el1_interrupt() is reworked to have separate __el1_irq() and
__el1_pnmi() paths for regular IRQ and psuedo-NMI entry, with
irq_{enter,exit}_irq() only called for the former.

In preparation for removing HANDLE_DOMAIN_IRQ, the irq regs are managed
in do_interrupt_handler() for both regular IRQ and pseudo-NMI. This is
currently redundant, but not harmful.

For clarity the preemption logic is moved into __el1_irq(). We should
never preempt within a pseudo-NMI, and arm64_enter_nmi() already
enforces this by incrementing the preempt_count, but it's clearer if we
never invoke the preemption logic when entering a pseudo-NMI.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Pingfan Liu <kernelfans@gmail.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will@kernel.org>
2021-10-26 10:12:53 +01:00
..
alpha alpha: enable GENERIC_PCI_IOMAP unconditionally 2021-09-19 10:37:00 -07:00
arc irq: arc: avoid CONFIG_HANDLE_DOMAIN_IRQ 2021-10-25 10:05:28 +01:00
arm irq: arm: perform irqentry in entry code 2021-10-25 10:05:31 +01:00
arm64 irq: arm64: perform irqentry in entry code 2021-10-26 10:12:53 +01:00
csky irq: add a (temporary) CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY 2021-10-25 10:05:30 +01:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
m68k m68k: Remove set_fs() 2021-09-24 13:35:07 +02:00
microblaze Microblaze patches for 5.15-rc1 2021-09-08 16:02:13 -07:00
mips irq: mips: simplify do_domain_IRQ() 2021-10-25 10:05:08 +01:00
nds32 irq: nds32: avoid CONFIG_HANDLE_DOMAIN_IRQ 2021-10-25 10:05:29 +01:00
nios2 NIOS2: setup.c: drop unused variable 'dram_start' 2021-09-27 08:34:54 -05:00
openrisc irq: add a (temporary) CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY 2021-10-25 10:05:30 +01:00
parisc parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled 2021-09-19 10:36:09 -07:00
powerpc entry: rseq: Call rseq_handle_notify_resume() in tracehook_notify_resume() 2021-09-22 10:24:01 -04:00
riscv irq: add a (temporary) CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY 2021-10-25 10:05:30 +01:00
s390 x86: 2021-09-27 13:58:23 -07:00
sh sh: pgtable-3level: fix cast to pointer from integer of different size 2021-09-24 16:13:35 -07:00
sparc sparc64: fix pci_iounmap() when CONFIG_PCI is not set 2021-09-20 10:56:32 -07:00
um This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
x86 kvm: fix objtool relocation warning 2021-10-03 13:34:19 -07:00
xtensa Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00