linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use of Performance Monitoring Counters based on Model number
@ 2003-07-16 17:07 Pallipadi, Venkatesh
  2003-07-16 17:19 ` John Levon
  0 siblings, 1 reply; 3+ messages in thread
From: Pallipadi, Venkatesh @ 2003-07-16 17:07 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, Mallick, Asit K



Attached is a small patch to make Linux kernel use of performance
monitoring MSRs based on known processor models. Future processor
implementation models may not support the same MSR layout.

Please apply.

Thanks,
-Venkatesh




--- linux-2.5.72-monitor/arch/i386/kernel/nmi.c.org	2003-06-16
21:20:02.000000000 -0700
+++ linux-2.5.72-monitor/arch/i386/kernel/nmi.c	2003-06-20
15:47:29.000000000 -0700
@@ -157,9 +157,15 @@
 	case X86_VENDOR_INTEL:
 		switch (boot_cpu_data.x86) {
 		case 6:
+			if (boot_cpu_data.x86_model > 0xd)
+				break;
+
 			wrmsr(MSR_P6_EVNTSEL0, 0, 0);
 			break;
 		case 15:
+			if (boot_cpu_data.x86_model > 0x3)
+				break;
+
 			wrmsr(MSR_P4_IQ_CCCR0, 0, 0);
 			wrmsr(MSR_P4_CRU_ESCR0, 0, 0);
 			break;
@@ -324,9 +338,15 @@
 	case X86_VENDOR_INTEL:
 		switch (boot_cpu_data.x86) {
 		case 6:
+			if (boot_cpu_data.x86_model > 0xd)
+				return;
+
 			setup_p6_watchdog();
 			break;
 		case 15:
+			if (boot_cpu_data.x86_model > 0x3)
+				return;
+
 			if (!setup_p4_watchdog())
 				return;
 			break;



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

end of thread, other threads:[~2003-07-16 17:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16 17:07 [PATCH] Use of Performance Monitoring Counters based on Model number Pallipadi, Venkatesh
2003-07-16 17:19 ` John Levon
2003-07-16 18:05   ` Dave Jones

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