linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/33] cpufreq: manage common sysfs attributes from core
@ 2025-01-23 11:35 Viresh Kumar
  2025-01-23 11:35 ` [PATCH 04/33] cpufreq: apple: Stop setting cpufreq_driver->attr field Viresh Kumar
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Alyssa Rosenzweig, AngeloGioacchino Del Regno,
	Broadcom internal kernel review list, Christophe Leroy,
	Cristian Marussi, Fabio Estevam, Florian Fainelli, Hector Martin,
	Huacai Chen, Jiaxun Yang, Jonathan Hunter, Kevin Hilman,
	Madhavan Srinivasan, Markus Mayer, Matthias Brugger,
	Michael Ellerman, Naveen N Rao, Nicholas Piggin,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo, Sudeep Holla,
	Sven Peter, Thierry Reding, Viresh Kumar, WANG Xuerui
  Cc: linux-pm, Vincent Guittot, arm-scmi, asahi, imx, linux-arm-kernel,
	linux-arm-msm, linux-kernel, linux-mediatek, linux-mips,
	linux-omap, linuxppc-dev, linux-tegra, loongarch

Hello,

Most of the drivers add available and boost frequencies related attributes. This
patch series tries to avoid duplication and simplify driver's code by managing
these from core code.

A quick search revealed that only the drivers that set the
policy->freq_table field, enable these attributes. Which makes sense as
well, since the show_available_freqs() helper works only if the
freq_table is present.

In order to simplify drivers, create the relevant sysfs files forcefully
from cpufreq core.

Pushed here:

git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/core-attr

--
Viresh

Viresh Kumar (33):
  cpufreq: Always create freq-table related sysfs file
  cpufreq: dt: Stop setting cpufreq_driver->attr field
  cpufreq: acpi: Stop setting common freq attributes
  cpufreq: apple: Stop setting cpufreq_driver->attr field
  cpufreq: bmips: Stop setting cpufreq_driver->attr field
  cpufreq: brcmstb: Stop setting common freq attributes
  cpufreq: davinci: Stop setting cpufreq_driver->attr field
  cpufreq: e_powersaver: Stop setting cpufreq_driver->attr field
  cpufreq: elanfreq: Stop setting cpufreq_driver->attr field
  cpufreq: imx6q: Stop setting cpufreq_driver->attr field
  cpufreq: kirkwood: Stop setting cpufreq_driver->attr field
  cpufreq: longhaul: Stop setting cpufreq_driver->attr field
  cpufreq: loongson: Stop setting cpufreq_driver->attr field
  cpufreq: mediatek: Stop setting cpufreq_driver->attr field
  cpufreq: omap: Stop setting cpufreq_driver->attr field
  cpufreq: p4: Stop setting cpufreq_driver->attr field
  cpufreq: pasemi: Stop setting cpufreq_driver->attr field
  cpufreq: pmac: Stop setting cpufreq_driver->attr field
  cpufreq: powernow: Stop setting cpufreq_driver->attr field
  cpufreq: powernv: Stop setting common freq attributes
  cpufreq: qcom: Stop setting cpufreq_driver->attr field
  cpufreq: qoriq: Stop setting cpufreq_driver->attr field
  cpufreq: sc520_freq: Stop setting cpufreq_driver->attr field
  cpufreq: scmi: Stop setting cpufreq_driver->attr field
  cpufreq: scpi: Stop setting cpufreq_driver->attr field
  cpufreq: sh: Stop setting cpufreq_driver->attr field
  cpufreq: spear: Stop setting cpufreq_driver->attr field
  cpufreq: speedstep: Stop setting cpufreq_driver->attr field
  cpufreq: tegra: Stop setting cpufreq_driver->attr field
  cpufreq: vexpress: Stop setting cpufreq_driver->attr field
  cpufreq: virtual: Stop setting cpufreq_driver->attr field
  cpufreq: Remove cpufreq_generic_attrs
  cpufreq: Stop checking for duplicate available/boost freq attributes

 drivers/cpufreq/acpi-cpufreq.c         |  1 -
 drivers/cpufreq/apple-soc-cpufreq.c    |  8 --------
 drivers/cpufreq/bmips-cpufreq.c        |  1 -
 drivers/cpufreq/brcmstb-avs-cpufreq.c  |  1 -
 drivers/cpufreq/cpufreq-dt.c           |  8 --------
 drivers/cpufreq/cpufreq.c              | 15 +++++++++++++++
 drivers/cpufreq/davinci-cpufreq.c      |  1 -
 drivers/cpufreq/e_powersaver.c         |  1 -
 drivers/cpufreq/elanfreq.c             |  1 -
 drivers/cpufreq/freq_table.c           |  8 --------
 drivers/cpufreq/imx6q-cpufreq.c        |  1 -
 drivers/cpufreq/kirkwood-cpufreq.c     |  1 -
 drivers/cpufreq/longhaul.c             |  1 -
 drivers/cpufreq/loongson2_cpufreq.c    |  1 -
 drivers/cpufreq/loongson3_cpufreq.c    |  1 -
 drivers/cpufreq/mediatek-cpufreq-hw.c  |  1 -
 drivers/cpufreq/mediatek-cpufreq.c     |  1 -
 drivers/cpufreq/omap-cpufreq.c         |  1 -
 drivers/cpufreq/p4-clockmod.c          |  1 -
 drivers/cpufreq/pasemi-cpufreq.c       |  1 -
 drivers/cpufreq/pmac32-cpufreq.c       |  1 -
 drivers/cpufreq/pmac64-cpufreq.c       |  1 -
 drivers/cpufreq/powernow-k6.c          |  1 -
 drivers/cpufreq/powernow-k7.c          |  1 -
 drivers/cpufreq/powernow-k8.c          |  1 -
 drivers/cpufreq/powernv-cpufreq.c      |  2 --
 drivers/cpufreq/qcom-cpufreq-hw.c      |  7 -------
 drivers/cpufreq/qoriq-cpufreq.c        |  1 -
 drivers/cpufreq/sc520_freq.c           |  1 -
 drivers/cpufreq/scmi-cpufreq.c         |  8 --------
 drivers/cpufreq/scpi-cpufreq.c         |  1 -
 drivers/cpufreq/sh-cpufreq.c           |  1 -
 drivers/cpufreq/spear-cpufreq.c        |  1 -
 drivers/cpufreq/speedstep-centrino.c   |  1 -
 drivers/cpufreq/speedstep-ich.c        |  1 -
 drivers/cpufreq/speedstep-smi.c        |  1 -
 drivers/cpufreq/tegra186-cpufreq.c     |  1 -
 drivers/cpufreq/tegra194-cpufreq.c     |  1 -
 drivers/cpufreq/vexpress-spc-cpufreq.c |  1 -
 drivers/cpufreq/virtual-cpufreq.c      |  1 -
 include/linux/cpufreq.h                |  1 -
 41 files changed, 15 insertions(+), 75 deletions(-)

-- 
2.31.1.272.g89b43f80a514



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 04/33] cpufreq: apple: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 06/33] cpufreq: brcmstb: Stop setting common freq attributes Viresh Kumar
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Hector Martin, Sven Peter, Alyssa Rosenzweig,
	Viresh Kumar
  Cc: linux-pm, Vincent Guittot, asahi, linux-arm-kernel, linux-kernel

The cpufreq core handles this for basic attributes now, the driver can skip
setting them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/apple-soc-cpufreq.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/cpufreq/apple-soc-cpufreq.c b/drivers/cpufreq/apple-soc-cpufreq.c
index 269b18c62d04..6ff604a0fe79 100644
--- a/drivers/cpufreq/apple-soc-cpufreq.c
+++ b/drivers/cpufreq/apple-soc-cpufreq.c
@@ -229,12 +229,6 @@ static int apple_soc_cpufreq_find_cluster(struct cpufreq_policy *policy,
 	return 0;
 }
 
-static struct freq_attr *apple_soc_cpufreq_hw_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL, /* Filled in below if boost is enabled */
-	NULL,
-};
-
 static int apple_soc_cpufreq_init(struct cpufreq_policy *policy)
 {
 	int ret, i;
@@ -321,7 +315,6 @@ static int apple_soc_cpufreq_init(struct cpufreq_policy *policy)
 		if (ret) {
 			dev_warn(cpu_dev, "failed to enable boost: %d\n", ret);
 		} else {
-			apple_soc_cpufreq_hw_attr[1] = &cpufreq_freq_attr_scaling_boost_freqs;
 			apple_soc_cpufreq_driver.boost_enabled = true;
 		}
 	}
@@ -360,7 +353,6 @@ static struct cpufreq_driver apple_soc_cpufreq_driver = {
 	.target_index	= apple_soc_cpufreq_set_target,
 	.fast_switch	= apple_soc_cpufreq_fast_switch,
 	.register_em	= cpufreq_register_em_with_opp,
-	.attr		= apple_soc_cpufreq_hw_attr,
 	.suspend	= cpufreq_generic_suspend,
 };
 
-- 
2.31.1.272.g89b43f80a514



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 06/33] cpufreq: brcmstb: Stop setting common freq attributes
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
  2025-01-23 11:35 ` [PATCH 04/33] cpufreq: apple: Stop setting cpufreq_driver->attr field Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 20:27   ` Florian Fainelli
  2025-01-23 11:35 ` [PATCH 10/33] cpufreq: imx6q: Stop setting cpufreq_driver->attr field Viresh Kumar
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Markus Mayer,
	Broadcom internal kernel review list, Viresh Kumar,
	Florian Fainelli
  Cc: linux-pm, Vincent Guittot, linux-arm-kernel, linux-kernel

