From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7A7725CC79 for ; Tue, 7 Apr 2026 13:17:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775567859; cv=none; b=sipDmRQB4bSFCUB7tB10kRF0GWUzdM07MseEo6slkgNOp6sMO9ii2obcRKWf17/xwuV1IUe/Jc79mHh17UwD3oPn6YGLGmXiXHrV/Ibci3nx3GOh88Z/Ivef07Vnc/91Vj6Cn05Vp73Y6DjIk4O8sZvSUmiXzuKOGCGmP9djOLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775567859; c=relaxed/simple; bh=nL/6sqoqt3SzzXYp2uRKEzMSNyRXDO4GvLQ6+fh1NXs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IomzCH+iua7F9Kk16cSo/b4932zF9iRU4PXZvycMAfjoWueqe5ABhCb/cuQMAxadJNob5KgJwnFwNmlHh9DuzxSSa5OUnnVxtVse9Qtc3VH5o33Btep0nWbISiX2UY7TuYlHz0TJmcOLEG5t/IHyhVbToUJeEpMSORNp15cHj3s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=f+ZY3Za1; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="f+ZY3Za1" 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 7490016F2; Tue, 7 Apr 2026 06:17:31 -0700 (PDT) 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 558443F7D8; Tue, 7 Apr 2026 06:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775567857; bh=nL/6sqoqt3SzzXYp2uRKEzMSNyRXDO4GvLQ6+fh1NXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f+ZY3Za17PzlohERV7xh8kVTf7+6EzO3xlpw2XHLlc9c5YTUBHPex11JMbub22PvS y6mA4hK/QVjHe47Vh6hZD/9bIn1oIeuPRxUVQwIkZUI3RhSPD0Al5OI70lN/Y9DYye qEdBaaJdWlKcHpiq5sn5F85z1N4Ce8Z8xp9vVOGk= From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, Andy Lutomirski , Peter Zijlstra , Thomas Gleixner Cc: ada.coupriediaz@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, mark.rutland@arm.com, ruanjinjie@huawei.com, vladimir.murzin@arm.com, will@kernel.org Subject: [PATCH 03/10] entry: Move irqentry_enter() prototype later Date: Tue, 7 Apr 2026 14:16:43 +0100 Message-Id: <20260407131650.3813777-4-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20260407131650.3813777-1-mark.rutland@arm.com> References: <20260407131650.3813777-1-mark.rutland@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subsequent patches will rework the irqentry_*() functions. The end result (and the intermediate diffs) will be much clearer if the prototype for the irqentry_enter() function is moved later, immediately before the prototype of the irqentry_exit() function. Move the prototype later. This is purely a move; there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Jinjie Ruan Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vladimir Murzin Cc: Will Deacon --- include/linux/irq-entry-common.h | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/include/linux/irq-entry-common.h b/include/linux/irq-entry-common.h index 93b4b551f7ae4..d1e8591a59195 100644 --- a/include/linux/irq-entry-common.h +++ b/include/linux/irq-entry-common.h @@ -334,6 +334,28 @@ typedef struct irqentry_state { } irqentry_state_t; #endif +/** + * irqentry_exit_cond_resched - Conditionally reschedule on return from interrupt + * + * Conditional reschedule with additional sanity checks. + */ +void raw_irqentry_exit_cond_resched(void); + +#ifdef CONFIG_PREEMPT_DYNAMIC +#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) +#define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched +#define irqentry_exit_cond_resched_dynamic_disabled NULL +DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); +#define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)() +#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) +DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); +void dynamic_irqentry_exit_cond_resched(void); +#define irqentry_exit_cond_resched() dynamic_irqentry_exit_cond_resched() +#endif +#else /* CONFIG_PREEMPT_DYNAMIC */ +#define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched() +#endif /* CONFIG_PREEMPT_DYNAMIC */ + /** * irqentry_enter - Handle state tracking on ordinary interrupt entries * @regs: Pointer to pt_regs of interrupted context @@ -367,28 +389,6 @@ typedef struct irqentry_state { */ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs); -/** - * irqentry_exit_cond_resched - Conditionally reschedule on return from interrupt - * - * Conditional reschedule with additional sanity checks. - */ -void raw_irqentry_exit_cond_resched(void); - -#ifdef CONFIG_PREEMPT_DYNAMIC -#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL) -#define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched -#define irqentry_exit_cond_resched_dynamic_disabled NULL -DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched); -#define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)() -#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY) -DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched); -void dynamic_irqentry_exit_cond_resched(void); -#define irqentry_exit_cond_resched() dynamic_irqentry_exit_cond_resched() -#endif -#else /* CONFIG_PREEMPT_DYNAMIC */ -#define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched() -#endif /* CONFIG_PREEMPT_DYNAMIC */ - /** * irqentry_exit - Handle return from exception that used irqentry_enter() * @regs: Pointer to pt_regs (exception entry regs) -- 2.30.2