linux-pm.vger.kernel.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 01/33] cpufreq: Always create freq-table related sysfs file Viresh Kumar
                   ` (33 more replies)
  0 siblings, 34 replies; 43+ 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] 43+ messages in thread

* [PATCH 01/33] cpufreq: Always create freq-table related sysfs file
  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 19:39   ` Rafael J. Wysocki
  2025-01-23 11:35 ` [PATCH 02/33] cpufreq: dt: Stop setting cpufreq_driver->attr field Viresh Kumar
                   ` (32 subsequent siblings)
  33 siblings, 1 reply; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, linux-kernel

Currently it is left for the individual drivers to set the available and
boost frequencies related attributes in the cpufreq_driver->attr field.
Some drivers provide them, while others don't.

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.

For now, skip adding them twice. This can be removed once all the
drivers are updated.

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

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 1a4cae54a01b..973bd6e4bdd4 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1058,9 +1058,31 @@ static int cpufreq_add_dev_interface(struct cpufreq_policy *policy)
 	struct freq_attr **drv_attr;
 	int ret = 0;
 
+	/* Attributes that need freq_table */
+	if (policy->freq_table) {
+		ret = sysfs_create_file(&policy->kobj,
+				&cpufreq_freq_attr_scaling_available_freqs.attr);
+		if (ret)
+			return ret;
+
+		if (cpufreq_boost_supported()) {
+			ret = sysfs_create_file(&policy->kobj,
+				&cpufreq_freq_attr_scaling_boost_freqs.attr);
+			if (ret)
+				return ret;
+		}
+	}
+
 	/* set up files for this cpu device */
 	drv_attr = cpufreq_driver->attr;
 	while (drv_attr && *drv_attr) {
+		/* These are already added, skip them */
+		if (*drv_attr == &cpufreq_freq_attr_scaling_available_freqs ||
+		    *drv_attr == &cpufreq_freq_attr_scaling_boost_freqs) {
+			drv_attr++;
+			continue;
+		}
+
 		ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
 		if (ret)
 			return ret;
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 02/33] cpufreq: dt: 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 01/33] cpufreq: Always create freq-table related sysfs file Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 03/33] cpufreq: acpi: Stop setting common freq attributes Viresh Kumar
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/cpufreq-dt.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 3a7c3372bda7..072ccf0c2e41 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -36,12 +36,6 @@ struct private_data {
 
 static LIST_HEAD(priv_list);
 
-static struct freq_attr *cpufreq_dt_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL,   /* Extra space for boost-attr if required */
-	NULL,
-};
-
 static struct private_data *cpufreq_dt_find_data(int cpu)
 {
 	struct private_data *priv;
@@ -126,7 +120,6 @@ static int cpufreq_init(struct cpufreq_policy *policy)
 		ret = cpufreq_enable_boost_support();
 		if (ret)
 			goto out_clk_put;
-		cpufreq_dt_attr[1] = &cpufreq_freq_attr_scaling_boost_freqs;
 	}
 
 	return 0;
