From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760490AbcBYKBQ (ORCPT ); Thu, 25 Feb 2016 05:01:16 -0500 Received: from torg.zytor.com ([198.137.202.12]:34452 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759483AbcBYKBM (ORCPT ); Thu, 25 Feb 2016 05:01:12 -0500 Date: Thu, 25 Feb 2016 02:00:34 -0800 From: tip-bot for Qais Yousef Message-ID: Cc: linux-mips@linux-mips.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, jason@lakedaemon.net, hpa@zytor.com, mingo@kernel.org, ralf@linux-mips.org, lisa.parratt@imgtec.com, jiang.liu@linux.intel.com, marc.zyngier@arm.com, qais.yousef@imgtec.com, qsyousef@gmail.com Reply-To: qsyousef@gmail.com, qais.yousef@imgtec.com, marc.zyngier@arm.com, jiang.liu@linux.intel.com, lisa.parratt@imgtec.com, ralf@linux-mips.org, mingo@kernel.org, jason@lakedaemon.net, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, linux-mips@linux-mips.org In-Reply-To: <1449580830-23652-2-git-send-email-qais.yousef@imgtec.com> References: <1449580830-23652-2-git-send-email-qais.yousef@imgtec.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq: Add new IPI irqdomain flags Git-Commit-ID: 0abefbaab4edbcec637e00fefcdeccb52797fe4f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0abefbaab4edbcec637e00fefcdeccb52797fe4f Gitweb: http://git.kernel.org/tip/0abefbaab4edbcec637e00fefcdeccb52797fe4f Author: Qais Yousef AuthorDate: Tue, 8 Dec 2015 13:20:12 +0000 Committer: Thomas Gleixner CommitDate: Thu, 25 Feb 2016 10:56:55 +0100 genirq: Add new IPI irqdomain flags These flags will be used to identify an IPI domain. We have two flavours of IPI implementations: IRQ_DOMAIN_FLAG_IPI_PER_CPU: Each CPU has its own virq and hwirq IRQ_DOMAIN_FLAG_IPI_SINGLE : A single virq and hwirq for all CPUs Signed-off-by: Qais Yousef Cc: Cc: Cc: Cc: Cc: Cc: Cc: Qais Yousef Link: http://lkml.kernel.org/r/1449580830-23652-2-git-send-email-qais.yousef@imgtec.com Signed-off-by: Thomas Gleixner --- include/linux/irqdomain.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 04579d9..9bb0a9c 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -172,6 +172,12 @@ enum { /* Core calls alloc/free recursive through the domain hierarchy. */ IRQ_DOMAIN_FLAG_AUTO_RECURSIVE = (1 << 1), + /* Irq domain is an IPI domain with virq per cpu */ + IRQ_DOMAIN_FLAG_IPI_PER_CPU = (1 << 2), + + /* Irq domain is an IPI domain with single virq */ + IRQ_DOMAIN_FLAG_IPI_SINGLE = (1 << 3), + /* * Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved * for implementation specific purposes and ignored by the @@ -400,6 +406,22 @@ static inline bool irq_domain_is_hierarchy(struct irq_domain *domain) { return domain->flags & IRQ_DOMAIN_FLAG_HIERARCHY; } + +static inline bool irq_domain_is_ipi(struct irq_domain *domain) +{ + return domain->flags & + (IRQ_DOMAIN_FLAG_IPI_PER_CPU | IRQ_DOMAIN_FLAG_IPI_SINGLE); +} + +static inline bool irq_domain_is_ipi_per_cpu(struct irq_domain *domain) +{ + return domain->flags & IRQ_DOMAIN_FLAG_IPI_PER_CPU; +} + +static inline bool irq_domain_is_ipi_single(struct irq_domain *domain) +{ + return domain->flags & IRQ_DOMAIN_FLAG_IPI_SINGLE; +} #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ static inline void irq_domain_activate_irq(struct irq_data *data) { } static inline void irq_domain_deactivate_irq(struct irq_data *data) { } @@ -413,6 +435,21 @@ static inline bool irq_domain_is_hierarchy(struct irq_domain *domain) { return false; } + +static inline bool irq_domain_is_ipi(struct irq_domain *domain) +{ + return false; +} + +static inline bool irq_domain_is_ipi_per_cpu(struct irq_domain *domain) +{ + return false; +} + +static inline bool irq_domain_is_ipi_single(struct irq_domain *domain) +{ + return false; +} #endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */ #else /* CONFIG_IRQ_DOMAIN */