The cpufreq core handles this now, the driver can skip setting it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/brcmstb-avs-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
index 2fd0f6be6fa3..7b841a086acc 100644
--- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
+++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
@@ -720,7 +720,6 @@ cpufreq_freq_attr_ro(brcm_avs_voltage);
 cpufreq_freq_attr_ro(brcm_avs_frequency);
 
 static struct freq_attr *brcm_avs_cpufreq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
 	&brcm_avs_pstate,
 	&brcm_avs_mode,
 	&brcm_avs_pmap,
-- 
2.31.1.272.g89b43f80a514



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 10/33] cpufreq: imx6q: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
  2025-01-23 11:35 ` [PATCH 04/33] cpufreq: apple: Stop setting cpufreq_driver->attr field Viresh Kumar
  2025-01-23 11:35 ` [PATCH 06/33] cpufreq: brcmstb: Stop setting common freq attributes Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 14/33] cpufreq: mediatek: " Viresh Kumar
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: linux-pm, Vincent Guittot, imx, linux-arm-kernel, linux-kernel

The cpufreq core handles this for basic attributes now, the driver can skip
setting them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/imx6q-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index f3c99f378ad6..db1c88e9d3f9 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -207,7 +207,6 @@ static struct cpufreq_driver imx6q_cpufreq_driver = {
 	.init = imx6q_cpufreq_init,
 	.register_em = cpufreq_register_em_with_opp,
 	.name = "imx6q-cpufreq",
-	.attr = cpufreq_generic_attr,
 	.suspend = cpufreq_generic_suspend,
 };
 
