diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-05-21 23:05:19 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-06-11 16:15:05 +0300 |
commit | fa95d7dc1abceb288db2959badb9aaf558eb0530 (patch) | |
tree | a3c6995357ea129d369fd8b3823b91d34d449f38 /arch/x86/include/asm/idtentry.h | |
parent | 9f9781b60dfa68d5094a41982f1efa75215a62b1 (diff) | |
download | linux-fa95d7dc1abceb288db2959badb9aaf558eb0530.tar.xz |
x86/idtentry: Switch to conditional RCU handling
Switch all idtentry_enter/exit() users over to the new conditional RCU
handling scheme and make the user mode entries in #DB, #INT3 and #MCE use
the user mode idtentry functions.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20200521202117.382387286@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/idtentry.h')
-rw-r--r-- | arch/x86/include/asm/idtentry.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h index b3aca728f2fb..0f974e52e13b 100644 --- a/arch/x86/include/asm/idtentry.h +++ b/arch/x86/include/asm/idtentry.h @@ -61,11 +61,12 @@ static __always_inline void __##func(struct pt_regs *regs); \ \ __visible noinstr void func(struct pt_regs *regs) \ { \ - idtentry_enter(regs); \ + bool rcu_exit = idtentry_enter_cond_rcu(regs); \ + \ instrumentation_begin(); \ __##func (regs); \ instrumentation_end(); \ - idtentry_exit(regs); \ + idtentry_exit_cond_rcu(regs, rcu_exit); \ } \ \ static __always_inline void __##func(struct pt_regs *regs) @@ -107,11 +108,12 @@ static __always_inline void __##func(struct pt_regs *regs, \ __visible noinstr void func(struct pt_regs *regs, \ unsigned long error_code) \ { \ - idtentry_enter(regs); \ + bool rcu_exit = idtentry_enter_cond_rcu(regs); \ + \ instrumentation_begin(); \ __##func (regs, error_code); \ instrumentation_end(); \ - idtentry_exit(regs); \ + idtentry_exit_cond_rcu(regs, rcu_exit); \ } \ \ static __always_inline void __##func(struct pt_regs *regs, \ |