All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powercap / RAPL: mark rapl_ids array as __initconst
@ 2015-03-25 21:15 Mathias Krause
  2015-03-30 19:17 ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Krause @ 2015-03-25 21:15 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-pm, Mathias Krause, Jacob Pan, Srinivas Pandruvada

The RAPL ids are only tested in rapl_init() which is itself an __init
function. For the MODULE_DEVICE_TABLE() file2alias doesn't care about
the section, just about the symbol name. Therefore it's safe to mark the
rapl_ids[] array as __initconst so its memory can be released after
initialization is done.

Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 drivers/powercap/intel_rapl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index 63d4033eb683..62f9b322fde0 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = {
 		.driver_data = (kernel_ulong_t)&_ops,	\
 		}
 
-static const struct x86_cpu_id rapl_ids[] = {
+static const struct x86_cpu_id rapl_ids[] __initconst = {
 	RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */
 	RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
 	RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] powercap / RAPL: mark rapl_ids array as __initconst
  2015-03-25 21:15 [PATCH] powercap / RAPL: mark rapl_ids array as __initconst Mathias Krause
@ 2015-03-30 19:17 ` Rafael J. Wysocki
  2015-03-30 22:46   ` Jacob Pan
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2015-03-30 19:17 UTC (permalink / raw)
  To: Mathias Krause, Jacob Pan
  Cc: Rafael J. Wysocki, linux-pm, Srinivas Pandruvada

On Wednesday, March 25, 2015 10:15:52 PM Mathias Krause wrote:
> The RAPL ids are only tested in rapl_init() which is itself an __init
> function. For the MODULE_DEVICE_TABLE() file2alias doesn't care about
> the section, just about the symbol name. Therefore it's safe to mark the
> rapl_ids[] array as __initconst so its memory can be released after
> initialization is done.
> 
> Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Signed-off-by: Mathias Krause <minipli@googlemail.com>

Jacob, any comments?

> ---
>  drivers/powercap/intel_rapl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
> index 63d4033eb683..62f9b322fde0 100644
> --- a/drivers/powercap/intel_rapl.c
> +++ b/drivers/powercap/intel_rapl.c
> @@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = {
>  		.driver_data = (kernel_ulong_t)&_ops,	\
>  		}
>  
> -static const struct x86_cpu_id rapl_ids[] = {
> +static const struct x86_cpu_id rapl_ids[] __initconst = {
>  	RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */
>  	RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
>  	RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powercap / RAPL: mark rapl_ids array as __initconst
  2015-03-30 19:17 ` Rafael J. Wysocki
@ 2015-03-30 22:46   ` Jacob Pan
  2015-03-31  5:17     ` Mathias Krause
  2015-04-08 18:41     ` Mathias Krause
  0 siblings, 2 replies; 5+ messages in thread
From: Jacob Pan @ 2015-03-30 22:46 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Mathias Krause, Rafael J. Wysocki, linux-pm, Srinivas Pandruvada

On Mon, 30 Mar 2015 21:17:02 +0200
Rafael J. Wysocki <rjw@rjwysocki.net> wrote:

> On Wednesday, March 25, 2015 10:15:52 PM Mathias Krause wrote:
> > The RAPL ids are only tested in rapl_init() which is itself an
> > __init function. For the MODULE_DEVICE_TABLE() file2alias doesn't
> > care about the section, just about the symbol name. Therefore it's
> > safe to mark the rapl_ids[] array as __initconst so its memory can
> > be released after initialization is done.
> > 
> > Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
> > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > Signed-off-by: Mathias Krause <minipli@googlemail.com>
> 
> Jacob, any comments?
> 
looks good to me, though i did ack last week perhaps something wrong
with my email.
> > ---
> >  drivers/powercap/intel_rapl.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/powercap/intel_rapl.c
> > b/drivers/powercap/intel_rapl.c index 63d4033eb683..62f9b322fde0
> > 100644 --- a/drivers/powercap/intel_rapl.c
> > +++ b/drivers/powercap/intel_rapl.c
> > @@ -1054,7 +1054,7 @@ static const struct rapl_defaults
> > rapl_defaults_atom = { .driver_data = (kernel_ulong_t)&_ops,
> > \ }
> >  
> > -static const struct x86_cpu_id rapl_ids[] = {
> > +static const struct x86_cpu_id rapl_ids[] __initconst = {
> >  	RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */
> >  	RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
> >  	RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */
> > 
> 
> -- 
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.




-- 
Jacob Pan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powercap / RAPL: mark rapl_ids array as __initconst
  2015-03-30 22:46   ` Jacob Pan
@ 2015-03-31  5:17     ` Mathias Krause
  2015-04-08 18:41     ` Mathias Krause
  1 sibling, 0 replies; 5+ messages in thread
From: Mathias Krause @ 2015-03-31  5:17 UTC (permalink / raw)
  To: Jacob Pan
  Cc: Rafael J. Wysocki, Rafael J. Wysocki, linux-pm,
	Srinivas Pandruvada

On 31 March 2015 at 00:46, Jacob Pan <jacob.jun.pan@linux.intel.com> wrote:
> On Mon, 30 Mar 2015 21:17:02 +0200
> Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>
>> On Wednesday, March 25, 2015 10:15:52 PM Mathias Krause wrote:
>> > The RAPL ids are only tested in rapl_init() which is itself an
>> > __init function. For the MODULE_DEVICE_TABLE() file2alias doesn't
>> > care about the section, just about the symbol name. Therefore it's
>> > safe to mark the rapl_ids[] array as __initconst so its memory can
>> > be released after initialization is done.
>> >
>> > Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
>> > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
>> > Signed-off-by: Mathias Krause <minipli@googlemail.com>
>>
>> Jacob, any comments?
>>
> looks good to me, though i did ack last week perhaps something wrong
> with my email.

You ACKed "[PATCH] thermal/intel_powerclamp: add __init / __exit
annotations", twice -- not that one ;)


Regards,
Mathias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powercap / RAPL: mark rapl_ids array as __initconst
  2015-03-30 22:46   ` Jacob Pan
  2015-03-31  5:17     ` Mathias Krause
@ 2015-04-08 18:41     ` Mathias Krause
  1 sibling, 0 replies; 5+ messages in thread
From: Mathias Krause @ 2015-04-08 18:41 UTC (permalink / raw)
  To: Jacob Pan, Rafael J. Wysocki
  Cc: Rafael J. Wysocki, linux-pm, Srinivas Pandruvada

On 31 March 2015 at 00:46, Jacob Pan <jacob.jun.pan@linux.intel.com> wrote:
> On Mon, 30 Mar 2015 21:17:02 +0200
> Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>
>> On Wednesday, March 25, 2015 10:15:52 PM Mathias Krause wrote:
>> > The RAPL ids are only tested in rapl_init() which is itself an
>> > __init function. For the MODULE_DEVICE_TABLE() file2alias doesn't
>> > care about the section, just about the symbol name. Therefore it's
>> > safe to mark the rapl_ids[] array as __initconst so its memory can
>> > be released after initialization is done.
>> >
>> > Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
>> > Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
>> > Signed-off-by: Mathias Krause <minipli@googlemail.com>
>>
>> Jacob, any comments?
>>
> looks good to me, though i did ack last week perhaps something wrong
> with my email.
>> > ---
>> >  drivers/powercap/intel_rapl.c |    2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/powercap/intel_rapl.c
>> > b/drivers/powercap/intel_rapl.c index 63d4033eb683..62f9b322fde0
>> > 100644 --- a/drivers/powercap/intel_rapl.c
>> > +++ b/drivers/powercap/intel_rapl.c
>> > @@ -1054,7 +1054,7 @@ static const struct rapl_defaults
>> > rapl_defaults_atom = { .driver_data = (kernel_ulong_t)&_ops,
>> > \ }
>> >
>> > -static const struct x86_cpu_id rapl_ids[] = {
>> > +static const struct x86_cpu_id rapl_ids[] __initconst = {
>> >     RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */
>> >     RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
>> >     RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */
>> >
>>
>> --

Ping. Rafael, any objections?

Mathias

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-08 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 21:15 [PATCH] powercap / RAPL: mark rapl_ids array as __initconst Mathias Krause
2015-03-30 19:17 ` Rafael J. Wysocki
2015-03-30 22:46   ` Jacob Pan
2015-03-31  5:17     ` Mathias Krause
2015-04-08 18:41     ` Mathias Krause

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.