linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Orson Zhai <orson.unisoc@gmail.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	mingmin.ling@unisoc.com, orsonzhai@gmail.com,
	jingchao.ye@unisoc.com, Linux PM list <linux-pm@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH] Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"
Date: Thu, 20 Feb 2020 11:47:41 -0800	[thread overview]
Message-ID: <CALAqxLViRgGE8FsukCJL+doqk_GqabLDCtXBWem+VOGf9xXZdg@mail.gmail.com> (raw)
In-Reply-To: <20200220191513.GA3450796@kroah.com>

On Thu, Feb 20, 2020 at 11:15 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Fri, Feb 21, 2020 at 01:37:04AM +0800, Orson Zhai wrote:
> > 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 <john.stultz@linaro.org>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Orson Zhai <orson.unisoc@gmail.com>
> >
> > ---
> >  drivers/devfreq/devfreq.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> > index cceee8b..7dcf209 100644
> > --- a/drivers/devfreq/devfreq.c
> > +++ b/drivers/devfreq/devfreq.c
> > @@ -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);
> > --
> > 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.

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

  reply	other threads:[~2020-02-20 19:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 17:37 [PATCH] Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" Orson Zhai
2020-02-20 19:15 ` Greg Kroah-Hartman
2020-02-20 19:47   ` John Stultz [this message]
2020-02-20 20:01     ` Greg Kroah-Hartman
2020-02-21  7:06     ` Greg Kroah-Hartman
2020-02-21  8:11       ` Chanwoo Choi
2020-02-21 11:13         ` Greg Kroah-Hartman
2020-02-21 23:55           ` Chanwoo Choi
2020-02-23 17:54             ` Greg Kroah-Hartman
2020-02-24  2:17               ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALAqxLViRgGE8FsukCJL+doqk_GqabLDCtXBWem+VOGf9xXZdg@mail.gmail.com \
    --to=john.stultz@linaro.org \
    --cc=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jingchao.ye@unisoc.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingmin.ling@unisoc.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=orson.unisoc@gmail.com \
    --cc=orsonzhai@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).