Skip to contentSkip to conversation

Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"

PATCH In review Orson Zhai 5 participants 10 messages Feb 20, 2020 – Feb 24, 2020

Subsystems (2)
lore
Share & tools
lore

Orson Zhai

author
#0 lore raw

PATCH 1/1 Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -3
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
 	struct devfreq *devfreq;
 	struct devfreq_governor *governor;
-	static atomic_t devfreq_no = ATOMIC_INIT(-1);
 	int err = 0;
 
 	if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
 	devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
 	atomic_set(&devfreq->suspend_count, 0);
 
-	dev_set_name(&devfreq->dev, "devfreq%d",
-				atomic_inc_return(&devfreq_no));
+	dev_set_name(&devfreq->dev, "%s", dev_name(dev));
 	err = device_register(&devfreq->dev);
 	if (err) {
 		mutex_unlock(&devfreq->lock);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 47 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -3
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
 	struct devfreq *devfreq;
 	struct devfreq_governor *governor;
-	static atomic_t devfreq_no = ATOMIC_INIT(-1);
 	int err = 0;
 
 	if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
 	devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
 	atomic_set(&devfreq->suspend_count, 0);
 
-	dev_set_name(&devfreq->dev, "devfreq%d",
-				atomic_inc_return(&devfreq_no));
+	dev_set_name(&devfreq->dev, "%s", dev_name(dev));
 	err = device_register(&devfreq->dev);
 	if (err) {
 		mutex_unlock(&devfreq->lock);
Signature · 1 line
2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

I'll queue this up in my tree now, thanks.

greg k-h

#2 lore raw
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

thanks
-john

#3 lore raw
Quoted 57 lines · John Stultz
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Quoted 7 lines

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

4.11 :)

#4 lore raw
In reply to John Stultz
Quoted 57 lines · John Stultz
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Quoted 7 lines

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

Looks like most users just revert that commit in their trees:

	https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/drivers/devfreq?h=msm-4.14&id=ccf273f6d89ad0fa8032e9225305ad6f62c7770c

So we should be ok here.

thanks,

greg k-h

maintainer
#5 lore raw
Quoted 66 lines · Greg Kroah-Hartman
Quoted 57 lines · John Stultz
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://protect2.fireeye.com/url?k=00fa721e-5d2a7af6-00fbf951-000babff32e3-95e4b92259b05656&u=https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Quoted 7 lines

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

Quoted 4 lines

Looks like most users just revert that commit in their trees:

	https://protect2.fireeye.com/url?k=1012ad0f-4dc2a5e7-10132640-000babff32e3-35779c5ed675ef0f&u=https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/drivers/devfreq?h=msm-4.14&id=ccf273f6d89ad0fa8032e9225305ad6f62c7770c

So we should be ok here.

I'm sorry about changing the devfreq node name.

OK. Do you pick this patch to your tree?
or If not, I'll apply it to devfreq-next branch for v5.7-rc1.

And do you apply it to kernel of linux-stable tree since 4.11?

Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
#6 lore raw
Quoted 67 lines · Chanwoo Choi
Quoted 66 lines · Greg Kroah-Hartman
Quoted 64 lines · John Stultz
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://protect2.fireeye.com/url?k=00fa721e-5d2a7af6-00fbf951-000babff32e3-95e4b92259b05656&u=https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

Quoted 8 lines
Quoted 4 lines

Looks like most users just revert that commit in their trees:

	https://protect2.fireeye.com/url?k=1012ad0f-4dc2a5e7-10132640-000babff32e3-35779c5ed675ef0f&u=https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/drivers/devfreq?h=msm-4.14&id=ccf273f6d89ad0fa8032e9225305ad6f62c7770c

So we should be ok here.

I'm sorry about changing the devfreq node name.

OK. Do you pick this patch to your tree?

Yes, I can do that.

Quoted 3 lines

or If not, I'll apply it to devfreq-next branch for v5.7-rc1.

And do you apply it to kernel of linux-stable tree since 4.11?

Yeah, I'll mark it for stable.

Can I get an ack from you for this?

thanks,

greg k-h

#7 lore raw
Quoted 72 lines · Greg Kroah-Hartman
Quoted 70 lines · Chanwoo Choi
Quoted 69 lines · Greg Kroah-Hartman
Quoted 57 lines · John Stultz
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://protect2.fireeye.com/url?k=00fa721e-5d2a7af6-00fbf951-000babff32e3-95e4b92259b05656&u=https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Quoted 7 lines

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

Looks like most users just revert that commit in their trees:

    https://protect2.fireeye.com/url?k=1012ad0f-4dc2a5e7-10132640-000babff32e3-35779c5ed675ef0f&u=https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/drivers/devfreq?h=msm-4.14&id=ccf273f6d89ad0fa8032e9225305ad6f62c7770c
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

So we should be ok here.

I'm sorry about changing the devfreq node name.

OK. Do you pick this patch to your tree?

Yes, I can do that.

If you agree, how about merging it to devfreq.git
for preventing the potential merge conflict with other devfreq patches?

Quoted 6 lines
Quoted 4 lines

or If not, I'll apply it to devfreq-next branch for v5.7-rc1.

And do you apply it to kernel of linux-stable tree since 4.11?

Yeah, I'll mark it for stable.

Thanks.

Quoted 2 lines

Can I get an ack from you for this?

OK. but, if it will be merged to devfreq.git,
can I get an ack from you?

Quoted 4 lines

thanks,

greg k-h

Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics
maintainer Acked-by
#8 lore raw
Quoted 76 lines · Chanwoo Choi
Quoted 74 lines · Greg Kroah-Hartman
Quoted 72 lines · Chanwoo Choi
Quoted 70 lines · Greg Kroah-Hartman
Quoted 57 lines · John Stultz
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://protect2.fireeye.com/url?k=00fa721e-5d2a7af6-00fbf951-000babff32e3-95e4b92259b05656&u=https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Quoted 7 lines

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

Looks like most users just revert that commit in their trees:

    https://protect2.fireeye.com/url?k=1012ad0f-4dc2a5e7-10132640-000babff32e3-35779c5ed675ef0f&u=https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/drivers/devfreq?h=msm-4.14&id=ccf273f6d89ad0fa8032e9225305ad6f62c7770c

So we should be ok here.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

I'm sorry about changing the devfreq node name.

OK. Do you pick this patch to your tree?

Yes, I can do that.

If you agree, how about merging it to devfreq.git
for preventing the potential merge conflict with other devfreq patches?

Sure, but it should go for 5.6-final, right?

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

or If not, I'll apply it to devfreq-next branch for v5.7-rc1.

And do you apply it to kernel of linux-stable tree since 4.11?

Yeah, I'll mark it for stable.

Quoted 7 lines

Thanks.

Quoted 2 lines

Can I get an ack from you for this?

OK. but, if it will be merged to devfreq.git,
can I get an ack from you?

maintainer
#9 lore raw
Quoted 79 lines · Greg Kroah-Hartman
Quoted 78 lines · Chanwoo Choi
Quoted 76 lines · Greg Kroah-Hartman
Quoted 74 lines · Chanwoo Choi
Quoted 66 lines · Greg Kroah-Hartman
Quoted 57 lines · John Stultz
Quoted 53 lines · Greg Kroah-Hartman
Quoted 45 lines · Orson Zhai

This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14.

The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1].
The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android.

