From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31B981DF736 for ; Thu, 8 Jan 2026 08:30:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767861033; cv=none; b=SU3OqtFUuhcz1hK1+DbQJvnJDHU8qWFZ+dYKMxTXNUuW+J8Ouxfh5DMOOHbnBgbgm45v+WtkRKChohj3vIi2IErn5c+YXNMfUY/4k8J3UqCJlR0MvJBNBfgOjK/Nxn4XCEM03amKlmnryohj+1Ik8vwyiZF7Ltgbfh3Jp8lnKGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767861033; c=relaxed/simple; bh=WFcxps8hurtloxqqOQuBDmrhXicLidMmupx3ZoajXQw=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=qEkj5EmiqCIai0Af4DHnSsJZv8YfAfI9f3ZZTfLRq3aRae2eIeNeCk+WgwIVeiKe6awixYA8ILvXw/6+HNalPg6aU/dgC9uc0kK9Kdg/nq2Isnsfo/J+VSOviGceIbxnHlpLUrX4gfYFFMpscYHnNy8l743odkihWol49dzztfE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=0W0gCYIS; arc=none smtp.client-ip=113.46.200.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="0W0gCYIS" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=qV54H0G4ZmCM7AZXX+pxayX6mbCwghAJSYuD+KvzN3M=; b=0W0gCYIS1FtH5QEvXVClCaotd2mC9Am9vWJCMGDJjGncU6N1xowo2BSnF8dR1xsJxh6jSrcgv vUWPJmhMe5RF4Hfb/Oow87JdZFGLKVX+/gZ3hu2Lr+bnKDZo11Qyjz0jiR1VwEGPZ5mBYsUy1tJ Civ/6FD1PkcA5/SsJ4b1zWU= Received: from mail.maildlp.com (unknown [172.19.162.140]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4dmygR67ktz1prm6; Thu, 8 Jan 2026 16:26:59 +0800 (CST) Received: from dggpemf500011.china.huawei.com (unknown [7.185.36.131]) by mail.maildlp.com (Postfix) with ESMTPS id C9A682012A; Thu, 8 Jan 2026 16:30:17 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by dggpemf500011.china.huawei.com (7.185.36.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 8 Jan 2026 16:30:16 +0800 Message-ID: <272dc19f-7e6b-9fd7-22c0-de3a4a81dc8f@huawei.com> Date: Thu, 8 Jan 2026 16:30:15 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v3 1/8] powerpc: rename arch_irq_disabled_regs Content-Language: en-US To: Mukesh Kumar Chaurasiya , , , , , , , , , , , , , , , , , , , , , , , , , References: <20251229045416.3193779-1-mkchauras@linux.ibm.com> <20251229045416.3193779-2-mkchauras@linux.ibm.com> From: Jinjie Ruan In-Reply-To: <20251229045416.3193779-2-mkchauras@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems500001.china.huawei.com (7.221.188.70) To dggpemf500011.china.huawei.com (7.185.36.131) On 2025/12/29 12:54, Mukesh Kumar Chaurasiya wrote: > From: Mukesh Kumar Chaurasiya > > Rename arch_irq_disabled_regs() to regs_irqs_disabled() to align with the > naming used in the generic irqentry framework. This makes the function > available for use both in the PowerPC architecture code and in the > common entry/exit paths shared with other architectures. > > This is a preparatory change for enabling the generic irqentry framework > on PowerPC. > > Signed-off-by: Mukesh Kumar Chaurasiya > Reviewed-by: Shrikanth Hegde > --- > arch/powerpc/include/asm/hw_irq.h | 4 ++-- > arch/powerpc/include/asm/interrupt.h | 16 ++++++++-------- > arch/powerpc/kernel/interrupt.c | 4 ++-- > arch/powerpc/kernel/syscall.c | 2 +- > arch/powerpc/kernel/traps.c | 2 +- > arch/powerpc/kernel/watchdog.c | 2 +- > arch/powerpc/perf/core-book3s.c | 2 +- > 7 files changed, 16 insertions(+), 16 deletions(-) Reviewed-by: Jinjie Ruan > > diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h > index 1078ba88efaf..8dfe36b442a5 100644 > --- a/arch/powerpc/include/asm/hw_irq.h > +++ b/arch/powerpc/include/asm/hw_irq.h > @@ -393,7 +393,7 @@ static inline void do_hard_irq_enable(void) > __hard_irq_enable(); > } > > -static inline bool arch_irq_disabled_regs(struct pt_regs *regs) > +static inline bool regs_irqs_disabled(struct pt_regs *regs) > { > return (regs->softe & IRQS_DISABLED); > } > @@ -466,7 +466,7 @@ static inline bool arch_irqs_disabled(void) > > #define hard_irq_disable() arch_local_irq_disable() > > -static inline bool arch_irq_disabled_regs(struct pt_regs *regs) > +static inline bool regs_irqs_disabled(struct pt_regs *regs) > { > return !(regs->msr & MSR_EE); > } > diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h > index eb0e4a20b818..0e2cddf8bd21 100644 > --- a/arch/powerpc/include/asm/interrupt.h > +++ b/arch/powerpc/include/asm/interrupt.h > @@ -172,7 +172,7 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs) > /* Enable MSR[RI] early, to support kernel SLB and hash faults */ > #endif > > - if (!arch_irq_disabled_regs(regs)) > + if (!regs_irqs_disabled(regs)) > trace_hardirqs_off(); > > if (user_mode(regs)) { > @@ -192,11 +192,11 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs) > CT_WARN_ON(ct_state() != CT_STATE_KERNEL && > ct_state() != CT_STATE_IDLE); > INT_SOFT_MASK_BUG_ON(regs, is_implicit_soft_masked(regs)); > - INT_SOFT_MASK_BUG_ON(regs, arch_irq_disabled_regs(regs) && > - search_kernel_restart_table(regs->nip)); > + INT_SOFT_MASK_BUG_ON(regs, regs_irqs_disabled(regs) && > + search_kernel_restart_table(regs->nip)); > } > - INT_SOFT_MASK_BUG_ON(regs, !arch_irq_disabled_regs(regs) && > - !(regs->msr & MSR_EE)); > + INT_SOFT_MASK_BUG_ON(regs, !regs_irqs_disabled(regs) && > + !(regs->msr & MSR_EE)); > > booke_restore_dbcr0(); > } > @@ -298,7 +298,7 @@ static inline void interrupt_nmi_enter_prepare(struct pt_regs *regs, struct inte > * Adjust regs->softe to be soft-masked if it had not been > * reconcied (e.g., interrupt entry with MSR[EE]=0 but softe > * not yet set disabled), or if it was in an implicit soft > - * masked state. This makes arch_irq_disabled_regs(regs) > + * masked state. This makes regs_irqs_disabled(regs) > * behave as expected. > */ > regs->softe = IRQS_ALL_DISABLED; > @@ -372,7 +372,7 @@ static inline void interrupt_nmi_exit_prepare(struct pt_regs *regs, struct inter > > #ifdef CONFIG_PPC64 > #ifdef CONFIG_PPC_BOOK3S > - if (arch_irq_disabled_regs(regs)) { > + if (regs_irqs_disabled(regs)) { > unsigned long rst = search_kernel_restart_table(regs->nip); > if (rst) > regs_set_return_ip(regs, rst); > @@ -661,7 +661,7 @@ void replay_soft_interrupts(void); > > static inline void interrupt_cond_local_irq_enable(struct pt_regs *regs) > { > - if (!arch_irq_disabled_regs(regs)) > + if (!regs_irqs_disabled(regs)) > local_irq_enable(); > } > > diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c > index aea6f7e8e9c6..9ce2013e70ae 100644 > --- a/arch/powerpc/kernel/interrupt.c > +++ b/arch/powerpc/kernel/interrupt.c > @@ -347,7 +347,7 @@ notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs) > unsigned long ret; > > BUG_ON(regs_is_unrecoverable(regs)); > - BUG_ON(arch_irq_disabled_regs(regs)); > + BUG_ON(regs_irqs_disabled(regs)); > CT_WARN_ON(ct_state() == CT_STATE_USER); > > /* > @@ -396,7 +396,7 @@ notrace unsigned long interrupt_exit_kernel_prepare(struct pt_regs *regs) > > local_irq_disable(); > > - if (!arch_irq_disabled_regs(regs)) { > + if (!regs_irqs_disabled(regs)) { > /* Returning to a kernel context with local irqs enabled. */ > WARN_ON_ONCE(!(regs->msr & MSR_EE)); > again: > diff --git a/arch/powerpc/kernel/syscall.c b/arch/powerpc/kernel/syscall.c > index be159ad4b77b..9f03a6263fb4 100644 > --- a/arch/powerpc/kernel/syscall.c > +++ b/arch/powerpc/kernel/syscall.c > @@ -32,7 +32,7 @@ notrace long system_call_exception(struct pt_regs *regs, unsigned long r0) > > BUG_ON(regs_is_unrecoverable(regs)); > BUG_ON(!user_mode(regs)); > - BUG_ON(arch_irq_disabled_regs(regs)); > + BUG_ON(regs_irqs_disabled(regs)); > > #ifdef CONFIG_PPC_PKEY > if (mmu_has_feature(MMU_FTR_PKEY)) { > diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c > index cb8e9357383e..629f2a2d4780 100644 > --- a/arch/powerpc/kernel/traps.c > +++ b/arch/powerpc/kernel/traps.c > @@ -1956,7 +1956,7 @@ DEFINE_INTERRUPT_HANDLER_RAW(performance_monitor_exception) > * prevent hash faults on user addresses when reading callchains (and > * looks better from an irq tracing perspective). > */ > - if (IS_ENABLED(CONFIG_PPC64) && unlikely(arch_irq_disabled_regs(regs))) > + if (IS_ENABLED(CONFIG_PPC64) && unlikely(regs_irqs_disabled(regs))) > performance_monitor_exception_nmi(regs); > else > performance_monitor_exception_async(regs); > diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c > index 2429cb1c7baa..6111cbbde069 100644 > --- a/arch/powerpc/kernel/watchdog.c > +++ b/arch/powerpc/kernel/watchdog.c > @@ -373,7 +373,7 @@ DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt) > u64 tb; > > /* should only arrive from kernel, with irqs disabled */ > - WARN_ON_ONCE(!arch_irq_disabled_regs(regs)); > + WARN_ON_ONCE(!regs_irqs_disabled(regs)); > > if (!cpumask_test_cpu(cpu, &wd_cpus_enabled)) > return 0; > diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c > index 8b0081441f85..f7518b7e3055 100644 > --- a/arch/powerpc/perf/core-book3s.c > +++ b/arch/powerpc/perf/core-book3s.c > @@ -2482,7 +2482,7 @@ static void __perf_event_interrupt(struct pt_regs *regs) > * will trigger a PMI after waking up from idle. Since counter values are _not_ > * saved/restored in idle path, can lead to below "Can't find PMC" message. > */ > - if (unlikely(!found) && !arch_irq_disabled_regs(regs)) > + if (unlikely(!found) && !regs_irqs_disabled(regs)) > printk_ratelimited(KERN_WARNING "Can't find PMC that caused IRQ\n"); > > /*