@@ -169,7 +162,6 @@ static struct cpufreq_driver dt_cpufreq_driver = {
 	.offline = cpufreq_offline,
 	.register_em = cpufreq_register_em_with_opp,
 	.name = "cpufreq-dt",
-	.attr = cpufreq_dt_attr,
 	.suspend = cpufreq_generic_suspend,
 };
 
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 03/33] cpufreq: acpi: 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 01/33] cpufreq: Always create freq-table related sysfs file Viresh Kumar
  2025-01-23 11:35 ` [PATCH 02/33] cpufreq: dt: Stop setting cpufreq_driver->attr field Viresh Kumar
@ 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
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, linux-kernel

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

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

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index c9ebacf5c88e..dcffddba5af5 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -936,7 +936,6 @@ static int acpi_cpufreq_resume(struct cpufreq_policy *policy)
 }
 
 static struct freq_attr *acpi_cpufreq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
 	&freqdomain_cpus,
 #ifdef CONFIG_X86_ACPI_CPUFREQ_CPB
 	&cpb,
-- 
2.31.1.272.g89b43f80a514


^ permalink raw reply related	[flat|nested] 43+ 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
                   ` (2 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 03/33] cpufreq: acpi: Stop setting common freq attributes Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 05/33] cpufreq: bmips: " Viresh Kumar
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 05/33] cpufreq: bmips: 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 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 06/33] cpufreq: brcmstb: Stop setting common freq attributes Viresh Kumar
                   ` (28 subsequent siblings)
  33 siblings, 1 reply; 43+ 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
  Cc: linux-pm, Vincent Guittot, 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/bmips-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/bmips-cpufreq.c b/drivers/cpufreq/bmips-cpufreq.c
index 17a4c174553d..36051880640b 100644
--- a/drivers/cpufreq/bmips-cpufreq.c
+++ b/drivers/cpufreq/bmips-cpufreq.c
@@ -150,7 +150,6 @@ static struct cpufreq_driver bmips_cpufreq_driver = {
 	.get		= bmips_cpufreq_get,
 	.init		= bmips_cpufreq_init,
 	.exit		= bmips_cpufreq_exit,
-	.attr		= cpufreq_generic_attr,
 	.name		= BMIPS_CPUFREQ_PREFIX,
 };
 
-- 
2.31.1.272.g89b43f80a514


^ permalink raw reply related	[flat|nested] 43+ 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
                   ` (4 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 05/33] cpufreq: bmips: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 20:27   ` Florian Fainelli
  2025-01-23 11:35 ` [PATCH 07/33] cpufreq: davinci: Stop setting cpufreq_driver->attr field Viresh Kumar
                   ` (27 subsequent siblings)
  33 siblings, 1 reply; 43+ 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] 43+ messages in thread

* [PATCH 07/33] cpufreq: davinci: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (5 preceding siblings ...)
  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 08/33] cpufreq: e_powersaver: " Viresh Kumar
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/davinci-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c
index 8736be3a06ce..2c277eb3795a 100644
--- a/drivers/cpufreq/davinci-cpufreq.c
+++ b/drivers/cpufreq/davinci-cpufreq.c
@@ -101,7 +101,6 @@ static struct cpufreq_driver davinci_driver = {
 	.get		= cpufreq_generic_get,
 	.init		= davinci_cpu_init,
 	.name		= "davinci",
-	.attr		= cpufreq_generic_attr,
 };
 
 static int __init davinci_cpufreq_probe(struct platform_device *pdev)
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 08/33] cpufreq: e_powersaver: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (6 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 07/33] cpufreq: davinci: Stop setting cpufreq_driver->attr field Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 09/33] cpufreq: elanfreq: " Viresh Kumar
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/e_powersaver.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
index 6e958b09e1b5..d23a97ba6478 100644
--- a/drivers/cpufreq/e_powersaver.c
+++ b/drivers/cpufreq/e_powersaver.c
@@ -376,7 +376,6 @@ static struct cpufreq_driver eps_driver = {
 	.exit		= eps_cpu_exit,
 	.get		= eps_get,
 	.name		= "e_powersaver",
-	.attr		= cpufreq_generic_attr,
 };
 
 
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 09/33] cpufreq: elanfreq: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (7 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 08/33] cpufreq: e_powersaver: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 10/33] cpufreq: imx6q: " Viresh Kumar
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/elanfreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c
index 4ce5eb35dc46..36494b855e41 100644
--- a/drivers/cpufreq/elanfreq.c
+++ b/drivers/cpufreq/elanfreq.c
@@ -194,7 +194,6 @@ static struct cpufreq_driver elanfreq_driver = {
 	.target_index	= elanfreq_target,
 	.init		= elanfreq_cpu_init,
 	.name		= "elanfreq",
-	.attr		= cpufreq_generic_attr,
 };
 
 static const struct x86_cpu_id elan_id[] = {
-- 
2.31.1.272.g89b43f80a514


^ permalink raw reply related	[flat|nested] 43+ 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
                   ` (8 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 09/33] cpufreq: elanfreq: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 11/33] cpufreq: kirkwood: " Viresh Kumar
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 11/33] cpufreq: kirkwood: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (9 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 10/33] cpufreq: imx6q: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 12/33] cpufreq: longhaul: " Viresh Kumar
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/kirkwood-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index 312f2654d1d5..24b285cbeb8d 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -96,7 +96,6 @@ static struct cpufreq_driver kirkwood_cpufreq_driver = {
 	.target_index = kirkwood_cpufreq_target,
 	.init	= kirkwood_cpufreq_cpu_init,
 	.name	= "kirkwood-cpufreq",
-	.attr	= cpufreq_generic_attr,
 };
 
 static int kirkwood_cpufreq_probe(struct platform_device *pdev)
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 12/33] cpufreq: longhaul: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (10 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 11/33] cpufreq: kirkwood: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 13/33] cpufreq: loongson: " Viresh Kumar
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/longhaul.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index bd6fe8638d39..68ccd73c8129 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -906,7 +906,6 @@ static struct cpufreq_driver longhaul_driver = {
 	.get	= longhaul_get,
 	.init	= longhaul_cpu_init,
 	.name	= "longhaul",
-	.attr	= cpufreq_generic_attr,
 };
 
 static const struct x86_cpu_id longhaul_id[] = {
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 13/33] cpufreq: loongson: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (11 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 12/33] cpufreq: longhaul: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 14/33] cpufreq: mediatek: " Viresh Kumar
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Jiaxun Yang, Viresh Kumar, Huacai Chen,
	WANG Xuerui
  Cc: linux-pm, Vincent Guittot, linux-mips, linux-kernel, loongarch

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

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

diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
index ed1a6dbad638..39a6c4315a60 100644
--- a/drivers/cpufreq/loongson2_cpufreq.c
+++ b/drivers/cpufreq/loongson2_cpufreq.c
@@ -91,7 +91,6 @@ static struct cpufreq_driver loongson2_cpufreq_driver = {
 	.verify = cpufreq_generic_frequency_table_verify,
 	.target_index = loongson2_cpufreq_target,
 	.get = cpufreq_generic_get,
-	.attr = cpufreq_generic_attr,
 };
 
 static const struct platform_device_id platform_device_ids[] = {
diff --git a/drivers/cpufreq/loongson3_cpufreq.c b/drivers/cpufreq/loongson3_cpufreq.c
index bd34bf0fafa5..ea516b939c44 100644
--- a/drivers/cpufreq/loongson3_cpufreq.c
+++ b/drivers/cpufreq/loongson3_cpufreq.c
@@ -337,7 +337,6 @@ static struct cpufreq_driver loongson3_cpufreq_driver = {
 	.offline = loongson3_cpufreq_cpu_offline,
 	.get = loongson3_cpufreq_get,
 	.target_index = loongson3_cpufreq_target,
-	.attr = cpufreq_generic_attr,
 	.verify = cpufreq_generic_frequency_table_verify,
 	.suspend = cpufreq_generic_suspend,
 };
-- 
2.31.1.272.g89b43f80a514


^ permalink raw reply related	[flat|nested] 43+ 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
                   ` (12 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 13/33] cpufreq: loongson: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 15/33] cpufreq: omap: " Viresh Kumar
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 43+ 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] 43+ messages in thread

* [PATCH 15/33] cpufreq: omap: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (13 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 14/33] cpufreq: mediatek: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 16/33] cpufreq: p4: " Viresh Kumar
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Kevin Hilman, Viresh Kumar
  Cc: linux-pm, Vincent Guittot, linux-omap, 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/omap-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 106220c0fd11..bbb01d93b54b 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -147,7 +147,6 @@ static struct cpufreq_driver omap_driver = {
 	.exit		= omap_cpu_exit,
 	.register_em	= cpufreq_register_em_with_opp,
 	.name		= "omap",
-	.attr		= cpufreq_generic_attr,
 };
 
 static int omap_cpufreq_probe(struct platform_device *pdev)
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 16/33] cpufreq: p4: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (14 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 15/33] cpufreq: omap: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 17/33] cpufreq: pasemi: " Viresh Kumar
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/p4-clockmod.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c
index ef0a3216a386..69c19233fcd4 100644
--- a/drivers/cpufreq/p4-clockmod.c
+++ b/drivers/cpufreq/p4-clockmod.c
@@ -227,7 +227,6 @@ static struct cpufreq_driver p4clockmod_driver = {
 	.init		= cpufreq_p4_cpu_init,
 	.get		= cpufreq_p4_get,
 	.name		= "p4-clockmod",
-	.attr		= cpufreq_generic_attr,
 };
 
 static const struct x86_cpu_id cpufreq_p4_id[] = {
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 17/33] cpufreq: pasemi: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (15 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 16/33] cpufreq: p4: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 18/33] cpufreq: pmac: " Viresh Kumar
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Naveen N Rao, Madhavan Srinivasan, Viresh Kumar
  Cc: linux-pm, Vincent Guittot, linuxppc-dev, 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/pasemi-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c
index 5fc9cb480516..a3931349360f 100644
--- a/drivers/cpufreq/pasemi-cpufreq.c
+++ b/drivers/cpufreq/pasemi-cpufreq.c
@@ -245,7 +245,6 @@ static struct cpufreq_driver pas_cpufreq_driver = {
 	.exit		= pas_cpufreq_cpu_exit,
 	.verify		= cpufreq_generic_frequency_table_verify,
 	.target_index	= pas_cpufreq_target,
-	.attr		= cpufreq_generic_attr,
 };
 
 /*
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 18/33] cpufreq: pmac: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (16 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 17/33] cpufreq: pasemi: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 19/33] cpufreq: powernow: " Viresh Kumar
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N Rao,
	Madhavan Srinivasan
  Cc: linux-pm, Vincent Guittot, linuxppc-dev, linux-kernel

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

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

diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 6c9f0888a2a7..a22c22bd693a 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -439,7 +439,6 @@ static struct cpufreq_driver pmac_cpufreq_driver = {
 	.suspend	= pmac_cpufreq_suspend,
 	.resume		= pmac_cpufreq_resume,
 	.flags		= CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING,
-	.attr		= cpufreq_generic_attr,
 	.name		= "powermac",
 };
 
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 74ff6c47df29..80897ec8f00e 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -332,7 +332,6 @@ static struct cpufreq_driver g5_cpufreq_driver = {
 	.verify		= cpufreq_generic_frequency_table_verify,
 	.target_index	= g5_cpufreq_target,
 	.get		= g5_cpufreq_get_speed,
-	.attr 		= cpufreq_generic_attr,
 };
 
 
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 19/33] cpufreq: powernow: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (17 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 18/33] cpufreq: pmac: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 20/33] cpufreq: powernv: Stop setting common freq attributes Viresh Kumar
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/powernow-k6.c | 1 -
 drivers/cpufreq/powernow-k7.c | 1 -
 drivers/cpufreq/powernow-k8.c | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c
index f0a4a6c31204..99d2244e03b0 100644
--- a/drivers/cpufreq/powernow-k6.c
+++ b/drivers/cpufreq/powernow-k6.c
@@ -253,7 +253,6 @@ static struct cpufreq_driver powernow_k6_driver = {
 	.exit		= powernow_k6_cpu_exit,
 	.get		= powernow_k6_get,
 	.name		= "powernow-k6",
-	.attr		= cpufreq_generic_attr,
 };
 
 static const struct x86_cpu_id powernow_k6_ids[] = {
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 4271446c8725..fb2197dc170f 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -667,7 +667,6 @@ static struct cpufreq_driver powernow_driver = {
 	.init		= powernow_cpu_init,
 	.exit		= powernow_cpu_exit,
 	.name		= "powernow-k7",
-	.attr		= cpufreq_generic_attr,
 };
 
 static int __init powernow_init(void)
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index a01170f7d01c..4e3ba6e68c32 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1143,7 +1143,6 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
 	.exit		= powernowk8_cpu_exit,
 	.get		= powernowk8_get,
 	.name		= "powernow-k8",
-	.attr		= cpufreq_generic_attr,
 };
 
 static void __request_acpi_cpufreq(void)
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 20/33] cpufreq: powernv: Stop setting common freq attributes
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (18 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 19/33] cpufreq: powernow: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-02-03  9:53   ` [PATCH V1.1 " Viresh Kumar
  2025-01-23 11:35 ` [PATCH 21/33] cpufreq: qcom: Stop setting cpufreq_driver->attr field Viresh Kumar
                   ` (13 subsequent siblings)
  33 siblings, 1 reply; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N Rao,
	Madhavan Srinivasan
  Cc: linux-pm, Vincent Guittot, linuxppc-dev, 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/powernv-cpufreq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 8de759247771..0c3e907c58bc 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -388,9 +388,7 @@ static struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
 #define SCALING_BOOST_FREQS_ATTR_INDEX		2
 
 static struct freq_attr *powernv_cpu_freq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
 	&cpufreq_freq_attr_cpuinfo_nominal_freq,
-	&cpufreq_freq_attr_scaling_boost_freqs,
 	NULL,
 };
 
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 21/33] cpufreq: qcom: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (19 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 20/33] cpufreq: powernv: Stop setting common freq attributes Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 22/33] cpufreq: qoriq: " Viresh Kumar
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar
  Cc: linux-pm, Vincent Guittot, linux-arm-msm, 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/qcom-cpufreq-hw.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index b2e7e89feaac..7d83d7d2ccc8 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -595,12 +595,6 @@ static void qcom_cpufreq_ready(struct cpufreq_policy *policy)
 		enable_irq(data->throttle_irq);
 }
 
