lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-56e8abab615e0c5858cfb9fa0015a44641762b9d@git.kernel.org>
Date:	Sun, 23 Nov 2014 10:09:53 -0800
From:	tip-bot for Yingjoe Chen <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	yingjoe.chen@...iatek.com, marc.zyngier@....com,
	linux-arm-kernel@...ts.infradead.org, robh+dt@...nel.org,
	hc.yen@...iatek.com, mingo@...nel.org, jason@...edaemon.net,
	eddie.huang@...iatek.com, yingjoe.chen@...il.com,
	mark.rutland@....com, tglx@...utronix.de,
	srv_heupstream@...iatek.com, nathan.chung@...iatek.com,
	kernel@...gutronix.de, linux-kernel@...r.kernel.org,
	grant.likely@...aro.org, wangyijing@...wei.com,
	yh.chen@...iatek.com, bhelgaas@...gle.com, pawel.moll@....com,
	matthias.bgg@...il.com, jiang.liu@...ux.intel.com, hpa@...or.com,
	linux@....linux.org.uk, boris.brezillon@...e-electrons.com
Subject: [tip:irq/irqdomain] genirq:
  Add more helper functions to support stacked irq_chip

Commit-ID:  56e8abab615e0c5858cfb9fa0015a44641762b9d
Gitweb:     http://git.kernel.org/tip/56e8abab615e0c5858cfb9fa0015a44641762b9d
Author:     Yingjoe Chen <yingjoe.chen@...iatek.com>
AuthorDate: Thu, 13 Nov 2014 23:37:05 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sun, 23 Nov 2014 13:01:46 +0100

genirq: Add more helper functions to support stacked irq_chip

Add more helper function for stacked irq_chip to just call parent's
function.

Signed-off-by: Yingjoe Chen <yingjoe.chen@...iatek.com>
Cc: Rob Herring <robh+dt@...nel.org>
Cc: Pawel Moll <pawel.moll@....com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Matthias Brugger <matthias.bgg@...il.com>
Cc: Russell King <linux@....linux.org.uk>
Cc: Jason Cooper <jason@...edaemon.net>
Cc: Gran Likely <grant.likely@...aro.org>
Cc: Boris BREZILLON <boris.brezillon@...e-electrons.com>
Cc: <linux-arm-kernel@...ts.infradead.org>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Yijing Wang <wangyijing@...wei.com>
Cc: <srv_heupstream@...iatek.com>
Cc: <yingjoe.chen@...il.com>
Cc: <hc.yen@...iatek.com>
Cc: <eddie.huang@...iatek.com>
Cc: <nathan.chung@...iatek.com>
Cc: <yh.chen@...iatek.com>
Cc: Sascha Hauer <kernel@...gutronix.de>
Cc: Jiang Liu <jiang.liu@...ux.intel.com>
Cc: Marc Zyngier <marc.zyngier@....com>
Link: http://lkml.kernel.org/r/1415893029-2971-3-git-send-email-yingjoe.chen@mediatek.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 include/linux/irq.h |  6 ++++++
 kernel/irq/chip.c   | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 0adcbbb..fad4bf6 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -446,6 +446,12 @@ extern void handle_nested_irq(unsigned int irq);
 #ifdef	CONFIG_IRQ_DOMAIN_HIERARCHY
 extern void irq_chip_ack_parent(struct irq_data *data);
 extern int irq_chip_retrigger_hierarchy(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 *dest,
+					bool force);
 #endif
 
 /* Handling of unhandled and spurious interrupts: */
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index dd1d3c4..47f4c64 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -863,6 +863,54 @@ void irq_chip_ack_parent(struct irq_data *data)
 }
 
 /**
+ * irq_chip_mask_parent - Mask the parent interrupt
+ * @data:	Pointer to interrupt specific data
+ */
+void irq_chip_mask_parent(struct irq_data *data)
+{
+	data = data->parent_data;
+	data->chip->irq_mask(data);
+}
+
+/**
+ * irq_chip_unmask_parent - Unmask the parent interrupt
+ * @data:	Pointer to interrupt specific data
+ */
+void irq_chip_unmask_parent(struct irq_data *data)
+{
+	data = data->parent_data;
+	data->chip->irq_unmask(data);
+}
+
+/**
+ * irq_chip_eoi_parent - Invoke EOI on the parent interrupt
+ * @data:	Pointer to interrupt specific data
+ */
+void irq_chip_eoi_parent(struct irq_data *data)
+{
+	data = data->parent_data;
+	data->chip->irq_eoi(data);
+}
+
+/**
+ * irq_chip_set_affinity_parent - Set affinity on the parent interrupt
+ * @data:	Pointer to interrupt specific data
+ * @dest:	The affinity mask to set
+ * @force:	Flag to enforce setting (disable online checks)
+ *
+ * Conditinal, as the underlying parent chip might not implement it.
+ */
+int irq_chip_set_affinity_parent(struct irq_data *data,
+				 const struct cpumask *dest, bool force)
+{
+	data = data->parent_data;
+	if (data->chip->irq_set_affinity)
+		return data->chip->irq_set_affinity(data, dest, force);
+
+	return -ENOSYS;
+}
+
+/**
  * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware
  * @data:	Pointer to interrupt specific data
  *
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