-- 
2.31.1.272.g89b43f80a514



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 14/33] cpufreq: mediatek: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (2 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 10/33] cpufreq: imx6q: Stop setting cpufreq_driver->attr field Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 24/33] cpufreq: scmi: " Viresh Kumar
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: linux-pm, Vincent Guittot, linux-kernel, linux-arm-kernel,
	linux-mediatek

The cpufreq core handles this for basic attributes now, the driver can skip
setting them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/mediatek-cpufreq-hw.c | 1 -
 drivers/cpufreq/mediatek-cpufreq.c    | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c
index 9252ebd60373..aa209f5527dc 100644
--- a/drivers/cpufreq/mediatek-cpufreq-hw.c
+++ b/drivers/cpufreq/mediatek-cpufreq-hw.c
@@ -293,7 +293,6 @@ static struct cpufreq_driver cpufreq_mtk_hw_driver = {
 	.register_em	= mtk_cpufreq_register_em,
 	.fast_switch	= mtk_cpufreq_hw_fast_switch,
 	.name		= "mtk-cpufreq-hw",
-	.attr		= cpufreq_generic_attr,
 };
 
 static int mtk_cpufreq_hw_driver_probe(struct platform_device *pdev)
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index 663f61565cf7..2656b88db378 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -618,7 +618,6 @@ static struct cpufreq_driver mtk_cpufreq_driver = {
 	.exit = mtk_cpufreq_exit,
 	.register_em = cpufreq_register_em_with_opp,
 	.name = "mtk-cpufreq",
-	.attr = cpufreq_generic_attr,
 };
 
 static int mtk_cpufreq_probe(struct platform_device *pdev)