-static struct freq_attr *qcom_cpufreq_hw_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	&cpufreq_freq_attr_scaling_boost_freqs,
-	NULL
-};
-
 static struct cpufreq_driver cpufreq_qcom_hw_driver = {
 	.flags		= CPUFREQ_NEED_INITIAL_FREQ_CHECK |
 			  CPUFREQ_HAVE_GOVERNOR_PER_POLICY |
@@ -615,7 +609,6 @@ static struct cpufreq_driver cpufreq_qcom_hw_driver = {
 	.register_em	= cpufreq_register_em_with_opp,
 	.fast_switch    = qcom_cpufreq_hw_fast_switch,
 	.name		= "qcom-cpufreq-hw",
-	.attr		= qcom_cpufreq_hw_attr,
 	.ready		= qcom_cpufreq_ready,
 };
 
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 22/33] cpufreq: qoriq: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (20 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 21/33] cpufreq: qcom: Stop setting cpufreq_driver->attr field Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:35 ` [PATCH 23/33] cpufreq: sc520_freq: " Viresh Kumar
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/qoriq-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index a37ce051236c..8d1f5ac59132 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -254,7 +254,6 @@ static struct cpufreq_driver qoriq_cpufreq_driver = {
 	.verify		= cpufreq_generic_frequency_table_verify,
 	.target_index	= qoriq_cpufreq_target,
 	.get		= cpufreq_generic_get,
-	.attr		= cpufreq_generic_attr,
 };
 
 static const struct of_device_id qoriq_cpufreq_blacklist[] = {
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 23/33] cpufreq: sc520_freq: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (21 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 22/33] cpufreq: qoriq: " Viresh Kumar
@ 2025-01-23 11:35 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 24/33] cpufreq: scmi: " Viresh Kumar
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/sc520_freq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c
index 330c8d6cf93c..103d2519dff7 100644
--- a/drivers/cpufreq/sc520_freq.c
+++ b/drivers/cpufreq/sc520_freq.c
@@ -92,7 +92,6 @@ static struct cpufreq_driver sc520_freq_driver = {
 	.target_index = sc520_freq_target,
 	.init	= sc520_freq_cpu_init,
 	.name	= "sc520_freq",
-	.attr	= cpufreq_generic_attr,
 };
 
 static const struct x86_cpu_id sc520_ids[] = {
-- 
2.31.1.272.g89b43f80a514


^ permalink raw reply related	[flat|nested] 43+ 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
                   ` (22 preceding siblings ...)
  2025-01-23 11:35 ` [PATCH 23/33] cpufreq: sc520_freq: " 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
                   ` (9 subsequent siblings)
  33 siblings, 1 reply; 43+ 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] 43+ 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
                   ` (23 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 11:36 ` [PATCH 26/33] cpufreq: sh: " Viresh Kumar
                   ` (8 subsequent siblings)
  33 siblings, 1 reply; 43+ 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] 43+ messages in thread

* [PATCH 26/33] cpufreq: sh: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (24 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 25/33] cpufreq: scpi: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 27/33] cpufreq: spear: " Viresh Kumar
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/sh-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c
index aa74036d0420..9c0b01e00508 100644
--- a/drivers/cpufreq/sh-cpufreq.c
+++ b/drivers/cpufreq/sh-cpufreq.c
@@ -151,7 +151,6 @@ static struct cpufreq_driver sh_cpufreq_driver = {
 	.verify		= sh_cpufreq_verify,
 	.init		= sh_cpufreq_cpu_init,
 	.exit		= sh_cpufreq_cpu_exit,
-	.attr		= cpufreq_generic_attr,
 };
 
 static int __init sh_cpufreq_module_init(void)
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 27/33] cpufreq: spear: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (25 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 26/33] cpufreq: sh: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 28/33] cpufreq: speedstep: " Viresh Kumar
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/spear-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index d8ab5b01d46d..707c71090cc3 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -165,7 +165,6 @@ static struct cpufreq_driver spear_cpufreq_driver = {
 	.target_index	= spear_cpufreq_target,
 	.get		= cpufreq_generic_get,
 	.init		= spear_cpufreq_init,
-	.attr		= cpufreq_generic_attr,
 };
 
 static int spear_cpufreq_probe(struct platform_device *pdev)
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 28/33] cpufreq: speedstep: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (26 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 27/33] cpufreq: spear: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 29/33] cpufreq: tegra: " Viresh Kumar
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/speedstep-centrino.c | 1 -
 drivers/cpufreq/speedstep-ich.c      | 1 -
 drivers/cpufreq/speedstep-smi.c      | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c
index 3fafedb983b5..3e6e85a92212 100644
--- a/drivers/cpufreq/speedstep-centrino.c
+++ b/drivers/cpufreq/speedstep-centrino.c
@@ -507,7 +507,6 @@ static struct cpufreq_driver centrino_driver = {
 	.verify		= cpufreq_generic_frequency_table_verify,
 	.target_index	= centrino_target,
 	.get		= get_cur_freq,
-	.attr		= cpufreq_generic_attr,
 };
 
 /*
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c
index f2076d72bf39..262cfbde9ca7 100644
--- a/drivers/cpufreq/speedstep-ich.c
+++ b/drivers/cpufreq/speedstep-ich.c
@@ -315,7 +315,6 @@ static struct cpufreq_driver speedstep_driver = {
 	.target_index = speedstep_target,
 	.init	= speedstep_cpu_init,
 	.get	= speedstep_get,
-	.attr	= cpufreq_generic_attr,
 };
 
 static const struct x86_cpu_id ss_smi_ids[] = {
diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c
index 0ce9d4b6dfcc..39265884c3f1 100644
--- a/drivers/cpufreq/speedstep-smi.c
+++ b/drivers/cpufreq/speedstep-smi.c
@@ -295,7 +295,6 @@ static struct cpufreq_driver speedstep_driver = {
 	.init		= speedstep_cpu_init,
 	.get		= speedstep_get,
 	.resume		= speedstep_resume,
-	.attr		= cpufreq_generic_attr,
 };
 
 static const struct x86_cpu_id ss_smi_ids[] = {
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 29/33] cpufreq: tegra: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (27 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 28/33] cpufreq: speedstep: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 30/33] cpufreq: vexpress: " Viresh Kumar
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Thierry Reding, Jonathan Hunter
  Cc: linux-pm, Vincent Guittot, linux-tegra, linux-kernel

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

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

diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index c7761eb99f3c..b54a77be54e6 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -123,7 +123,6 @@ static struct cpufreq_driver tegra186_cpufreq_driver = {
 	.verify = cpufreq_generic_frequency_table_verify,
 	.target_index = tegra186_cpufreq_set_target,
 	.init = tegra186_cpufreq_init,
-	.attr = cpufreq_generic_attr,
 };
 
 static struct cpufreq_frequency_table *init_vhint_table(
diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
index 9055dd398e7f..9b4f516f313e 100644
--- a/drivers/cpufreq/tegra194-cpufreq.c
+++ b/drivers/cpufreq/tegra194-cpufreq.c
@@ -589,7 +589,6 @@ static struct cpufreq_driver tegra194_cpufreq_driver = {
 	.exit = tegra194_cpufreq_exit,
 	.online = tegra194_cpufreq_online,
 	.offline = tegra194_cpufreq_offline,
-	.attr = cpufreq_generic_attr,
 };
 
 static struct tegra_cpufreq_ops tegra194_cpufreq_ops = {
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 30/33] cpufreq: vexpress: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (28 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 29/33] cpufreq: tegra: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:50   ` Sudeep Holla
  2025-01-23 11:36 ` [PATCH 31/33] cpufreq: virtual: " Viresh Kumar
                   ` (3 subsequent siblings)
  33 siblings, 1 reply; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Sudeep Holla
  Cc: linux-pm, Vincent Guittot, 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/vexpress-spc-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c
