lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Feb 2013 03:29:53 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, robin.randhawa@....com,
	Steve.Bannister@....com, Liviu.Dudau@....com,
	charles.garcia-tobin@....com, linaro-dev@...ts.linaro.org,
	francescolavra.fl@...il.com, toddpoynor@...gle.com,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH V2 3/4] cpufreq: Add Kconfig option to enable/disable have_multiple_policies

On Friday, February 22, 2013 07:44:23 AM Viresh Kumar wrote:
> On 22 February 2013 05:23, Rafael J. Wysocki <rjw@...k.pl> wrote:
> > On Monday, February 11, 2013 01:20:02 PM Viresh Kumar wrote:
> 
> >> +config CPU_FREQ_HAVE_MULTIPLE_POLICIES
> >> +     bool
> >> +
> >
> > So I suppose some architectures will select this, right?
> 
> Yes. And they have to enable have_multiple_policies too from their
> drivers init code.
> 
> > What architecture they are?
> 
> Atleast all big.LITTLE SoCs. Or any other SoC that has multiple policy
> structs alive at any time.
> 
> 
> > I'm not really sure I like this. ->
> 
> >>  static inline struct kobject *
> >>  get_governor_parent_kobj(struct cpufreq_policy *policy)
> >>  {
> >> +#ifdef CONFIG_CPU_FREQ_HAVE_MULTIPLE_POLICIES
> >>       if (policy->have_multiple_policies)
> >>               return &policy->kobj;
> >>       else
> >> +#endif
> >>               return cpufreq_global_kobject;
> >
> > -> I wonder why don't you arrange things so that policy->kobj is always
> > returned, but it points to cpufreq_global_kobject in case there's only one
> > (i.e. make policy->kobj a pointer)?
> 
> policy->kobj is a struct instance rather than a pointer and it is widely used
> within cpufreq.c.

Yeah, policy attributes.  Never mind.

> If you don't like this one then we can add another entry
> into struct policy like: gov_sysfs_parent.

I don't know.  This is going to look kind of ugly this way or another I think.

Maybe I'll figure out something ...

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists