From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 08:20:59 +0000 Subject: [PATCH] kernel_5.10 no rt --- kernel/arch/x86/include/asm/preempt.h | 36 +----------------------------------- 1 files changed, 1 insertions(+), 35 deletions(-) diff --git a/kernel/arch/x86/include/asm/preempt.h b/kernel/arch/x86/include/asm/preempt.h index afe37a8..a334dd0 100644 --- a/kernel/arch/x86/include/asm/preempt.h +++ b/kernel/arch/x86/include/asm/preempt.h @@ -89,24 +89,9 @@ * a decrement which hits zero means we have no preempt_count and should * reschedule. */ -static __always_inline bool ____preempt_count_dec_and_test(void) -{ - return GEN_UNARY_RMWcc("decl", __preempt_count, e, __percpu_arg([var])); -} - static __always_inline bool __preempt_count_dec_and_test(void) { - if (____preempt_count_dec_and_test()) - return true; -#ifdef CONFIG_PREEMPT_LAZY - if (preempt_count()) - return false; - if (current_thread_info()->preempt_lazy_count) - return false; - return test_thread_flag(TIF_NEED_RESCHED_LAZY); -#else - return false; -#endif + return GEN_UNARY_RMWcc("decl", __preempt_count, e, __percpu_arg([var])); } /* @@ -114,29 +99,10 @@ */ static __always_inline bool should_resched(int preempt_offset) { -#ifdef CONFIG_PREEMPT_LAZY - u32 tmp; - tmp = raw_cpu_read_4(__preempt_count); - if (tmp == preempt_offset) - return true; - - /* preempt count == 0 ? */ - tmp &= ~PREEMPT_NEED_RESCHED; - if (tmp != preempt_offset) - return false; - /* XXX PREEMPT_LOCK_OFFSET */ - if (current_thread_info()->preempt_lazy_count) - return false; - return test_thread_flag(TIF_NEED_RESCHED_LAZY); -#else return unlikely(raw_cpu_read_4(__preempt_count) == preempt_offset); -#endif } #ifdef CONFIG_PREEMPTION -#ifdef CONFIG_PREEMPT_RT - extern void preempt_schedule_lock(void); -#endif extern asmlinkage void preempt_schedule_thunk(void); # define __preempt_schedule() \ asm volatile ("call preempt_schedule_thunk" : ASM_CALL_CONSTRAINT) -- Gitblit v1.6.2