-- 
2.31.1.272.g89b43f80a514



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 24/33] cpufreq: scmi: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (3 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 14/33] cpufreq: mediatek: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 12:01   ` Sudeep Holla
  2025-01-23 11:36 ` [PATCH 25/33] cpufreq: scpi: " Viresh Kumar
  2025-01-23 19:40 ` [PATCH 00/33] cpufreq: manage common sysfs attributes from core Rafael J. Wysocki
  6 siblings, 1 reply; 12+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Sudeep Holla, Cristian Marussi, Viresh Kumar
  Cc: linux-pm, Vincent Guittot, arm-scmi, linux-arm-kernel,
	linux-kernel

The cpufreq core handles this for basic attributes now, the driver can skip
setting them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/scmi-cpufreq.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index b8fe758aeb01..4a3ee59cb771 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -171,12 +171,6 @@ scmi_get_rate_limit(u32 domain, bool has_fast_switch)
 	return rate_limit;
 }
 
-static struct freq_attr *scmi_cpufreq_hw_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL,
-	NULL,
-};
-
 static int scmi_limit_notify_cb(struct notifier_block *nb, unsigned long event, void *data)
 {
 	struct scmi_data *priv = container_of(nb, struct scmi_data, limit_notify_nb);
@@ -309,7 +303,6 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 			dev_warn(cpu_dev, "failed to enable boost: %d\n", ret);
 			goto out_free_table;
 		} else {
-			scmi_cpufreq_hw_attr[1] = &cpufreq_freq_attr_scaling_boost_freqs;
 			scmi_cpufreq_driver.boost_enabled = true;
 		}
 	}
@@ -395,7 +388,6 @@ static struct cpufreq_driver scmi_cpufreq_driver = {
 		  CPUFREQ_NEED_INITIAL_FREQ_CHECK |
 		  CPUFREQ_IS_COOLING_DEV,
 	.verify	= cpufreq_generic_frequency_table_verify,
-	.attr	= scmi_cpufreq_hw_attr,
 	.target_index	= scmi_cpufreq_set_target,
 	.fast_switch	= scmi_cpufreq_fast_switch,
 	.get	= scmi_cpufreq_get_rate,
-- 
2.31.1.272.g89b43f80a514



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 25/33] cpufreq: scpi: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (4 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 24/33] cpufreq: scmi: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:52   ` Sudeep Holla
  2025-01-23 19:40 ` [PATCH 00/33] cpufreq: manage common sysfs attributes from core Rafael J. Wysocki
  6 siblings, 1 reply; 12+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Sudeep Holla, Cristian Marussi, Viresh Kumar
  Cc: linux-pm, Vincent Guittot, arm-scmi, linux-arm-kernel,
	linux-kernel

The cpufreq core handles this for basic attributes now, the driver can skip
setting them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/scpi-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c
index cd89c1b9832c..54574978986c 100644
--- a/drivers/cpufreq/scpi-cpufreq.c
+++ b/drivers/cpufreq/scpi-cpufreq.c
@@ -183,7 +183,6 @@ static struct cpufreq_driver scpi_cpufreq_driver = {
 		  CPUFREQ_NEED_INITIAL_FREQ_CHECK |
 		  CPUFREQ_IS_COOLING_DEV,
 	.verify	= cpufreq_generic_frequency_table_verify,
-	.attr	= cpufreq_generic_attr,
 	.get	= scpi_cpufreq_get_rate,
 	.init	= scpi_cpufreq_init,
 	.exit	= scpi_cpufreq_exit,
-- 
2.31.1.272.g89b43f80a514



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 25/33] cpufreq: scpi: Stop setting cpufreq_driver->attr field
  2025-01-23 11:36 ` [PATCH 25/33] cpufreq: scpi: " Viresh Kumar
