xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data
@ 2012-11-02 13:12 Jan Beulich
  2012-11-02 13:55 ` Konrad Rzeszutek Wilk
  2012-11-02 14:50 ` Keir Fraser
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2012-11-02 13:12 UTC (permalink / raw)
  To: xen-devel; +Cc: Konrad Rzeszutek Wilk

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

It has never been used for anything, and Linux 3.7 doesn't propagate
this information anymore.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Konrad, on the pv-ops side it may be better to pass zero rather than
leaving the field completely uninitialized.

--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -935,7 +935,6 @@ static void set_cx(
     }
 
     cx->latency  = xen_cx->latency;
-    cx->power    = xen_cx->power;
     
     cx->target_residency = cx->latency * latency_factor;
     if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -96,7 +96,6 @@ static const struct cpuidle_state {
 	char		name[16];
 	unsigned int	flags;
 	unsigned int	exit_latency; /* in US */
-	int		power_usage; /* in mW */
 	unsigned int	target_residency; /* in US */
 } *cpuidle_state_table;
 
@@ -479,7 +478,6 @@ static int mwait_idle_cpu_init(struct no
 		cx->type = cstate;
 		cx->address = get_driver_data(cstate);
 		cx->entry_method = ACPI_CSTATE_EM_FFH;
-		cx->power = cpuidle_state_table[cstate].power_usage;
 		cx->latency = cpuidle_state_table[cstate].exit_latency;
 		cx->target_residency =
 			cpuidle_state_table[cstate].target_residency;
--- a/xen/include/xen/cpuidle.h
+++ b/xen/include/xen/cpuidle.h
@@ -46,7 +46,6 @@ struct acpi_processor_cx
     u32 address;
     u32 latency;
     u32 target_residency;
-    u32 power;
     u32 usage;
     u64 time;
 };




