From: Vaidyanathan Srinivasan <svaidy@linux•vnet.ibm.com>
To: Dipankar Sarma <dipankar@in•ibm.com>
Cc: Paul Mackerras <paulus@samba•org>,
Anton Blanchard <anton@samba•org>,
linuxppc-dev@ozlabs•org
Subject: Re: [RFC] powerpc: add support for new hcall H_BEST_ENERGY
Date: Mon, 8 Mar 2010 12:20:06 +0530 [thread overview]
Message-ID: <20100308065006.GA6281@dirshya.in.ibm.com> (raw)
In-Reply-To: <20100305191810.GA10402@in.ibm.com>
* Dipankar Sarma <dipankar@in•ibm.com> [2010-03-06 00:48:11]:
> On Wed, Mar 03, 2010 at 11:48:22PM +0530, Vaidyanathan Srinivasan wrote:
> > static void __init cpu_init_thread_core_maps(int tpc)
> > diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
> > index c667f0f..b3dd108 100644
> > --- a/arch/powerpc/platforms/pseries/Kconfig
> > +++ b/arch/powerpc/platforms/pseries/Kconfig
> > @@ -33,6 +33,16 @@ config PSERIES_MSI
> > depends on PCI_MSI && EEH
> > default y
> >
> > +config PSERIES_ENERGY
> > + tristate "pseries energy management capabilities driver"
> > + depends on PPC_PSERIES
> > + default y
> > + help
> > + Provides interface to platform energy management capabilities
> > + on supported PSERIES platforms.
> > + Provides: /sys/devices/system/cpu/pseries_(de)activation_hint_list
> > + and /sys/devices/system/cpu/cpuN/pseries_(de)activation_hint
> > +
> > config SCANLOG
> > tristate "Scanlog dump interface"
> > depends on RTAS_PROC && PPC_PSERIES
>
> .....
>
> > +static int __init pseries_energy_init(void)
> > +{
> > + int cpu, err;
> > + struct sys_device *cpu_sys_dev;
> > +
> > + /* Create the sysfs files */
> > + err = sysfs_create_file(&cpu_sysdev_class.kset.kobj,
> > + &attr_cpu_activate_hint_list.attr);
> > + if (!err)
> > + err = sysfs_create_file(&cpu_sysdev_class.kset.kobj,
> > + &attr_cpu_deactivate_hint_list.attr);
> > +
> > + for_each_possible_cpu(cpu) {
> > + cpu_sys_dev = get_cpu_sysdev(cpu);
> > + err = sysfs_create_file(&cpu_sys_dev->kobj,
> > + &attr_percpu_activate_hint.attr);
> > + if (err)
> > + break;
> > + err = sysfs_create_file(&cpu_sys_dev->kobj,
> > + &attr_percpu_deactivate_hint.attr);
> > + if (err)
> > + break;
> > + }
> > + return err;
> > +
> > +}
>
> Shouldn't we create this only for supported platforms ?
Hi Dipankar,
Yes we will need a check like
firmware_has_feature(FW_FEATURE_BEST_ENERGY) to avoid sysfs files in
unsupported platforms. I will add that check in the next iteration.
Thanks,
Vaidy
next prev parent reply other threads:[~2010-03-08 6:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 18:18 [RFC] powerpc: add support for new hcall H_BEST_ENERGY Vaidyanathan Srinivasan
2010-03-05 19:18 ` Dipankar Sarma
2010-03-08 6:50 ` Vaidyanathan Srinivasan [this message]
2010-03-08 19:28 ` Dipankar Sarma
2010-03-10 4:30 ` Vaidyanathan Srinivasan
2010-04-07 2:04 ` Benjamin Herrenschmidt
2010-04-07 4:57 ` Vaidyanathan Srinivasan
2010-04-07 5:13 ` Benjamin Herrenschmidt
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=20100308065006.GA6281@dirshya.in.ibm.com \
--to=svaidy@linux$(echo .)vnet.ibm.com \
--cc=anton@samba$(echo .)org \
--cc=dipankar@in$(echo .)ibm.com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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