diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-07-13 08:52:52 +0300 |
---|---|---|
committer | Minda Chen <minda.chen@starfivetech.com> | 2023-11-06 14:24:51 +0300 |
commit | 20f1d8077305b005d68af0e6145fbdf9b2437703 (patch) | |
tree | b41d3fe876645711d94b2119c7031a3c3a3f3482 | |
parent | b824ffe7d30adf721b7ff53b67bf2f90f17164a1 (diff) | |
download | linux-20f1d8077305b005d68af0e6145fbdf9b2437703.tar.xz |
entry: Fix the preempt lazy fallout
Common code needs common defines....
Fixes: f2f9e496208c ("x86: Support for lazy preemption")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | include/linux/entry-common.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index c95724ae6ff7..75dc786e6365 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -150,8 +150,6 @@ struct thread_info { #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW) -#define _TIF_NEED_RESCHED_MASK (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY) - #define STACK_WARN (THREAD_SIZE/8) /* diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h index 572fac3dd288..71064a2c2caf 100644 --- a/include/linux/entry-common.h +++ b/include/linux/entry-common.h @@ -57,6 +57,12 @@ # define ARCH_EXIT_TO_USER_MODE_WORK (0) #endif +#ifdef CONFIG_PREEMPT_LAZY +# define _TIF_NEED_RESCHED_MASK (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY) +#else +# define _TIF_NEED_RESCHED_MASK (_TIF_NEED_RESCHED) +#endif + #define EXIT_TO_USER_MODE_WORK \ (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE | \ _TIF_NEED_RESCHED_MASK | _TIF_PATCH_PENDING | _TIF_NOTIFY_SIGNAL | \ |