From patchwork Fri Oct 13 11:26:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Thierry X-Patchwork-Id: 10004299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB83A60360 for ; Fri, 13 Oct 2017 11:37:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC48E29005 for ; Fri, 13 Oct 2017 11:37:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F7D22902E; Fri, 13 Oct 2017 11:37:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 342B82900D for ; Fri, 13 Oct 2017 11:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=jX9QQVaQm8Qm8KFoyZSRaVb9C/vf/vlLMWcA+Jmds3k=; b=InGa3VYJF2J9cxEEOQzK4pSodR QuVz7GlQI9dF4xAVoyxZTMhCx/lywL1lwBWfAJp88/bqp0oxYD/hyJ8vJvVur2cnGwo/Jec9rcXil iJUcZja3eq/DIQBkMGopb9XoYJzb/biwvQcKrnCeDMtEjWgKPdnp/oTu837eVgUvA1O5+ywaOiJjz uNkQbM6wmvzm8jMMmgzvbZTvgj+5m9jXW9TUiuMpFWjjiZWF8V9be9MLPfNQeKu4FKoZwrpHlb8jV 9+uMOtHF2xf2SZDHoAR2x+k6sHWO3QiHYD2I6bzz3XVNR8mvwZDyzpfNQDBjqf9EqHAR+Bw36mCqI g4k0yMeA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2yH2-0000aJ-Ff; Fri, 13 Oct 2017 11:37:04 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e2y7V-0001SB-I7 for linux-arm-kernel@lists.infradead.org; Fri, 13 Oct 2017 11:27:16 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AE03915A2; Fri, 13 Oct 2017 04:26:55 -0700 (PDT) Received: from e112298-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 72A1A3F236; Fri, 13 Oct 2017 04:26:54 -0700 (PDT) From: Julien Thierry To: linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 1/2] irqdesc: Add function to identify percpu_devid irqs Date: Fri, 13 Oct 2017 12:26:44 +0100 Message-Id: <1507894005-53778-2-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507894005-53778-1-git-send-email-julien.thierry@arm.com> References: <1507894005-53778-1-git-send-email-julien.thierry@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171013_042713_828868_CD4C8B6D X-CRM114-Status: UNSURE ( 7.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, marc.zyngier@arm.com, Thomas Gleixner , will.deacon@arm.com, Julien Thierry MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP irq_is_percpu indicates whether an irq should only target a single cpu. PERCPU_DEVID flag indicates that an irq can be configured differently on each cpu it can target. Provide a function to check whether an irq is PERCPU_DEVID. Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Marc Zyngier Reviewed-by: Marc Zyngier Reviewed-by: Thomas Gleixner --- include/linux/irqdesc.h | 8 ++++++++ 1 file changed, 8 insertions(+) -- 1.9.1 diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 3e90a09..93960cf 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -244,6 +244,14 @@ static inline int irq_is_percpu(unsigned int irq) return desc->status_use_accessors & IRQ_PER_CPU; } +static inline int irq_is_percpu_devid(unsigned int irq) +{ + struct irq_desc *desc; + + desc = irq_to_desc(irq); + return desc->status_use_accessors & IRQ_PER_CPU_DEVID; +} + static inline void irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) {