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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1597058460-16211-5-git-send-email-mkshah@codeaurora.org>
Date:   Mon, 10 Aug 2020 16:50:57 +0530
From:   Maulik Shah <mkshah@...eaurora.org>
To:     bjorn.andersson@...aro.org, maz@...nel.org,
        linus.walleij@...aro.org, swboyd@...omium.org,
        evgreen@...omium.org, mka@...omium.org
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-gpio@...r.kernel.org, agross@...nel.org, tglx@...utronix.de,
        jason@...edaemon.net, dianders@...omium.org, rnayak@...eaurora.org,
        ilina@...eaurora.org, lsrao@...eaurora.org,
        Maulik Shah <mkshah@...eaurora.org>
Subject: [PATCH v4 4/7] genirq: introduce irq_suspend_parent() and irq_resume_parent()

From: Douglas Anderson <dianders@...omium.org>

This goes with the new irq_suspend_one() and irq_resume_one()
callbacks and allow us to easily pass things up to our parent.

Signed-off-by: Douglas Anderson <dianders@...omium.org>
Signed-off-by: Maulik Shah <mkshah@...eaurora.org>
---
 include/linux/irq.h |  2 ++
 kernel/irq/chip.c   | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 8d37b32..4188f50 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -679,6 +679,8 @@ extern int irq_chip_set_affinity_parent(struct irq_data *data,
 					const struct cpumask *dest,
 					bool force);
 extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on);
+extern void irq_chip_suspend_one_parent(struct irq_data *data);
+extern void irq_chip_resume_one_parent(struct irq_data *data);
 extern int irq_chip_set_vcpu_affinity_parent(struct irq_data *data,
 					     void *vcpu_info);
 extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index caf80c1..5039311 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1519,6 +1519,34 @@ int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on)
 EXPORT_SYMBOL_GPL(irq_chip_set_wake_parent);
 
 /**
+ * irq_chip_suspend_one_parent - Call irq_suspend_one() on our parent.
+ * @data:	Pointer to interrupt specific data
+ *
+ * Conditional, as the underlying parent chip might not implement it.
+ */
+void irq_chip_suspend_one_parent(struct irq_data *data)
+{
+	data = data->parent_data;
+	if (data->chip->irq_suspend_one)
+		data->chip->irq_suspend_one(data);
+}
+EXPORT_SYMBOL_GPL(irq_chip_suspend_one_parent);
+
+/**
+ * irq_chip_resume_one_parent - Call irq_resume_one() on our parent.
+ * @data:	Pointer to interrupt specific data
+ *
+ * Conditional, as the underlying parent chip might not implement it.
+ */
+void irq_chip_resume_one_parent(struct irq_data *data)
+{
+	data = data->parent_data;
+	if (data->chip->irq_resume_one)
+		data->chip->irq_resume_one(data);
+}
+EXPORT_SYMBOL_GPL(irq_chip_resume_one_parent);
+
+/**
  * irq_chip_request_resources_parent - Request resources on the parent interrupt
  * @data:	Pointer to interrupt specific data
  */
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