diff options
author | Peter Zijlstra (Intel) <peterz@infradead.org> | 2021-01-18 15:12:22 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-02-17 14:12:42 +0100 |
commit | 40607ee97e4eec5655cc0f76a720bdc4c63a6434 (patch) | |
tree | 7f6d888bf7f72306f4cdc986b3e2af6524f30270 /include/linux/entry-common.h | |
parent | 2c9a98d3bc808717ab63ad928a2b568967775388 (diff) | |
download | lwn-40607ee97e4eec5655cc0f76a720bdc4c63a6434.tar.gz lwn-40607ee97e4eec5655cc0f76a720bdc4c63a6434.zip |
preempt/dynamic: Provide irqentry_exit_cond_resched() static call
Provide static call to control IRQ preemption (called in CONFIG_PREEMPT)
so that we can override its behaviour when preempt= is overriden.
Since the default behaviour is full preemption, its call is
initialized to provide IRQ preemption when preempt= isn't passed.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20210118141223.123667-8-frederic@kernel.org
Diffstat (limited to 'include/linux/entry-common.h')
-rw-r--r-- | include/linux/entry-common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index a104b298019a..883acef895bc 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -2,6 +2,7 @@ #ifndef __LINUX_ENTRYCOMMON_H #define __LINUX_ENTRYCOMMON_H +#include <linux/static_call_types.h> #include <linux/tracehook.h> #include <linux/syscalls.h> #include <linux/seccomp.h> @@ -454,6 +455,9 @@ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs); * Conditional reschedule with additional sanity checks. */ void irqentry_exit_cond_resched(void); +#ifdef CONFIG_PREEMPT_DYNAMIC +DECLARE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched); +#endif /** * irqentry_exit - Handle return from exception that used irqentry_enter() |