index 0f86cdb7ec8a..65fea47b82e6 100644
--- a/drivers/cpufreq/vexpress-spc-cpufreq.c
+++ b/drivers/cpufreq/vexpress-spc-cpufreq.c
@@ -471,7 +471,6 @@ static struct cpufreq_driver ve_spc_cpufreq_driver = {
 	.init			= ve_spc_cpufreq_init,
 	.exit			= ve_spc_cpufreq_exit,
 	.register_em		= cpufreq_register_em_with_opp,
-	.attr			= cpufreq_generic_attr,
 };
 
 #ifdef CONFIG_BL_SWITCHER
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 31/33] cpufreq: virtual: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (29 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 30/33] cpufreq: vexpress: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 32/33] cpufreq: Remove cpufreq_generic_attrs Viresh Kumar
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, 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/virtual-cpufreq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/cpufreq/virtual-cpufreq.c b/drivers/cpufreq/virtual-cpufreq.c
index a050b3a6737f..45becb92aa4a 100644
--- a/drivers/cpufreq/virtual-cpufreq.c
+++ b/drivers/cpufreq/virtual-cpufreq.c
@@ -265,7 +265,6 @@ static struct cpufreq_driver cpufreq_virt_driver = {
 	.verify		= virt_cpufreq_verify_policy,
 	.target		= virt_cpufreq_target,
 	.fast_switch	= virt_cpufreq_fast_switch,
-	.attr		= cpufreq_generic_attr,
 };
 
 static int virt_cpufreq_driver_probe(struct platform_device *pdev)
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 32/33] cpufreq: Remove cpufreq_generic_attrs
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (30 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 31/33] cpufreq: virtual: " Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 11:36 ` [PATCH 33/33] cpufreq: Stop checking for duplicate available/boost freq attributes Viresh Kumar
  2025-01-23 19:40 ` [PATCH 00/33] cpufreq: manage common sysfs attributes from core Rafael J. Wysocki
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, linux-kernel

All users of cpufreq_generic_attr are migrated now, remove it. While at
it, also stop exporting attributes for available and boost frequencies
as they are only used by cpufreq core now.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/freq_table.c | 8 --------
 include/linux/cpufreq.h      | 1 -
 2 files changed, 9 deletions(-)

diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
index 10e80d912b8d..16e56f2fcee4 100644
--- a/drivers/cpufreq/freq_table.c
+++ b/drivers/cpufreq/freq_table.c
@@ -276,7 +276,6 @@ static ssize_t scaling_available_frequencies_show(struct cpufreq_policy *policy,
 	return show_available_freqs(policy, buf, false);
 }
 cpufreq_attr_available_freq(scaling_available);
-EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs);
 
 /*
  * scaling_boost_frequencies_show - show available boost frequencies for
@@ -288,13 +287,6 @@ static ssize_t scaling_boost_frequencies_show(struct cpufreq_policy *policy,
 	return show_available_freqs(policy, buf, true);
 }
 cpufreq_attr_available_freq(scaling_boost);
-EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_boost_freqs);
-
-struct freq_attr *cpufreq_generic_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
-	NULL,
-};
-EXPORT_SYMBOL_GPL(cpufreq_generic_attr);
 
 static int set_freq_table_sorted(struct cpufreq_policy *policy)
 {
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 7fe0981a7e46..d237ef91d1f1 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -1198,7 +1198,6 @@ void arch_set_freq_scale(const struct cpumask *cpus,
 /* the following are really really optional */
 extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
 extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs;
-extern struct freq_attr *cpufreq_generic_attr[];
 int cpufreq_table_validate_and_sort(struct cpufreq_policy *policy);
 
 unsigned int cpufreq_generic_get(unsigned int cpu);
-- 
2.31.1.272.g89b43f80a514


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

* [PATCH 33/33] cpufreq: Stop checking for duplicate available/boost freq attributes
  2025-01-23 11:35 [PATCH 00/33] cpufreq: manage common sysfs attributes from core Viresh Kumar
                   ` (31 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 32/33] cpufreq: Remove cpufreq_generic_attrs Viresh Kumar
