WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RE: [PATCH] [retry 3] 3/3 Add support for AMD MPERF/APERF

To: Mark Langsdorf <mark.langsdorf@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: [PATCH] [retry 3] 3/3 Add support for AMD MPERF/APERF
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Thu, 1 Apr 2010 12:45:19 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Wed, 31 Mar 2010 21:46:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201003311426.45394.mark.langsdorf@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <201003311426.45394.mark.langsdorf@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcrRCBpOb31o35TZT7q7iMJpcjXIngALfpGA
Thread-topic: [PATCH] [retry 3] 3/3 Add support for AMD MPERF/APERF
> -----Original Message-----
> From: Mark Langsdorf [mailto:mark.langsdorf@xxxxxxx]
> Sent: Thursday, April 01, 2010 3:27 AM
> To: xen-devel@xxxxxxxxxxxxxxxxxxx; Yu, Ke
> Subject: [PATCH] [retry 3] 3/3 Add support for AMD MPERF/APERF
> 
> # HG changeset patch
> # User mark.langsdorf@xxxxxxx
> # Date 1270061976 18000
> # Node ID 9bde2053016569af994540ec11b9fa45d3d1a8d7
> # Parent  c00eb5a678e61f4da0db7b4bdeab1660060376d2
> Starting with Family 0x10, model 10 processors, some AMD processors
> will have support for the APERF/MPERF MSRs.  This patch adds the
> checks necessary to support those MSRs.
> 
> It also makes the get_measured_perf function defined inside cpufreq.c
> driver independent.  The max_freq is passed to the function by the caller
> instead of being taking from the acpi-cpufreq only drv_data structure.
> 
> Signed-off-by: Mark Langsdorf <mark.langsdorf@xxxxxxx>

Looks you forget changing the description accordingly :)

> 
> diff -r c00eb5a678e6 -r 9bde20530165 xen/arch/x86/acpi/cpufreq/cpufreq.c
> --- a/xen/arch/x86/acpi/cpufreq/cpufreq.c     Wed Mar 31 13:58:45 2010 -
> 0500
> +++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c     Wed Mar 31 13:59:36
> 2010 -0500
> @@ -269,7 +269,7 @@
>   * Only IA32_APERF/IA32_MPERF ratio is architecturally defined and
>   * no meaning should be associated with absolute values of these MSRs.
>   */
> -static unsigned int get_measured_perf(unsigned int cpu, unsigned int flag)
> +unsigned int get_measured_perf(unsigned int cpu, unsigned int flag)
>  {
>      struct cpufreq_policy *policy;
>      struct perf_pair readin, cur, *saved;
> @@ -353,7 +353,7 @@
> 
>  #endif
> 
> -    retval = drv_data[policy->cpu]->max_freq * perf_percent / 100;
> +    retval = policy->cpuinfo.max_freq * perf_percent / 100;
> 
>      return retval;
>  }

BTW, since drv_data->max_freq is no longer used, could you please remove this 
filed from "struct acpi_cpufreq_data", and also remove the drv_data->max_freq 
initialization code.

Best Regards
Ke

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>