@ 2025-01-23 11:52   ` Sudeep Holla
  0 siblings, 0 replies; 12+ messages in thread
From: Sudeep Holla @ 2025-01-23 11:52 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Cristian Marussi, Sudeep Holla, linux-pm,
	Vincent Guittot, arm-scmi, linux-arm-kernel, linux-kernel

On Thu, Jan 23, 2025 at 05:06:01PM +0530, Viresh Kumar wrote:
> The cpufreq core handles this for basic attributes now, the driver can skip
> setting them.
> 

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 24/33] cpufreq: scmi: Stop setting cpufreq_driver->attr field
  2025-01-23 11:36 ` [PATCH 24/33] cpufreq: scmi: " Viresh Kumar
@ 2025-01-23 12:01   ` Sudeep Holla
  2025-01-24  3:37     ` Viresh Kumar
  0 siblings, 1 reply; 12+ messages in thread
From: Sudeep Holla @ 2025-01-23 12:01 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Cristian Marussi, linux-pm, Vincent Guittot,
	arm-scmi, linux-arm-kernel, linux-kernel

On Thu, Jan 23, 2025 at 05:06:00PM +0530, Viresh Kumar wrote:
> The cpufreq core handles this for basic attributes now, the driver can skip
> setting them.
>

I know this is boiler plate commit message but it made me go check if boosts
are handled too even though I checked it in 01/33. So if possible, you can
add "basic attributes including boost frequencies", that would be good,
aligns with the change below and makes it easy to refer in the future if
required. Not a must, I will leave that to you. Anyways,

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

