]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
powerpc: Remove dead non-preemption code
authorChristophe Leroy (CS GROUP) <chleroy@kernel.org>
Fri, 19 Jun 2026 12:08:28 +0000 (14:08 +0200)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 15 Jul 2026 02:34:13 +0000 (08:04 +0530)
Since commit 7dadeaa6e851 ("sched: Further restrict the preemption
modes"), powerpc always has CONFIG_PREEMPTION because only
CONFIG_PREEMPT and CONFIG_PREEMPT_LAZY are possible, even in
dynamic preemption mode (see sched_dynamic_mode).

As a consequence, need_irq_preemption() is always true and can be
removed.

And because commit bee25f97ad24 ("powerpc: Enable GENERIC_ENTRY
feature") includes linux/irq-entry-common.h which already declares
sk_dynamic_irqentry_exit_cond_resched static key, asm/preempt.h
becauses useless and can be removed.

Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/2bf10a0afffefb6aca44bf2f864cc17471a80e31.1781870889.git.chleroy@kernel.org
arch/powerpc/include/asm/preempt.h [deleted file]
arch/powerpc/lib/vmx-helper.c

diff --git a/arch/powerpc/include/asm/preempt.h b/arch/powerpc/include/asm/preempt.h
deleted file mode 100644 (file)
index 000e2b9..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_POWERPC_PREEMPT_H
-#define __ASM_POWERPC_PREEMPT_H
-
-#include <asm-generic/preempt.h>
-
-#if defined(CONFIG_PREEMPT_DYNAMIC)
-#include <linux/jump_label.h>
-DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
-#define need_irq_preemption() \
-       (static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched))
-#else
-#define need_irq_preemption()   (IS_ENABLED(CONFIG_PREEMPTION))
-#endif
-
-#endif /* __ASM_POWERPC_PREEMPT_H */
index 57e897b60db86c1237befb2fbd38574732a27799..cc9fb72cb4ebed9249a9305da5f611d13eec8aac 100644 (file)
@@ -46,7 +46,7 @@ int exit_vmx_usercopy(void)
         * set and we are preemptible. The hack here is to schedule a
         * decrementer to fire here and reschedule for us if necessary.
         */
-       if (need_irq_preemption() && need_resched())
+       if (need_resched())
                set_dec(1);
        return 0;
 }