From patchwork Mon Feb 14 16:52:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 12745908 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3CBE4C433EF for ; Mon, 14 Feb 2022 16:55:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nz553w8VbHEdjzIDn/F6N/mneAouEmnXZmstz/AMWCU=; b=lPJq14tkgDGdaq bX6OCBRv25j1RHAfq4IsdKMnTkE0dNnI9lzfcvRqgezDCYkTC/xGY7vR09mr5K6PCsh8nYk8C9ftM a7XNpbkoiyug63e+2CMRXyMc+50GXNCOLSfGtYH7g/0fdBRiv6JCx5rAndWWry507bhzhTYtxalCs GeqsTLrl1K2IrNCdqEB33ecaFecXeFRL7QHyvDNMt5D6bPwi7jeT3r7GlcFSJoyXhSyaLJtQ66VQq SrZtHOsb4PDLUTQinmAISKd873/C3h1TGVtiUuX71z+7JhIsTSWAgtNx3ePBrCi/vUy6tzGyD2zU+ YwRl5LnvprUGd+JNAZkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJecI-00GBLJ-Vg; Mon, 14 Feb 2022 16:54:23 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJeaa-00GAbt-D1 for linux-arm-kernel@lists.infradead.org; Mon, 14 Feb 2022 16:52:40 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 053FB1476; Mon, 14 Feb 2022 08:52:36 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0A3923F70D; Mon, 14 Feb 2022 08:52:33 -0800 (PST) From: Mark Rutland 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 Message-Id: <20220214165216.2231574-5-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220214165216.2231574-1-mark.rutland@arm.com> References: <20220214165216.2231574-1-mark.rutland@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_085236_559354_E6ECEB96 X-CRM114-Status: GOOD ( 11.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Ard Biesheuvel Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Juri Lelli Cc: Peter Zijlstra Cc: Valentin Schneider --- 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 +#endif /* * SC:cond_resched