--
Regards,
Sudeep


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 00/33] cpufreq: manage common sysfs attributes from core
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (5 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 25/33] cpufreq: scpi: " Viresh Kumar
@ 2025-01-23 19:40 ` Rafael J. Wysocki
  6 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2025-01-23 19:40 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Alyssa Rosenzweig, AngeloGioacchino Del Regno,
	Broadcom internal kernel review list, Christophe Leroy,
	Cristian Marussi, Fabio Estevam, Florian Fainelli, Hector Martin,
	Huacai Chen, Jiaxun Yang, Jonathan Hunter, Kevin Hilman,
	Madhavan Srinivasan, Markus Mayer, Matthias Brugger,
	Michael Ellerman, Naveen N Rao, Nicholas Piggin,
	Pengutronix Kernel Team, Sascha Hauer, Shawn Guo, Sudeep Holla,
	Sven Peter, Thierry Reding, WANG Xuerui, linux-pm,
	Vincent Guittot, arm-scmi, asahi, imx, linux-arm-kernel,
	linux-arm-msm, linux-kernel, linux-mediatek, linux-mips,
	linux-omap, linuxppc-dev, linux-tegra, loongarch

On Thu, Jan 23, 2025 at 12:38 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> Hello,
>
> Most of the drivers add available and boost frequencies related attributes. This
> patch series tries to avoid duplication and simplify driver's code by managing
> these from core code.
>
> A quick search revealed that only the drivers that set the
> policy->freq_table field, enable these attributes. Which makes sense as
> well, since the show_available_freqs() helper works only if the
> freq_table is present.
>
> In order to simplify drivers, create the relevant sysfs files forcefully
> from cpufreq core.
>
> Pushed here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/core-attr

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

for the series.

Thanks!

> --
> Viresh
>
> Viresh Kumar (33):
>   cpufreq: Always create freq-table related sysfs file
>   cpufreq: dt: Stop setting cpufreq_driver->attr field
>   cpufreq: acpi: Stop setting common freq attributes
>   cpufreq: apple: Stop setting cpufreq_driver->attr field
>   cpufreq: bmips: Stop setting cpufreq_driver->attr field
>   cpufreq: brcmstb: Stop setting common freq attributes
>   cpufreq: davinci: Stop setting cpufreq_driver->attr field
>   cpufreq: e_powersaver: Stop setting cpufreq_driver->attr field
>   cpufreq: elanfreq: Stop setting cpufreq_driver->attr field
>   cpufreq: imx6q: Stop setting cpufreq_driver->attr field
>   cpufreq: kirkwood: Stop setting cpufreq_driver->attr field
>   cpufreq: longhaul: Stop setting cpufreq_driver->attr field
>   cpufreq: loongson: Stop setting cpufreq_driver->attr field
>   cpufreq: mediatek: Stop setting cpufreq_driver->attr field
>   cpufreq: omap: Stop setting cpufreq_driver->attr field
>   cpufreq: p4: Stop setting cpufreq_driver->attr field
>   cpufreq: pasemi: Stop setting cpufreq_driver->attr field
>   cpufreq: pmac: Stop setting cpufreq_driver->attr field
>   cpufreq: powernow: Stop setting cpufreq_driver->attr field
>   cpufreq: powernv: Stop setting common freq attributes
>   cpufreq: qcom: Stop setting cpufreq_driver->attr field
>   cpufreq: qoriq: Stop setting cpufreq_driver->attr field
>   cpufreq: sc520_freq: Stop setting cpufreq_driver->attr field
>   cpufreq: scmi: Stop setting cpufreq_driver->attr field
>   cpufreq: scpi: Stop setting cpufreq_driver->attr field
>   cpufreq: sh: Stop setting cpufreq_driver->attr field
>   cpufreq: spear: Stop setting cpufreq_driver->attr field
>   cpufreq: speedstep: Stop setting cpufreq_driver->attr field
>   cpufreq: tegra: Stop setting cpufreq_driver->attr field
>   cpufreq: vexpress: Stop setting cpufreq_driver->attr field
>   cpufreq: virtual: Stop setting cpufreq_driver->attr field
>   cpufreq: Remove cpufreq_generic_attrs
>   cpufreq: Stop checking for duplicate available/boost freq attributes
>
>  drivers/cpufreq/acpi-cpufreq.c         |  1 -
>  drivers/cpufreq/apple-soc-cpufreq.c    |  8 --------
>  drivers/cpufreq/bmips-cpufreq.c        |  1 -
>  drivers/cpufreq/brcmstb-avs-cpufreq.c  |  1 -
>  drivers/cpufreq/cpufreq-dt.c           |  8 --------
>  drivers/cpufreq/cpufreq.c              | 15 +++++++++++++++
>  drivers/cpufreq/davinci-cpufreq.c      |  1 -
>  drivers/cpufreq/e_powersaver.c         |  1 -
>  drivers/cpufreq/elanfreq.c             |  1 -
>  drivers/cpufreq/freq_table.c           |  8 --------
>  drivers/cpufreq/imx6q-cpufreq.c        |  1 -
>  drivers/cpufreq/kirkwood-cpufreq.c     |  1 -
>  drivers/cpufreq/longhaul.c             |  1 -
>  drivers/cpufreq/loongson2_cpufreq.c    |  1 -
>  drivers/cpufreq/loongson3_cpufreq.c    |  1 -
>  drivers/cpufreq/mediatek-cpufreq-hw.c  |  1 -
>  drivers/cpufreq/mediatek-cpufreq.c     |  1 -
>  drivers/cpufreq/omap-cpufreq.c         |  1 -
>  drivers/cpufreq/p4-clockmod.c          |  1 -
>  drivers/cpufreq/pasemi-cpufreq.c       |  1 -
>  drivers/cpufreq/pmac32-cpufreq.c       |  1 -
>  drivers/cpufreq/pmac64-cpufreq.c       |  1 -
>  drivers/cpufreq/powernow-k6.c          |  1 -
>  drivers/cpufreq/powernow-k7.c          |  1 -
>  drivers/cpufreq/powernow-k8.c          |  1 -
>  drivers/cpufreq/powernv-cpufreq.c      |  2 --
>  drivers/cpufreq/qcom-cpufreq-hw.c      |  7 -------
>  drivers/cpufreq/qoriq-cpufreq.c        |  1 -
>  drivers/cpufreq/sc520_freq.c           |  1 -
>  drivers/cpufreq/scmi-cpufreq.c         |  8 --------
>  drivers/cpufreq/scpi-cpufreq.c         |  1 -
>  drivers/cpufreq/sh-cpufreq.c           |  1 -
>  drivers/cpufreq/spear-cpufreq.c        |  1 -
>  drivers/cpufreq/speedstep-centrino.c   |  1 -
>  drivers/cpufreq/speedstep-ich.c        |  1 -
>  drivers/cpufreq/speedstep-smi.c        |  1 -
>  drivers/cpufreq/tegra186-cpufreq.c     |  1 -
>  drivers/cpufreq/tegra194-cpufreq.c     |  1 -
>  drivers/cpufreq/vexpress-spc-cpufreq.c |  1 -
>  drivers/cpufreq/virtual-cpufreq.c      |  1 -
>  include/linux/cpufreq.h                |  1 -
>  41 files changed, 15 insertions(+), 75 deletions(-)
>
> --
> 2.31.1.272.g89b43f80a514
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 06/33] cpufreq: brcmstb: Stop setting common freq attributes
  2025-01-23 11:35 ` [PATCH 06/33] cpufreq: brcmstb: Stop setting common freq attributes Viresh Kumar