@ 2025-01-23 11:36 ` Viresh Kumar
  2025-01-23 19:40 ` [PATCH 00/33] cpufreq: manage common sysfs attributes from core Rafael J. Wysocki
  33 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-01-23 11:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar; +Cc: linux-pm, Vincent Guittot, linux-kernel

None of the drivers set these attributes directly now, remove the
unnecessary check.

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

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 973bd6e4bdd4..2569f9980d2c 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1076,13 +1076,6 @@ static int cpufreq_add_dev_interface(struct cpufreq_policy *policy)
 	/* set up files for this cpu device */
 	drv_attr = cpufreq_driver->attr;
 	while (drv_attr && *drv_attr) {
-		/* These are already added, skip them */
-		if (*drv_attr == &cpufreq_freq_attr_scaling_available_freqs ||
-		    *drv_attr == &cpufreq_freq_attr_scaling_boost_freqs) {
-			drv_attr++;
-			continue;
-		}
-
 		ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
 		if (ret)
 			return ret;
-- 
2.31.1.272.g89b43f80a514


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

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

On Thu, Jan 23, 2025 at 05:06:06PM +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] 43+ 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; 43+ 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] 43+ 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; 43+ 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] 43+ messages in thread

* Re: [PATCH 01/33] cpufreq: Always create freq-table related sysfs file
  2025-01-23 11:35 ` [PATCH 01/33] cpufreq: Always create freq-table related sysfs file Viresh Kumar
@ 2025-01-23 19:39   ` Rafael J. Wysocki
  0 siblings, 0 replies; 43+ messages in thread
