xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/oprofile: adjust CPU specific initialization
@ 2012-12-07 12:59 Jan Beulich
  2012-12-07 15:10 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2012-12-07 12:59 UTC (permalink / raw)
  To: xen-devel

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

Drop support for 32-bit only CPU models as well as those that can be
dealt with by the arch_perfmon bits. Models 14 and 15 remain as
questionable (I'm not 100% positive that these don't support 64-bit
mode).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -342,37 +342,13 @@ static int __init ppro_init(char ** cpu_
 		return 0;
 
 	switch (cpu_model) {
-	case 0 ... 2:
-		*cpu_type = "i386/ppro";
-		break;
-	case 3 ... 5:
-		*cpu_type = "i386/pii";
-		break;
-	case 6 ... 8:
-	case 10 ... 11:
-		*cpu_type = "i386/piii";
-		break;
-	case 9:
-	case 13:
-		*cpu_type = "i386/p6_mobile";
-		break;
 	case 14:
 		*cpu_type = "i386/core";
 		break;
 	case 15:
-	case 23:
-	case 29:
 		*cpu_type = "i386/core_2";
 		ppro_has_global_ctrl = 1;
 		break;
-	case 26:
-		arch_perfmon_setup_counters();
-		*cpu_type = "i386/core_i7";
-		ppro_has_global_ctrl = 1;
-		break;
-	case 28:
-		*cpu_type = "i386/atom";
-		break;
 	default:
 		/* Unknown */
 		return 0;
@@ -389,6 +365,7 @@ static int __init arch_perfmon_init(char
 	*cpu_type = "i386/arch_perfmon";
 	model = &op_arch_perfmon_spec;
 	arch_perfmon_setup_counters();
+	ppro_has_global_ctrl = 1;
 	return 1;
 }
 
@@ -413,14 +390,8 @@ static int __init nmi_init(void)
 				       "AMD processor family %d is not "
 				       "supported\n", family);
 				return -ENODEV;
-			case 6:
-				model = &op_athlon_spec;
-				cpu_type = "i386/athlon";
-				break;
 			case 0xf:
 				model = &op_athlon_spec;
-				/* Actually it could be i386/hammer too, but
-				   give user space an consistent name. */
 				cpu_type = "x86-64/hammer";
 				break;
 			case 0x10:




[-- Attachment #2: x86-oprof-Intel-new.patch --]
[-- Type: text/plain, Size: 1805 bytes --]

x86/oprofile: adjust CPU specific initialization

Drop support for 32-bit only CPU models as well as those that can be
dealt with by the arch_perfmon bits. Models 14 and 15 remain as
questionable (I'm not 100% positive that these don't support 64-bit
mode).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -342,37 +342,13 @@ static int __init ppro_init(char ** cpu_
 		return 0;
 
 	switch (cpu_model) {
-	case 0 ... 2:
-		*cpu_type = "i386/ppro";
-		break;
-	case 3 ... 5:
-		*cpu_type = "i386/pii";
-		break;
-	case 6 ... 8:
-	case 10 ... 11:
-		*cpu_type = "i386/piii";
-		break;
-	case 9:
-	case 13:
-		*cpu_type = "i386/p6_mobile";
-		break;
 	case 14:
 		*cpu_type = "i386/core";
 		break;
 	case 15:
-	case 23:
-	case 29:
 		*cpu_type = "i386/core_2";
 		ppro_has_global_ctrl = 1;
 		break;
-	case 26:
-		arch_perfmon_setup_counters();
-		*cpu_type = "i386/core_i7";
-		ppro_has_global_ctrl = 1;
-		break;
-	case 28:
-		*cpu_type = "i386/atom";
-		break;
 	default:
 		/* Unknown */
 		return 0;
@@ -389,6 +365,7 @@ static int __init arch_perfmon_init(char
 	*cpu_type = "i386/arch_perfmon";
 	model = &op_arch_perfmon_spec;
 	arch_perfmon_setup_counters();
+	ppro_has_global_ctrl = 1;
 	return 1;
 }
 
@@ -413,14 +390,8 @@ static int __init nmi_init(void)
 				       "AMD processor family %d is not "
 				       "supported\n", family);
 				return -ENODEV;
-			case 6:
-				model = &op_athlon_spec;
-				cpu_type = "i386/athlon";
-				break;
 			case 0xf:
 				model = &op_athlon_spec;
-				/* Actually it could be i386/hammer too, but
-				   give user space an consistent name. */
 				cpu_type = "x86-64/hammer";
 				break;
 			case 0x10:

[-- 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] 2+ messages in thread

* Re: [PATCH] x86/oprofile: adjust CPU specific initialization
  2012-12-07 12:59 [PATCH] x86/oprofile: adjust CPU specific initialization Jan Beulich
@ 2012-12-07 15:10 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2012-12-07 15:10 UTC (permalink / raw)
  To: Jan Beulich, xen-devel

On 07/12/2012 12:59, "Jan Beulich" <JBeulich@suse.com> wrote:

> Drop support for 32-bit only CPU models as well as those that can be
> dealt with by the arch_perfmon bits. Models 14 and 15 remain as
> questionable (I'm not 100% positive that these don't support 64-bit
> mode).
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

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

> --- a/xen/arch/x86/oprofile/nmi_int.c
> +++ b/xen/arch/x86/oprofile/nmi_int.c
> @@ -342,37 +342,13 @@ static int __init ppro_init(char ** cpu_
> return 0;
>  
> switch (cpu_model) {
> - case 0 ... 2:
> -  *cpu_type = "i386/ppro";
> -  break;
> - case 3 ... 5:
> -  *cpu_type = "i386/pii";
> -  break;
> - case 6 ... 8:
> - case 10 ... 11:
> -  *cpu_type = "i386/piii";
> -  break;
> - case 9:
> - case 13:
> -  *cpu_type = "i386/p6_mobile";
> -  break;
> case 14:
> *cpu_type = "i386/core";
> break;
> case 15:
> - case 23:
> - case 29:
> *cpu_type = "i386/core_2";
> ppro_has_global_ctrl = 1;
> break;
> - case 26:
> -  arch_perfmon_setup_counters();
> -  *cpu_type = "i386/core_i7";
> -  ppro_has_global_ctrl = 1;
> -  break;
> - case 28:
> -  *cpu_type = "i386/atom";
> -  break;
> default:
> /* Unknown */
> return 0;
> @@ -389,6 +365,7 @@ static int __init arch_perfmon_init(char
> *cpu_type = "i386/arch_perfmon";
> model = &op_arch_perfmon_spec;
> arch_perfmon_setup_counters();
> + ppro_has_global_ctrl = 1;
> return 1;
>  }
>  
> @@ -413,14 +390,8 @@ static int __init nmi_init(void)
>       "AMD processor family %d is not "
>       "supported\n", family);
> return -ENODEV;
> -   case 6:
> -    model = &op_athlon_spec;
> -    cpu_type = "i386/athlon";
> -    break;
> case 0xf:
> model = &op_athlon_spec;
> -    /* Actually it could be i386/hammer too, but
> -       give user space an consistent name. */
> cpu_type = "x86-64/hammer";
> break;
> case 0x10:
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2012-12-07 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-07 12:59 [PATCH] x86/oprofile: adjust CPU specific initialization Jan Beulich
2012-12-07 15:10 ` 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).