[-- Attachment #2: ACPI-cpuidle-no-power-field.patch --]
[-- Type: text/plain, Size: 1583 bytes --]

ACPI/cpuidle: remove unused "power" field from Cx state data

It has never been used for anything, and Linux 3.7 doesn't propagate
this information anymore.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Konrad, on the pv-ops side it may be better to pass zero rather than
leaving the field completely uninitialized.

--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -935,7 +935,6 @@ static void set_cx(
     }
 
     cx->latency  = xen_cx->latency;
-    cx->power    = xen_cx->power;
     
     cx->target_residency = cx->latency * latency_factor;
     if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -96,7 +96,6 @@ static const struct cpuidle_state {
 	char		name[16];
 	unsigned int	flags;
 	unsigned int	exit_latency; /* in US */
-	int		power_usage; /* in mW */
 	unsigned int	target_residency; /* in US */
 } *cpuidle_state_table;
 
@@ -479,7 +478,6 @@ static int mwait_idle_cpu_init(struct no
 		cx->type = cstate;
 		cx->address = get_driver_data(cstate);
 		cx->entry_method = ACPI_CSTATE_EM_FFH;
-		cx->power = cpuidle_state_table[cstate].power_usage;
 		cx->latency = cpuidle_state_table[cstate].exit_latency;
 		cx->target_residency =
 			cpuidle_state_table[cstate].target_residency;
--- a/xen/include/xen/cpuidle.h
+++ b/xen/include/xen/cpuidle.h
@@ -46,7 +46,6 @@ struct acpi_processor_cx
     u32 address;
     u32 latency;
     u32 target_residency;
-    u32 power;
     u32 usage;
     u64 time;
 };

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data
  2012-11-02 13:12 [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data Jan Beulich
@ 2012-11-02 13:55 ` Konrad Rzeszutek Wilk
  2012-11-02 14:07   ` Jan Beulich
  2012-11-02 14:50 ` Keir Fraser
  1 sibling, 1 reply; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-11-02 13:55 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On Fri, Nov 02, 2012 at 01:12:05PM +0000, Jan Beulich wrote:
> It has never been used for anything, and Linux 3.7 doesn't propagate
> this information anymore.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> Konrad, on the pv-ops side it may be better to pass zero rather than
> leaving the field completely uninitialized.

I think this got taken care of by:

commit c59687f8466df36633d937cc298aad465d704990
Author: Daniel Lezcano <daniel.lezcano@linaro.org>
Date:   Wed Sep 5 15:13:48 2012 +0200

    cpuidle / ACPI : remove power from acpi_processor_cx structure
    
    Remove the unused power field from struct struct acpi_processor_cx.
    
    [rjw: Modified changelog.]
    

And the the xen_processor_cx is allocated using kcalloc which resets
everything to zero - so I think we are safe there.

Thx!

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

* Re: [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data
  2012-11-02 13:55 ` Konrad Rzeszutek Wilk
@ 2012-11-02 14:07   ` Jan Beulich
  2012-11-02 14:18     ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2012-11-02 14:07 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel

>>> On 02.11.12 at 14:55, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> On Fri, Nov 02, 2012 at 01:12:05PM +0000, Jan Beulich wrote:
>> It has never been used for anything, and Linux 3.7 doesn't propagate
>> this information anymore.
>> 
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> Konrad, on the pv-ops side it may be better to pass zero rather than
>> leaving the field completely uninitialized.
> 
> I think this got taken care of by:
> 
> commit c59687f8466df36633d937cc298aad465d704990
> Author: Daniel Lezcano <daniel.lezcano@linaro.org>
> Date:   Wed Sep 5 15:13:48 2012 +0200
> 
>     cpuidle / ACPI : remove power from acpi_processor_cx structure
>     
>     Remove the unused power field from struct struct acpi_processor_cx.
>     
>     [rjw: Modified changelog.]

That's the commit I was referring to.

> And the the xen_processor_cx is allocated using kcalloc which resets
> everything to zero - so I think we are safe there.

And that I didn't pay attention to - sorry for the noise then.

Jan

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

* Re: [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data
  2012-11-02 14:07   ` Jan Beulich
@ 2012-11-02 14:18     ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-11-02 14:18 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel

On Fri, Nov 02, 2012 at 02:07:34PM +0000, Jan Beulich wrote:
> >>> On 02.11.12 at 14:55, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> > On Fri, Nov 02, 2012 at 01:12:05PM +0000, Jan Beulich wrote:
> >> It has never been used for anything, and Linux 3.7 doesn't propagate
> >> this information anymore.
> >> 
> >> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> >> ---
> >> Konrad, on the pv-ops side it may be better to pass zero rather than
> >> leaving the field completely uninitialized.
> > 
> > I think this got taken care of by:
> > 
> > commit c59687f8466df36633d937cc298aad465d704990
> > Author: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Date:   Wed Sep 5 15:13:48 2012 +0200
> > 
> >     cpuidle / ACPI : remove power from acpi_processor_cx structure
> >     
> >     Remove the unused power field from struct struct acpi_processor_cx.
> >     
> >     [rjw: Modified changelog.]
> 
> That's the commit I was referring to.
> 
> > And the the xen_processor_cx is allocated using kcalloc which resets
> > everything to zero - so I think we are safe there.
> 
> And that I didn't pay attention to - sorry for the noise then.

Oh no problem - Thank you for keeping me in the loop!
> 
> Jan
> 

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

* Re: [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data
  2012-11-02 13:12 [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data Jan Beulich
  2012-11-02 13:55 ` Konrad Rzeszutek Wilk
@ 2012-11-02 14:50 ` Keir Fraser
  1 sibling, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2012-11-02 14:50 UTC (permalink / raw)
  To: Jan Beulich, xen-devel

On 02/11/2012 13:12, "Jan Beulich" <JBeulich@suse.com> wrote:

> It has never been used for anything, and Linux 3.7 doesn't propagate
> this information anymore.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Keir Fraser <keir@xen.org>

> ---
> Konrad, on the pv-ops side it may be better to pass zero rather than
> leaving the field completely uninitialized.
> 
> --- a/xen/arch/x86/acpi/cpu_idle.c
> +++ b/xen/arch/x86/acpi/cpu_idle.c
> @@ -935,7 +935,6 @@ static void set_cx(
>      }
>  
>      cx->latency  = xen_cx->latency;
> -    cx->power    = xen_cx->power;
>      
>      cx->target_residency = cx->latency * latency_factor;
>      if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 )
> --- a/xen/arch/x86/cpu/mwait-idle.c
> +++ b/xen/arch/x86/cpu/mwait-idle.c
> @@ -96,7 +96,6 @@ static const struct cpuidle_state {
> char  name[16];
> unsigned int flags;
> unsigned int exit_latency; /* in US */
> - int  power_usage; /* in mW */
> unsigned int target_residency; /* in US */
>  } *cpuidle_state_table;
>  
> @@ -479,7 +478,6 @@ static int mwait_idle_cpu_init(struct no
> cx->type = cstate;
> cx->address = get_driver_data(cstate);
> cx->entry_method = ACPI_CSTATE_EM_FFH;
> -  cx->power = cpuidle_state_table[cstate].power_usage;
> cx->latency = cpuidle_state_table[cstate].exit_latency;
> cx->target_residency =
> cpuidle_state_table[cstate].target_residency;
> --- a/xen/include/xen/cpuidle.h
> +++ b/xen/include/xen/cpuidle.h
> @@ -46,7 +46,6 @@ struct acpi_processor_cx
>      u32 address;
>      u32 latency;
>      u32 target_residency;
> -    u32 power;
>      u32 usage;
>      u64 time;
>  };
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2012-11-02 14:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02 13:12 [PATCH] ACPI/cpuidle: remove unused "power" field from Cx state data Jan Beulich
2012-11-02 13:55 ` Konrad Rzeszutek Wilk
2012-11-02 14:07   ` Jan Beulich
2012-11-02 14:18     ` Konrad Rzeszutek Wilk
2012-11-02 14:50 ` Keir Fraser

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).