From: Rafael J. Wysocki @ 2025-01-23 19:39 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: Rafael J. Wysocki, linux-pm, Vincent Guittot, linux-kernel

On Thu, Jan 23, 2025 at 12:38 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> Currently it is left for the individual drivers to set the available and
> boost frequencies related attributes in the cpufreq_driver->attr field.
> Some drivers provide them, while others don't.
>
> 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.
>
> For now, skip adding them twice. This can be removed once all the
> drivers are updated.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

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

> ---
>  drivers/cpufreq/cpufreq.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 1a4cae54a01b..973bd6e4bdd4 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1058,9 +1058,31 @@ static int cpufreq_add_dev_interface(struct cpufreq_policy *policy)
>         struct freq_attr **drv_attr;
>         int ret = 0;
>
> +       /* Attributes that need freq_table */
> +       if (policy->freq_table) {
> +               ret = sysfs_create_file(&policy->kobj,
> +                               &cpufreq_freq_attr_scaling_available_freqs.attr);
> +               if (ret)
> +                       return ret;
> +
> +               if (cpufreq_boost_supported()) {
> +                       ret = sysfs_create_file(&policy->kobj,
> +                               &cpufreq_freq_attr_scaling_boost_freqs.attr);
> +                       if (ret)
> +                               return ret;
> +               }
> +       }
> +
>         /* set up files for this cpu device */
>         drv_attr = cpufreq_driver->attr;
>         while (drv_attr && *drv_attr) {
> +               /* These are already added, skip them */
> +               if (*drv_attr == &cpufreq_freq_attr_scaling_available_freqs ||
> +                   *drv_attr == &cpufreq_freq_attr_scaling_boost_freqs) {
> +                       drv_attr++;
> +                       continue;
> +               }
> +
>                 ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
>                 if (ret)
>                         return ret;
> --
> 2.31.1.272.g89b43f80a514
>

^ permalink raw reply	[flat|nested] 43+ 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
                   ` (32 preceding siblings ...)
  2025-01-23 11:36 ` [PATCH 33/33] cpufreq: Stop checking for duplicate available/boost freq attributes Viresh Kumar
@ 2025-01-23 19:40 ` Rafael J. Wysocki
  33 siblings, 0 replies; 43+ 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] 43+ 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; 43+ 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] 43+ messages in thread

* Re: [PATCH 05/33] cpufreq: bmips: Stop setting cpufreq_driver->attr field
  2025-01-23 11:35 ` [PATCH 05/33] cpufreq: bmips: " Viresh Kumar
@ 2025-01-23 20:27   ` Florian Fainelli
  0 siblings, 0 replies; 43+ 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-kernel

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

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

^ permalink raw reply	[flat|nested] 43+ 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; 43+ 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] 43+ messages in thread

* [PATCH V1.1 20/33] cpufreq: powernv: Stop setting common freq attributes
  2025-01-23 11:35 ` [PATCH 20/33] cpufreq: powernv: Stop setting common freq attributes Viresh Kumar
@ 2025-02-03  9:53   ` Viresh Kumar
  0 siblings, 0 replies; 43+ messages in thread
From: Viresh Kumar @ 2025-02-03  9:53 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Madhavan Srinivasan,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Naveen N Rao
  Cc: linux-pm, Vincent Guittot, linuxppc-dev, linux-kernel

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

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
---
V1.1:
- Drop runtime updates to freq attr.

 drivers/cpufreq/powernv-cpufreq.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index ae79d909943b..0631284c4cfb 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -386,12 +386,8 @@ static ssize_t cpuinfo_nominal_freq_show(struct cpufreq_policy *policy,
 static struct freq_attr cpufreq_freq_attr_cpuinfo_nominal_freq =
 	__ATTR_RO(cpuinfo_nominal_freq);
 
-#define SCALING_BOOST_FREQS_ATTR_INDEX		2
-
 static struct freq_attr *powernv_cpu_freq_attr[] = {
-	&cpufreq_freq_attr_scaling_available_freqs,
 	&cpufreq_freq_attr_cpuinfo_nominal_freq,
-	&cpufreq_freq_attr_scaling_boost_freqs,
 	NULL,
 };
 
@@ -1129,8 +1125,6 @@ static int __init powernv_cpufreq_init(void)
 
 	if (powernv_pstate_info.wof_enabled)
 		powernv_cpufreq_driver.boost_enabled = true;
-	else
-		powernv_cpu_freq_attr[SCALING_BOOST_FREQS_ATTR_INDEX] = NULL;
 
 	rc = cpufreq_register_driver(&powernv_cpufreq_driver);
 	if (rc) {
-- 
2.31.1.272.g89b43f80a514


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

end of thread, other threads:[~2025-02-03  9:53 UTC | newest]

Thread overview: 43+ 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 01/33] cpufreq: Always create freq-table related sysfs file Viresh Kumar
2025-01-23 19:39   ` Rafael J. Wysocki
2025-01-23 11:35 ` [PATCH 02/33] cpufreq: dt: Stop setting cpufreq_driver->attr field Viresh Kumar
2025-01-23 11:35 ` [PATCH 03/33] cpufreq: acpi: Stop setting common freq attributes 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 05/33] cpufreq: bmips: " Viresh Kumar
2025-01-23 20:27   ` Florian Fainelli
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 07/33] cpufreq: davinci: Stop setting cpufreq_driver->attr field Viresh Kumar
2025-01-23 11:35 ` [PATCH 08/33] cpufreq: e_powersaver: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 09/33] cpufreq: elanfreq: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 10/33] cpufreq: imx6q: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 11/33] cpufreq: kirkwood: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 12/33] cpufreq: longhaul: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 13/33] cpufreq: loongson: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 14/33] cpufreq: mediatek: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 15/33] cpufreq: omap: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 16/33] cpufreq: p4: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 17/33] cpufreq: pasemi: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 18/33] cpufreq: pmac: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 19/33] cpufreq: powernow: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 20/33] cpufreq: powernv: Stop setting common freq attributes Viresh Kumar
2025-02-03  9:53   ` [PATCH V1.1 " Viresh Kumar
2025-01-23 11:35 ` [PATCH 21/33] cpufreq: qcom: Stop setting cpufreq_driver->attr field Viresh Kumar
2025-01-23 11:35 ` [PATCH 22/33] cpufreq: qoriq: " Viresh Kumar
2025-01-23 11:35 ` [PATCH 23/33] cpufreq: sc520_freq: " 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 11:36 ` [PATCH 26/33] cpufreq: sh: " Viresh Kumar
2025-01-23 11:36 ` [PATCH 27/33] cpufreq: spear: " Viresh Kumar
2025-01-23 11:36 ` [PATCH 28/33] cpufreq: speedstep: " Viresh Kumar
2025-01-23 11:36 ` [PATCH 29/33] cpufreq: tegra: " Viresh Kumar
2025-01-23 11:36 ` [PATCH 30/33] cpufreq: vexpress: " Viresh Kumar
2025-01-23 11:50   ` Sudeep Holla
2025-01-23 11:36 ` [PATCH 31/33] cpufreq: virtual: " Viresh Kumar
2025-01-23 11:36 ` [PATCH 32/33] cpufreq: Remove cpufreq_generic_attrs Viresh Kumar
2025-01-23 11:36 ` [PATCH 33/33] cpufreq: Stop checking for duplicate available/boost freq attributes Viresh Kumar
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).