[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PAXPR04MB84596E444B690924998D734C88B82@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Wed, 7 Aug 2024 00:51:48 +0000
From: Peng Fan <peng.fan@....com>
To: Sibi Sankar <quic_sibis@...cinc.com>, Sudeep Holla <sudeep.holla@....com>,
"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>
CC: "cristian.marussi@....com" <cristian.marussi@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"arm-scmi@...r.kernel.org" <arm-scmi@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-arm-msm@...r.kernel.org"
<linux-arm-msm@...r.kernel.org>, "linux-pm@...r.kernel.org"
<linux-pm@...r.kernel.org>, "quic_rgottimu@...cinc.com"
<quic_rgottimu@...cinc.com>, "quic_kshivnan@...cinc.com"
<quic_kshivnan@...cinc.com>, "johan@...nel.org" <johan@...nel.org>
Subject: RE: [PATCH] pmdomain: arm: Fix debugfs node creation failure
> Subject: Re: [PATCH] pmdomain: arm: Fix debugfs node creation failure
>
>
>
> On 7/5/24 18:34, Sudeep Holla wrote:
> > On Fri, Jul 05, 2024 at 09:16:29AM +0530, Sibi Sankar wrote:
> >>
> >> On 7/4/24 16:02, Sudeep Holla wrote:
> >>>
> >>> If there are 2 perf domains for a device or group of devices, there
> >>> must be something unique about each of these domains. Why
> can't the
> >>> firmware specify the uniqueness or the difference via the name?
> >>>
> >>> The example above seems firmware is being just lazy to update it.
> >>> Also for the user/developer/debugger, the unique name might be
> more
> >>> useful than just this number.
> >>>
> >>> So please use the name(we must now have extended name if
> 16bytes are
> >>> less) to provide unique names. Please stop working around such
> silly
> >>> firmware bugs like this, it just makes using debugfs for anything
> useful harder.
> >>
> >> This is just meant to address firmware that are already out in the
> wild.
> >> That being said I don't necessarily agree with the patch either since
> >> it's penalizing firmware that actually uses a proper name by
> >> appending something inherently less useful to it. Since, the using of
> >> an unique domain name isn't required by the spec, the need for it
> >> goes under the radar for vendors. Mandating it might be the right
> >> thing to do since the kernel seems inherently expect that.
> >>
> >
> > Well I would love if spec authors can agree and mandate this. But this
> > is one of those things I can't argue as I don't necessarily agree with
> > the argument. There are 2 distinct/unique domains but firmware
> authors
> > ran out of unique names for them or just can't be bothered to care
> about it.
> >
> > They can't run out of characters as well in above examples, firmware
> > can add some useless domain ID in the name if they can't be
> bothered or creative.
As Sibi raised, Spec does not has restriction on name.
Linux chose to use genpd to support perf domain, but now it turns out
that Linux is forcing firmware to use different name for power/perf
domain. This will not convince firmware developers.
For example, firmware might be as below:
struct pd_perf_domain {
char *name;
(int *)power_hook(int id);
(int *)perf_hook(int level);
};
From firmware developer's view, name is shared for pd and perf.
The fix should be in linux side.
> >
> > So I must admit I can't be bothered as well with that honestly.
>
> Okay, I guess the conclusion is that if the firmware vendors don't care
> enough to provide unique names, they get to live without those
> debugfs nodes.
>
> Do we really want to register/expose scmi perf power-domains used by
> the CPU nodes?
How about not register debugfs for perf?
Given that scmi-cpufreq doesn't consume these power
> domains and can be voted upon by another consumer, wouldn't this
> cause a disconnect?
You might be also interested in [1], which is also scmi cpufreq related.
[1]https://lore.kernel.org/all/20240729070325.2065286-1-peng.fan@oss.nxp.com/
Regards,
Peng.
>
> -Sibi
>
> > --
> > Regards,
> > Sudeep
Powered by blists - more mailing lists