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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1454769447-785-2-git-send-email-ldewangan@nvidia.com>
Date:	Sat, 6 Feb 2016 20:07:22 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	<lee.jones@...aro.org>, <alexandre.belloni@...e-electrons.com>,
	<k.kozlowski@...sung.com>, <javier@....samsung.com>,
	<broonie@...nel.org>, <gregkh@...uxfoundation.org>,
	<a.zummo@...ertech.it>
CC:	<cw00.choi@...sung.com>, <linux-kernel@...r.kernel.org>,
	<rtc-linux@...glegroups.com>,
	Laxman Dewangan <ldewangan@...dia.com>
Subject: [PATCH V4 1/6] regmap: irq: add apis to unmap the mapped irq

Before removing irq domains, it is require to unmap all
mapped interrupt from that domain. Currently there is API
to map the interrupt on chip as regmap_irq_get_virq() for
creating mapping. Add equivalent API to dispose the mapped
irq in irq domains.

Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
CC: Krzysztof Kozlowski <k.kozlowski@...sung.com>
CC: Javier Martinez Canillas <javier@....samsung.com>

---
This is new in the series which was identified when testing V3
series that it is require to unmap virq before deleting irq chip
domain. Adding this APIs in regmap irq framework.

 drivers/base/regmap/regmap-irq.c | 14 ++++++++++++++
 include/linux/regmap.h           |  1 +
 2 files changed, 15 insertions(+)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 9b0d202..9b36fc8 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -707,6 +707,20 @@ int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq)
 EXPORT_SYMBOL_GPL(regmap_irq_get_virq);
 
 /**
+ * regmap_irq_put_virq(): Unmap mapped interrupt of a chip in irq-domain.
+ *
+ * This routine is used to dispose the created mapping from irq domain
+ * which must be call before removing irq domain.
+ *
+ * @irq: virtual irq number which was mapped with irq domains.
+ */
+void regmap_irq_put_virq(int virq)
+{
+	irq_dispose_mapping(virq);
+}
+EXPORT_SYMBOL_GPL(regmap_irq_put_virq);
+
+/**
  * regmap_irq_get_domain(): Retrieve the irq_domain for the chip
  *
  * Useful for drivers to request their own IRQs and for integration
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 27aaac9..546eab5 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -870,6 +870,7 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
 void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);
 int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data);
 int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq);
+void regmap_irq_put_virq(int virq);
 struct irq_domain *regmap_irq_get_domain(struct regmap_irq_chip_data *data);
 
 #else
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