From patchwork Mon Jul 30 14:32:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher SMITH X-Patchwork-Id: 1254911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id DE61E3FCC5 for ; Mon, 30 Jul 2012 14:42:37 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Svr57-0001dj-73; Mon, 30 Jul 2012 14:36:25 +0000 Received: from eu1sys200aog103.obsmtp.com ([207.126.144.115]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1Svr0p-0000fh-Fw for linux-arm-kernel@lists.infradead.org; Mon, 30 Jul 2012 14:32:00 +0000 Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob103.postini.com ([207.126.147.11]) with SMTP ID DSNKUBaa0dSD9AaTphtWREHQ7K5gDyIjNNU5@postini.com; Mon, 30 Jul 2012 14:31:59 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 57302152; Mon, 30 Jul 2012 14:31:42 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas2.st.com [10.75.90.16]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0D32F4574; Mon, 30 Jul 2012 14:31:42 +0000 (GMT) Received: from localhost (10.65.51.241) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.192.1; Mon, 30 Jul 2012 16:31:41 +0200 From: Chris Smith To: , Subject: [PATCH 1/2] genirq: Provide an accessor for IRQ_PER_CPU flag. Date: Mon, 30 Jul 2012 15:32:11 +0100 Message-ID: <1343658732-31080-1-git-send-email-chris.smith@st.com> X-Mailer: git-send-email 1.7.6.5 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Note: SpamAssassin invocation failed Cc: Chris Smith , tglx@linutronix.de, will.deacon@arm.com, srinidhi.kasagar@stericsson.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Adds an accessor function, irq_is_per_cpu(), for the flag IRQ_PER_CPU. This is useful if you have an IRQ that is per-cpu in some hardware implementations, and not in others (example: ARM PMU Interrupts), and you want to handle both cases. Signed-off-by: Chris Smith --- include/linux/irqdesc.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index f1e2527..771cb35 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -154,6 +154,14 @@ static inline int irq_balancing_disabled(unsigned int irq) return desc->status_use_accessors & IRQ_NO_BALANCING_MASK; } +static inline int irq_is_per_cpu(unsigned int irq) +{ + struct irq_desc *desc; + + desc = irq_to_desc(irq); + return desc->status_use_accessors & IRQ_PER_CPU; +} + static inline void irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) {