From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73520C43381 for ; Thu, 28 Feb 2019 17:14:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4234E218AE for ; Thu, 28 Feb 2019 17:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551374042; bh=kwPyCRH/NCziBW165fW7pRpj3g+ayvaj44ZZFZCH9Is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=t23BtLG9nmxdvy0xvtftVKO370nkN1zX2JGWieUBQoLfJoZ1AoeQUxzVSzgY2q02l wApqdauzAy1GHXby1BgMKbEBvCbNuMah9cnTxgcOdOPnDENrJE19MgrmDtVAcZhdma 8A7e5/mf5shViXPw/O2z+pW5bvVR+jbdgg+C/HWg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387862AbfB1ROA (ORCPT ); Thu, 28 Feb 2019 12:14:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:58626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387809AbfB1RNz (ORCPT ); Thu, 28 Feb 2019 12:13:55 -0500 Received: from lerouge.home (lfbn-1-18527-45.w90-101.abo.wanadoo.fr [90.101.69.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 13CF6218AE; Thu, 28 Feb 2019 17:13:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551374034; bh=kwPyCRH/NCziBW165fW7pRpj3g+ayvaj44ZZFZCH9Is=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TIvt+mkGLZYir6W9iSKt2KhXNbH+d/yOm3QurX3mmnnSIGk0vdO+fIO+mZ/orLi5z Q7FQeSmI8aZrVW6k8pdgdKrn5h0tB9ieiv/wuySJR8FpySEKUD0SmXKRiPrEoaov+/ sYHldokL5dKUpJJPXGmyBhMG9GOHLeP8XfR6EsvU= From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Sebastian Andrzej Siewior , Peter Zijlstra , "David S . Miller" , Linus Torvalds , Mauro Carvalho Chehab , Thomas Gleixner , "Paul E . McKenney" , Frederic Weisbecker , Pavan Kondeti , Ingo Molnar , Joel Fernandes Subject: [PATCH 18/37] softirq: Normalize softirq_pending naming scheme Date: Thu, 28 Feb 2019 18:12:23 +0100 Message-Id: <20190228171242.32144-19-frederic@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190228171242.32144-1-frederic@kernel.org> References: <20190228171242.32144-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frederic Weisbecker Use the subsystem as the prefix to name the __softirq_data accessors. They are going to be extended and want a more greppable and standard naming sheme. Reviewed-by: David S. Miller Signed-off-by: Frederic Weisbecker Cc: Mauro Carvalho Chehab Cc: Joel Fernandes Cc: Thomas Gleixner Cc: Pavan Kondeti Cc: Paul E . McKenney Cc: David S . Miller Cc: Ingo Molnar Cc: Sebastian Andrzej Siewior Cc: Linus Torvalds Cc: Peter Zijlstra --- arch/s390/include/asm/hardirq.h | 4 ++-- include/linux/interrupt.h | 24 ++++++++++++------------ kernel/softirq.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/s390/include/asm/hardirq.h b/arch/s390/include/asm/hardirq.h index e26325fe287d..3103680487cf 100644 --- a/arch/s390/include/asm/hardirq.h +++ b/arch/s390/include/asm/hardirq.h @@ -14,8 +14,8 @@ #include #define local_softirq_pending() (S390_lowcore.softirq_data) -#define set_softirq_pending(x) (S390_lowcore.softirq_data = (x)) -#define or_softirq_pending(x) (S390_lowcore.softirq_data |= (x)) +#define softirq_pending_set(x) (S390_lowcore.softirq_data = (x)) +#define softirq_pending_or(x) (S390_lowcore.softirq_data |= (x)) #define __ARCH_IRQ_STAT #define __ARCH_HAS_DO_SOFTIRQ diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index a32bdd9bb103..a5dec926531b 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -447,18 +447,6 @@ extern bool force_irqthreads; #define force_irqthreads (0) #endif -#ifndef local_softirq_pending - -#ifndef local_softirq_data_ref -#define local_softirq_data_ref irq_stat.__softirq_data -#endif - -#define local_softirq_pending() (__this_cpu_read(local_softirq_data_ref)) -#define set_softirq_pending(x) (__this_cpu_write(local_softirq_data_ref, (x))) -#define or_softirq_pending(x) (__this_cpu_or(local_softirq_data_ref, (x))) - -#endif /* local_softirq_pending */ - /* Some architectures might implement lazy enabling/disabling of * interrupts. In some cases, such as stop_machine, we might want * to ensure that after a local_irq_disable(), interrupts have @@ -485,6 +473,18 @@ enum #define SOFTIRQ_STOP_IDLE_MASK (~(1 << RCU_SOFTIRQ)) +#ifndef local_softirq_pending + +#ifndef local_softirq_data_ref +#define local_softirq_data_ref irq_stat.__softirq_data +#endif + +#define local_softirq_pending() (__this_cpu_read(local_softirq_data_ref)) +#define softirq_pending_set(x) (__this_cpu_write(local_softirq_data_ref, (x))) +#define softirq_pending_or(x) (__this_cpu_or(local_softirq_data_ref, (x))) + +#endif /* local_softirq_pending */ + /* map softirq index to softirq name. update 'softirq_to_name' in * kernel/softirq.c when adding a new softirq. */ diff --git a/kernel/softirq.c b/kernel/softirq.c index 2dcaef813acb..2137c54baf98 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -268,7 +268,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) restart: /* Reset the pending bitmask before enabling irqs */ - set_softirq_pending(0); + softirq_pending_set(0); local_irq_enable(); @@ -449,7 +449,7 @@ void raise_softirq(unsigned int nr) void __raise_softirq_irqoff(unsigned int nr) { trace_softirq_raise(nr); - or_softirq_pending(1UL << nr); + softirq_pending_or(1UL << nr); } void open_softirq(int nr, void (*action)(struct softirq_action *)) -- 2.21.0