So we'd like to revert it back to old naming rule before any better way being found.

[1] https://protect2.fireeye.com/url?k=00fa721e-5d2a7af6-00fbf951-000babff32e3-95e4b92259b05656&u=https://lkml.org/lkml/2018/5/8/1042

Cc John Stultz <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/devfreq/devfreq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/devfreq/devfreq.c +1 -4
index cceee8b..7dcf209 100644
@@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
      struct devfreq *devfreq;
      struct devfreq_governor *governor;
-     static atomic_t devfreq_no = ATOMIC_INIT(-1);
      int err = 0;
 
      if (!dev || !profile || !governor_name) {
@@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
      devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
      atomic_set(&devfreq->suspend_count, 0);
 
-     dev_set_name(&devfreq->dev, "devfreq%d",
-                             atomic_inc_return(&devfreq_no));
+     dev_set_name(&devfreq->dev, "%s", dev_name(dev));
      err = device_register(&devfreq->dev);
      if (err) {
              mutex_unlock(&devfreq->lock);
--
Quoted 2 lines

2.7.4

Thanks for this, I agree, this needs to get back to the way things were as it seems to break too many existing systems as-is.

Quoted 1 line

I'll queue this up in my tree now, thanks.

Quoted 7 lines

Oof this old thing. I unfortunately didn't get back to look at the devfreq name node issue or the compatibility links, since the impact of the regression (breaking the powerHAL's interactions with the gpu) wasn't as big as other problems we had. While the regression was frustrating, my only hesitancy at this point is that its been this way since 4.10, so reverting the problematic patch is likely to break any new users since then.

Quoted 4 lines

Looks like most users just revert that commit in their trees:

    https://protect2.fireeye.com/url?k=1012ad0f-4dc2a5e7-10132640-000babff32e3-35779c5ed675ef0f&u=https://source.codeaurora.org/quic/la/kernel/msm-4.14/commit/drivers/devfreq?h=msm-4.14&id=ccf273f6d89ad0fa8032e9225305ad6f62c7770c

So we should be ok here.

I'm sorry about changing the devfreq node name.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

OK. Do you pick this patch to your tree?

Yes, I can do that.

If you agree, how about merging it to devfreq.git
for preventing the potential merge conflict with other devfreq patches?

Sure, but it should go for 5.6-final, right?

OK.I'll send pull-request of this patch for v5.6-rc4.

Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines

or If not, I'll apply it to devfreq-next branch for v5.7-rc1.

And do you apply it to kernel of linux-stable tree since 4.11?

Yeah, I'll mark it for stable.

Thanks.

Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Can I get an ack from you for this?

OK. but, if it will be merged to devfreq.git,
can I get an ack from you?

Thanks. I applied it to devfreq-fixes branch for v5.6-rc4.

Signature · 3 lines
Best Regards,
Chanwoo Choi
Samsung Electronics