entry: Split generic entry into generic exception and syscall entry
Subsystems (2)
PATCH 1/1 entry: Split generic entry into generic exception and syscall entry
From: Jinjie Ruan <[email protected]>
Currently CONFIG_GENERIC_ENTRY enables both the generic exception entry logic and the generic syscall entry logic, which are otherwise loosely coupled.
Introduce separate config options for these so that architectures can select the two independently. This will make it easier for architectures to migrate to generic entry code.
---
This was split off from Jinjie's series for ARM64 generic entry and rebased.
It is needed to split both the ARM64 and ARM32 generic entry patches in two parts.
--- MAINTAINERS | 1 + arch/Kconfig | 9 + include/linux/entry-common.h | 382 +------------------------------------- include/linux/irq-entry-common.h | 389 +++++++++++++++++++++++++++++++++++++++ kernel/entry/Makefile | 3 +- kernel/entry/common.c | 113 +----------- kernel/entry/syscall-common.c | 112 +++++++++++ kernel/sched/core.c | 8 +- 8 files changed, 519 insertions(+), 498 deletions(-)
MAINTAINERS +1 -0
@@ -10052,6 +10052,7 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry F: include/linux/entry-common.h F: include/linux/entry-kvm.h +F: include/linux/irq-entry-common.h F: kernel/entry/ GENERIC GPIO I2C DRIVER
arch/Kconfig +9 -0
@@ -64,8 +64,17 @@ config HOTPLUG_PARALLEL bool select HOTPLUG_SPLIT_STARTUP +config GENERIC_IRQ_ENTRY + bool + +config GENERIC_SYSCALL + bool + depends on GENERIC_IRQ_ENTRY + config GENERIC_ENTRY bool + select GENERIC_IRQ_ENTRY + select GENERIC_SYSCALL config KPROBES bool "Kprobes"
include/linux/entry-common.h +1 -381
413 lines not on this page · raw message
include/linux/irq-entry-common.h new file +389 -0
389 lines not on this page · raw message
kernel/entry/Makefile +2 -1
@@ -12,5 +12,6 @@ ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING CFLAGS_REMOVE_common.o = -fstack-protector -fstack-protector-strong CFLAGS_common.o += -fno-stack-protector -obj-$(CONFIG_GENERIC_ENTRY) += common.o syscall_user_dispatch.o +obj-$(CONFIG_GENERIC_IRQ_ENTRY) += common.o +obj-$(CONFIG_GENERIC_SYSCALL) += syscall-common.o syscall_user_dispatch.o obj-$(CONFIG_KVM_XFER_TO_GUEST_WORK) += kvm.o
kernel/entry/common.c +1 -112
131 lines not on this page · raw message
kernel/entry/syscall-common.c new file +112 -0
112 lines not on this page · raw message
kernel/sched/core.c +4 -4
@@ -69,8 +69,8 @@#include <linux/livepatch_sched.h> #ifdef CONFIG_PREEMPT_DYNAMIC -# ifdef CONFIG_GENERIC_ENTRY -# include <linux/entry-common.h> +# ifdef CONFIG_GENERIC_IRQ_ENTRY +# include <linux/irq-entry-common.h> # endif #endif
@@ -7427,8 +7427,8 @@ EXPORT_SYMBOL(__cond_resched_rwlock_write);#ifdef CONFIG_PREEMPT_DYNAMIC -#ifdef CONFIG_GENERIC_ENTRY -#include <linux/entry-common.h> +#ifdef CONFIG_GENERIC_IRQ_ENTRY +#include <linux/irq-entry-common.h> #endif /*
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250624-generic-entry-split-b744494637b1
Best regards,
Signature · 1 line
Linus Walleij <[email protected]>
Quoted 10 lines · Linus Walleij
From: Jinjie Ruan <[email protected]>
Currently
CONFIG_GENERIC_ENTRYenables both the generic exception entry logic and the generic syscall entry logic, which are otherwise loosely coupled.Introduce separate config options for these so that architectures can select the two independently. This will make it easier for architectures to migrate to generic entry code.
Quoted 6 lines
Suggested-by Mark Rutland <[email protected]>Signed-off-by Jinjie Ruan <[email protected]>Acked-by Linus Walleij <[email protected]>[Linus Walleij: rebase onto v6.16-rc1]Signed-off-by Linus Walleij <[email protected]>
I merged this into tip based of v6.16-rc1 and tagged it so the commit can be pulled into arm[64] trees if needed.
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git entry-split-for-arm
Thanks,
tglx
Quoted 18 lines · Thomas Gleixner
Quoted 10 lines · Linus Walleij
From: Jinjie Ruan <[email protected]>
Currently
CONFIG_GENERIC_ENTRYenables both the generic exception entry logic and the generic syscall entry logic, which are otherwise loosely coupled.Introduce separate config options for these so that architectures can select the two independently. This will make it easier for architectures to migrate to generic entry code.
Quoted 6 lines
Suggested-by Mark Rutland <[email protected]>Signed-off-by Jinjie Ruan <[email protected]>Acked-by Linus Walleij <[email protected]>[Linus Walleij: rebase onto v6.16-rc1]Signed-off-by Linus Walleij <[email protected]>
Quoted 4 lines
I merged this into tip based of v6.16-rc1 and tagged it so the commit can be pulled into arm[64] trees if needed.
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitentry-split-for-arm
Thanks, much appreciated!
Mark.
The following commit has been merged into the core/entry branch of tip:
The following commit has been merged into the core/entry branch of tip:
Commit-ID: a70e9f647f501e36a6a092888b1ea7386b7c5664 Gitweb: https://git.kernel.org/tip/a70e9f647f501e36a6a092888b1ea7386b7c5664 Author: Jinjie Ruan <[email protected]> AuthorDate: Tue, 24 Jun 2025 20:35:56 +02:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Mon, 30 Jun 2025 19:52:55 +02:00
entry: Split generic entry into generic exception and syscall entry
Currently CONFIG_GENERIC_ENTRY enables both the generic exception entry logic and the generic syscall entry logic, which are otherwise loosely coupled.
Introduce separate config options for these so that architectures can select the two independently. This will make it easier for architectures to migrate to generic entry code.
[Linus Walleij: rebase onto v6.16-rc1]
--- MAINTAINERS | 1 +- arch/Kconfig | 9 +- include/linux/entry-common.h | 382 +----------------------------- include/linux/irq-entry-common.h | 389 ++++++++++++++++++++++++++++++- kernel/entry/Makefile | 3 +- kernel/entry/common.c | 113 +--------- kernel/entry/syscall-common.c | 112 +++++++++- kernel/sched/core.c | 8 +- 8 files changed, 519 insertions(+), 498 deletions(-) create mode 100644 include/linux/irq-entry-common.h create mode 100644 kernel/entry/syscall-common.c
MAINTAINERS +1 -0
@@ -10052,6 +10052,7 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry F: include/linux/entry-common.h F: include/linux/entry-kvm.h +F: include/linux/irq-entry-common.h F: kernel/entry/ GENERIC GPIO I2C DRIVER
arch/Kconfig +9 -0
@@ -64,8 +64,17 @@ config HOTPLUG_PARALLEL bool select HOTPLUG_SPLIT_STARTUP +config GENERIC_IRQ_ENTRY + bool + +config GENERIC_SYSCALL + bool + depends on GENERIC_IRQ_ENTRY + config GENERIC_ENTRY bool + select GENERIC_IRQ_ENTRY + select GENERIC_SYSCALL config KPROBES bool "Kprobes"
include/linux/entry-common.h +1 -381
413 lines not on this page · raw message
include/linux/irq-entry-common.h new file +389 -0
389 lines not on this page · raw message
kernel/entry/Makefile +2 -1
@@ -12,5 +12,6 @@ ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING CFLAGS_REMOVE_common.o = -fstack-protector -fstack-protector-strong CFLAGS_common.o += -fno-stack-protector -obj-$(CONFIG_GENERIC_ENTRY) += common.o syscall_user_dispatch.o +obj-$(CONFIG_GENERIC_IRQ_ENTRY) += common.o +obj-$(CONFIG_GENERIC_SYSCALL) += syscall-common.o syscall_user_dispatch.o obj-$(CONFIG_KVM_XFER_TO_GUEST_WORK) += kvm.o
kernel/entry/common.c +1 -112
131 lines not on this page · raw message
kernel/entry/syscall-common.c new file +112 -0
112 lines not on this page · raw message
kernel/sched/core.c +4 -4
@@ -69,8 +69,8 @@#include <linux/livepatch_sched.h> #ifdef CONFIG_PREEMPT_DYNAMIC -# ifdef CONFIG_GENERIC_ENTRY -# include <linux/entry-common.h> +# ifdef CONFIG_GENERIC_IRQ_ENTRY +# include <linux/irq-entry-common.h> # endif #endif
@@ -7427,8 +7427,8 @@ EXPORT_SYMBOL(__cond_resched_rwlock_write);#ifdef CONFIG_PREEMPT_DYNAMIC -#ifdef CONFIG_GENERIC_ENTRY -#include <linux/entry-common.h> +#ifdef CONFIG_GENERIC_IRQ_ENTRY +#include <linux/irq-entry-common.h> #endif /*