@ 2025-01-23 20:27   ` Florian Fainelli
  0 siblings, 0 replies; 12+ messages in thread
From: Florian Fainelli @ 2025-01-23 20:27 UTC (permalink / raw)
  To: Viresh Kumar, Rafael J. Wysocki, Markus Mayer,
	Broadcom internal kernel review list
  Cc: linux-pm, Vincent Guittot, linux-arm-kernel, linux-kernel

On 1/23/25 03:35, Viresh Kumar wrote:
> The cpufreq core handles this now, the driver can skip setting it.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 24/33] cpufreq: scmi: Stop setting cpufreq_driver->attr field
  2025-01-23 12:01   ` Sudeep Holla
@ 2025-01-24  3:37     ` Viresh Kumar
  0 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2025-01-24  3:37 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Rafael J. Wysocki, Cristian Marussi, linux-pm, Vincent Guittot,
	arm-scmi, linux-arm-kernel, linux-kernel

On 23-01-25, 12:01, Sudeep Holla wrote:
> On Thu, Jan 23, 2025 at 05:06:00PM +0530, Viresh Kumar wrote:
> > The cpufreq core handles this for basic attributes now, the driver can skip
> > setting them.
> >
> 
> I know this is boiler plate commit message but it made me go check if boosts
> are handled too even though I checked it in 01/33. So if possible, you can
> add "basic attributes including boost frequencies", that would be good,
> aligns with the change below and makes it easy to refer in the future if
> required. Not a must, I will leave that to you. Anyways,

Even if it creates doubt for a single person, its better to go fix it
(for all commits).

I will do that while applying the series (unless I need to send
another version now for other reasons).

-- 
viresh


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-01-24  3:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
2025-01-23 11:35 ` [PATCH 04/33] cpufreq: apple: Stop setting cpufreq_driver->attr field Viresh Kumar
2025-01-23 11:35 ` [PATCH 06/33] cpufreq: brcmstb: Stop setting common freq attributes Viresh Kumar
2025-01-23 20:27   ` Florian Fainelli
2025-01-23 11:35 ` [PATCH 10/33] cpufreq: imx6q: Stop setting cpufreq_driver->attr field Viresh Kumar
2025-01-23 11:35 ` [PATCH 14/33] cpufreq: mediatek: " Viresh Kumar
2025-01-23 11:36 ` [PATCH 24/33] cpufreq: scmi: " Viresh Kumar
2025-01-23 12:01   ` Sudeep Holla
2025-01-24  3:37     ` Viresh Kumar
2025-01-23 11:36 ` [PATCH 25/33] cpufreq: scpi: " Viresh Kumar
2025-01-23 11:52   ` Sudeep Holla
2025-01-23 19:40 ` [PATCH 00/33] cpufreq: manage common sysfs attributes from core Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).