Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1509962imm; Wed, 10 Oct 2018 16:13:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV63JL7qY+dadLKP7G66RpYr+LD+nA+HHmcyUfZb3jyQlRBjHnryrdD2g4Q4mrjVL/h+EZ6Is X-Received: by 2002:a63:d917:: with SMTP id r23-v6mr32003430pgg.0.1539213204287; Wed, 10 Oct 2018 16:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539213204; cv=none; d=google.com; s=arc-20160816; b=mWB+czHNEjRtc5xZJquRS1TOvlixAm6YVdoSd6yznK57aWAeiaHC12I3+CMXNp0IBP 2q+EYk6AiRYU+glHzEPma1PDu5W9eG6ty9nKiYyOziAW5dOiY3q6YNThIGJLNa5KGx+N WwIbr8MBQxhXQRsXqG6ZfHAtJOraMq90cf4HTEPSlnRdgSBHjSBrB5weOgqrU+owlYAX A9Gs0H0mf4OSOSpTtwskjfi2A1wQpb1pTU7xu2dOyE4XKSvvE4B0h0rKiKSOFC/IurQr ICSyDL/FQR4/WBYn1CFlW/J3ukQhLbBisjvaaB5Zja49lpbf/3XmZgu98uxDWnYsmV+g vsqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ge5G+MFd7M4AM0erT3nTzeH4TfHZZc0989aopZ1ZM2c=; b=U5rPmoW8xiy14euvm9kU6B39J/eQ40hx47cf5we4KwB3k4mLxwPs1uVjVK9pISoQxS jx6H+cwMEbvXKxgi4KNjHSsukog0oydGOJ2OZaDz+35AGPLXgdBmg4GK+iZdQJRUJx7z jkyKGWZQoO/wJH0W4narmLw/4HYHHQOooGzbAo51fnvRXcWzUiGumuGVLUFG9jDDra1r ISsjKHzUmADwsVukM9NkwZqa7QKBx+cZ6cXpcNV8cPjGqqPLWch6kBditI1Voo826J18 xs9AnACdWXtY7kFLsKrebULx849JPk5x/rnUMsgfUV7iYhM/iI7jGmD7IDiJ4zFBiLWE gJQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aylXBfl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v124-v6si27525484pfv.1.2018.10.10.16.13.07; Wed, 10 Oct 2018 16:13:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aylXBfl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbeJKGhC (ORCPT + 99 others); Thu, 11 Oct 2018 02:37:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbeJKGhC (ORCPT ); Thu, 11 Oct 2018 02:37:02 -0400 Received: from lerouge.suse.de (LFbn-NCY-1-241-207.w83-194.abo.wanadoo.fr [83.194.85.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E918721470; Wed, 10 Oct 2018 23:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539213161; bh=sdmMctHRff1kBDwHUErxtowZf2iV1Aq4LBgBL1UOs0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aylXBfl3Kx8osCRc8kGrFwL3pRZnhfy0XUXGavHARphu4DXMCifh0D/lu7Duzp7vo 6oRP3nYn9rjUZUli7ZaXFGz7wpdLBHCFHvmRMvIxC9vcrK4oH4fOnJb/ZntyVfNNWq /gazwAyFDlGGFu6rcfvlU9cavZ4GvpPZz/FpmiQs= From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Sebastian Andrzej Siewior , Peter Zijlstra , "David S . Miller" , Linus Torvalds , Thomas Gleixner , "Paul E . McKenney" , Ingo Molnar , Frederic Weisbecker , Mauro Carvalho Chehab Subject: [RFC PATCH 03/30] softirq: Implement local_softirq_pending() below softirq vector definition Date: Thu, 11 Oct 2018 01:11:50 +0200 Message-Id: <1539213137-13953-4-git-send-email-frederic@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539213137-13953-1-git-send-email-frederic@kernel.org> References: <1539213137-13953-1-git-send-email-frederic@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The future extensions of this API are going to depend on the vector definitions. So order the code accordingly. Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Linus Torvalds Cc: David S. Miller Cc: Mauro Carvalho Chehab Cc: Paul E. McKenney --- include/linux/interrupt.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5888545..1de87ec 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -432,18 +432,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 @@ -479,6 +467,19 @@ 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 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 */ + + /* map softirq index to softirq name. update 'softirq_to_name' in * kernel/softirq.c when adding a new softirq. */ -- 2.7.4