From: Mark Rutland <mark.rutland@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: ardb@kernel.org, bp@alien8.de, catalin.marinas@arm.com,
dave.hansen@linux.intel.com, frederic@kernel.org,
james.morse@arm.com, joey.gouly@arm.com, juri.lelli@redhat.com,
linux-kernel@vger.kernel.org, luto@kernel.org,
mark.rutland@arm.com, mingo@redhat.com, peterz@infradead.org,
tglx@linutronix.de, valentin.schneider@arm.com, will@kernel.org
Subject: [PATCH v4 4/7] sched/preempt: decouple HAVE_PREEMPT_DYNAMIC from GENERIC_ENTRY
Date: Mon, 14 Feb 2022 16:52:13 +0000 [thread overview]
Message-ID: <20220214165216.2231574-5-mark.rutland@arm.com> (raw)
In-Reply-To: <20220214165216.2231574-1-mark.rutland@arm.com>
Now that the enabled/disabled states for the preemption functions are
declared alongside their definitions, the core PREEMPT_DYNAMIC logic is
no longer tied to GENERIC_ENTRY, and can safely be selected so long as
an architecture provides enabled/disabled states for
irqentry_exit_cond_resched().
Make it possible to select HAVE_PREEMPT_DYNAMIC without GENERIC_ENTRY.
For existing users of HAVE_PREEMPT_DYNAMIC there should be no functional
change as a result of this patch.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Valentin Schneider <valentin.schneider@arm.com>
---
arch/Kconfig | 1 -
kernel/sched/core.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 678a80713b21..601691f1570f 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1279,7 +1279,6 @@ config HAVE_STATIC_CALL_INLINE
config HAVE_PREEMPT_DYNAMIC
bool
depends on HAVE_STATIC_CALL
- depends on GENERIC_ENTRY
help
Select this if the architecture support boot time preempt setting
on top of static calls. It is strongly advised to support inline
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 414165c430f4..3bf7f90d0ef7 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8141,7 +8141,9 @@ EXPORT_SYMBOL(__cond_resched_rwlock_write);
#ifdef CONFIG_PREEMPT_DYNAMIC
+#ifdef CONFIG_GENERIC_ENTRY
#include <linux/entry-common.h>
+#endif
/*
* SC:cond_resched
--
2.30.2
next prev parent reply other threads:[~2022-02-14 16:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 16:52 [PATCH v4 0/7] arm64 / sched/preempt: support PREEMPT_DYNAMIC with static keys Mark Rutland
2022-02-14 16:52 ` [PATCH v4 1/7] sched/preempt: move PREEMPT_DYNAMIC logic later Mark Rutland
2022-02-19 10:21 ` [tip: sched/core] sched/preempt: Move " tip-bot2 for Mark Rutland
2022-02-14 16:52 ` [PATCH v4 2/7] sched/preempt: refactor sched_dynamic_update() Mark Rutland
2022-02-19 10:21 ` [tip: sched/core] sched/preempt: Refactor sched_dynamic_update() tip-bot2 for Mark Rutland
2022-02-14 16:52 ` [PATCH v4 3/7] sched/preempt: simplify irqentry_exit_cond_resched() callers Mark Rutland
2022-02-19 10:21 ` [tip: sched/core] sched/preempt: Simplify " tip-bot2 for Mark Rutland
2022-02-14 16:52 ` Mark Rutland [this message]
2022-02-19 10:21 ` [tip: sched/core] sched/preempt: Decouple HAVE_PREEMPT_DYNAMIC from GENERIC_ENTRY tip-bot2 for Mark Rutland
2022-02-14 16:52 ` [PATCH v4 5/7] sched/preempt: add PREEMPT_DYNAMIC using static keys Mark Rutland
2022-02-19 10:21 ` [tip: sched/core] sched/preempt: Add " tip-bot2 for Mark Rutland
2022-03-18 8:49 ` [PATCH v4 5/7] sched/preempt: add " Sven Schnelle
2022-02-14 16:52 ` [PATCH v4 6/7] arm64: entry: centralize preemption decision Mark Rutland
2022-02-19 10:21 ` [tip: sched/core] arm64: entry: Centralize " tip-bot2 for Mark Rutland
2022-02-14 16:52 ` [PATCH v4 7/7] arm64: support PREEMPT_DYNAMIC Mark Rutland
2022-02-19 10:21 ` [tip: sched/core] arm64: Support PREEMPT_DYNAMIC tip-bot2 for Mark Rutland
2022-02-17 13:52 ` [PATCH v4 0/7] arm64 / sched/preempt: support PREEMPT_DYNAMIC with static keys Frederic Weisbecker
2022-02-17 18:59 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220214165216.2231574-5-mark.rutland@arm.com \
--to=mark.rutland@arm.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=frederic@kernel.org \
--cc=james.morse@arm.com \
--cc=joey.gouly@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=valentin.schneider@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).