From: Marc Zyngier <marc.zyngier@arm.com>
To: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Jiang Liu <jiang.liu@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
Will Deacon <will.deacon@arm.com>,
Catalin marinas <catalin.marinas@arm.com>,
Mark Rutland <mark.rutland@arm.com>
Subject: [PATCH 01/15] genirq: Add a few more helper funtions to support stacked irq_chip
Date: Tue, 11 Nov 2014 15:47:59 +0000 [thread overview]
Message-ID: <1415720893-13371-2-git-send-email-marc.zyngier@arm.com> (raw)
In-Reply-To: <1415720893-13371-1-git-send-email-marc.zyngier@arm.com>
To follow-up on 9e310a9 (genirq: Introduce helper functions to support
stacked irq_chip), add a few additional helpers to deal with mask/unmask
and eoi.
This is required to support the standard ARM interrupt controllers
(GIC/GICv3).
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
include/linux/irq.h | 6 ++++++
kernel/irq/chip.c | 31 +++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 041edd6..aec2145 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -454,6 +454,12 @@ extern void handle_nested_irq(unsigned int irq);
extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg);
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
extern void irq_chip_ack_parent(struct irq_data *data);
+extern void irq_chip_mask_parent(struct irq_data *data);
+extern void irq_chip_unmask_parent(struct irq_data *data);
+extern void irq_chip_eoi_parent(struct irq_data *data);
+extern int irq_chip_set_affinity_parent(struct irq_data *data,
+ const struct cpumask *mask_val,
+ bool force);
extern int irq_chip_retrigger_hierarchy(struct irq_data *data);
#endif
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 8f362db..d028b34 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -858,6 +858,37 @@ void irq_chip_ack_parent(struct irq_data *data)
data->chip->irq_ack(data);
}
+void irq_chip_mask_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data && data->chip && data->chip->irq_mask)
+ data->chip->irq_mask(data);
+}
+
+void irq_chip_unmask_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data && data->chip && data->chip->irq_unmask)
+ data->chip->irq_unmask(data);
+}
+
+void irq_chip_eoi_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data && data->chip && data->chip->irq_eoi)
+ data->chip->irq_eoi(data);
+}
+
+int irq_chip_set_affinity_parent(struct irq_data *data,
+ const struct cpumask *mask_val, bool force)
+{
+ data = data->parent_data;
+ if (data && data->chip && data->chip->irq_set_affinity)
+ return data->chip->irq_set_affinity(data, mask_val, force);
+
+ return -EINVAL;
+}
+
int irq_chip_retrigger_hierarchy(struct irq_data *data)
{
for (data = data->parent_data; data; data = data->parent_data)
--
2.0.4
next prev parent reply other threads:[~2014-11-11 15:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 15:47 [PATCH 00/15] arm64: PCI/MSI: GICv3 ITS support (stacked domain edition) Marc Zyngier
2014-11-11 15:47 ` Marc Zyngier [this message]
2014-11-11 15:48 ` [PATCH 02/15] PCI/MSI: genirq: allow architecture-specific override of flow handler Marc Zyngier
2014-11-11 15:48 ` [PATCH 03/15] arm64: MSI: Add support for stacked MSI domain Marc Zyngier
2014-11-11 15:48 ` [PATCH 04/15] irqchip: GICv3: Convert to domain hierarchy Marc Zyngier
2014-11-11 15:48 ` [PATCH 05/15] irqchip: GICv3: rework redistributor structure Marc Zyngier
2014-11-11 15:48 ` [PATCH 06/15] irqchip: GICv3: ITS command queue Marc Zyngier
2014-11-11 15:48 ` [PATCH 07/15] irqchip: GICv3: ITS: irqchip implementation Marc Zyngier
2014-11-11 15:48 ` [PATCH 08/15] irqchip: GICv3: ITS: LPI allocator Marc Zyngier
2014-11-11 15:48 ` [PATCH 09/15] irqchip: GICv3: ITS: tables allocators Marc Zyngier
2014-11-11 15:48 ` [PATCH 10/15] irqchip: GICv3: ITS: device allocation and configuration Marc Zyngier
2014-11-11 15:48 ` [PATCH 11/15] irqchip: GICv3: ITS: MSI support Marc Zyngier
2014-11-11 15:48 ` [PATCH 12/15] irqchip: GICv3: ITS: DT probing and initialization Marc Zyngier
2014-11-11 15:48 ` [PATCH 13/15] irqchip: GICv3: ITS: plug ITS init into main GICv3 code Marc Zyngier
2014-11-11 15:48 ` [PATCH 14/15] irqchip: GICv3: ITS: enable compilation of the ITS driver Marc Zyngier
2014-11-11 15:48 ` [PATCH 15/15] irqchip: GICv3: Binding updates for ITS Marc Zyngier
2014-11-11 16:10 ` [PATCH 00/15] arm64: PCI/MSI: GICv3 ITS support (stacked domain edition) Jiang Liu
2014-11-11 16:27 ` Marc Zyngier
2014-11-11 16:32 ` Jiang Liu
2014-11-11 18:32 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415720893-13371-2-git-send-email-marc.zyngier@arm.com \
--to=marc.zyngier@arm.com \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=jiang.liu@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=yingjoe.chen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®