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: <20240315111046.22136-3-quic_jkona@quicinc.com>
Date: Fri, 15 Mar 2024 16:40:43 +0530
From: Jagadeesh Kona <quic_jkona@...cinc.com>
To: "Rafael J . Wysocki" <rafael@...nel.org>,
        Kevin Hilman
	<khilman@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>, Pavel Machek
	<pavel@....cz>,
        Len Brown <len.brown@...el.com>,
        Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>,
        Bjorn Andersson <andersson@...nel.org>,
        "Konrad
 Dybcio" <konrad.dybcio@...aro.org>,
        Michael Turquette
	<mturquette@...libre.com>,
        Andy Gross <agross@...nel.org>, Stephen Boyd
	<sboyd@...nel.org>,
        Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
        "Vikash Garodia" <quic_vgarodia@...cinc.com>,
        Bryan O'Donoghue
	<bryan.odonoghue@...aro.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Abel Vesa
	<abel.vesa@...aro.org>, Taniya Das <quic_tdas@...cinc.com>
CC: <linux-arm-msm@...r.kernel.org>, <linux-clk@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-media@...r.kernel.org>,
        <linux-pm@...r.kernel.org>, Jagadeesh Kona <quic_jkona@...cinc.com>,
        "Imran
 Shaik" <quic_imrashai@...cinc.com>,
        Ajit Pandey <quic_ajipan@...cinc.com>
Subject: [PATCH V5 2/5] PM: domains: Add the domain HW-managed mode to the summary

From: Abel Vesa <abel.vesa@...aro.org>

Now that genpd supports dynamically switching the control for an
attached device between hardware- and software-mode,  let's add this
information to the genpd summary in debugfs.

Suggested-by: Taniya Das <quic_tdas@...cinc.com>
Signed-off-by: Abel Vesa <abel.vesa@...aro.org>
Signed-off-by: Jagadeesh Kona <quic_jkona@...cinc.com>
Reviewed-by: Ulf Hansson <ulf.hansson@...aro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Reviewed-by: Bjorn Andersson <andersson@...nel.org>
---
 drivers/pmdomain/core.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
index 70d8634dd9e8..18a101215c9c 100644
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -3173,6 +3173,15 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev)
 	seq_printf(s, "%-25s  ", p);
 }
 
+static void mode_status_str(struct seq_file *s, struct device *dev)
+{
+	struct generic_pm_domain_data *gpd_data;
+
+	gpd_data = to_gpd_data(dev->power.subsys_data->domain_data);
+
+	seq_printf(s, "%20s", gpd_data->hw_mode ? "HW" : "SW");
+}
+
 static void perf_status_str(struct seq_file *s, struct device *dev)
 {
 	struct generic_pm_domain_data *gpd_data;
@@ -3231,6 +3240,7 @@ static int genpd_summary_one(struct seq_file *s,
 		seq_printf(s, "\n    %-50s  ", kobj_path);
 		rtpm_status_str(s, pm_data->dev);
 		perf_status_str(s, pm_data->dev);
+		mode_status_str(s, pm_data->dev);
 		kfree(kobj_path);
 	}
 
@@ -3247,8 +3257,8 @@ static int summary_show(struct seq_file *s, void *data)
 	int ret = 0;
 
 	seq_puts(s, "domain                          status          children                           performance\n");
-	seq_puts(s, "    /device                                             runtime status\n");
-	seq_puts(s, "----------------------------------------------------------------------------------------------\n");
+	seq_puts(s, "    /device                                             runtime status                           managed by\n");
+	seq_puts(s, "------------------------------------------------------------------------------------------------------------\n");
 
 	ret = mutex_lock_interruptible(&gpd_list_lock);
 	if (ret)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