Skip to contentSkip to conversation

oprofile, x86: updates for AMD family 15h systems

PATCH New Robert Richter 1 participant 2 messages Dec 10, 2010 x86

lore
Share & tools
lore
#0 lore raw

cover oprofile, x86: updates for AMD family 15h systems

This patch set adds support for AMD family 15h systems. It adds cpu detection code for family 15h and implements support for 6 counters.

Suravee already sent updates for the oprofile userland to the oprofile mailing list.

Please review. If the patches are fine I will apply them to the oprofile git repostitory on kernel.org.

Thanks,

-Robert

Quoted 1 line

From [email protected] Fri Dec 10 12:29:57 2010 +0100

From: Robert Richter <[email protected]>
To: Ingo Molnar <[email protected]>
Cc: LKML <[email protected]>, oprofile-list <[email protected]>, Robert Richter <[email protected]>
Bcc: [email protected]
Subject: [PATCH 1/2] oprofile, x86: Add support for AMD family 15h
Date: Fri, 10 Dec 2010 12:29:57 +0100
Message-Id: <[email protected]>
X-Mailer: git-send-email 1.7.3.2
In-Reply-To: <[email protected]>
References: <[email protected]>

This patch adds support for AMD family 15h (Interlagos/Valencia/ Zambezi) cpus.

---
 arch/x86/oprofile/nmi_int.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/x86/oprofile/nmi_int.c +3 -0
index 4e8baad..358c8b9 100644
@@ -732,6 +732,9 @@ int __init op_nmi_init(struct oprofile_operations *ops)
 		case 0x14:
 			cpu_type = "x86-64/family14h";
 			break;
+		case 0x15:
+			cpu_type = "x86-64/family15h";
+			break;
 		default:
 			return -ENODEV;
 		}
Signature · 1 line
1.7.3.2
#1 lore raw

PATCH 2/2 oprofile, x86: Add support for 6 counters (AMD family 15h)

This patch adds support for up to 6 hardware counters for AMD family 15h cpus. There is a new MSR range for hardware counters beginning at MSRC001_0200 Performance Event Select (PERF_CTL0).

---
 arch/x86/include/asm/msr-index.h |    4 +++
 arch/x86/oprofile/op_model_amd.c |   54 +++++++++++++++++++++++++------------
 2 files changed, 40 insertions(+), 18 deletions(-)
arch/x86/include/asm/msr-index.h +4 -0
index 3ea3dc4..e1636d6 100644
@@ -123,6 +123,10 @@
 #define MSR_AMD64_IBSCTL		0xc001103a
 #define MSR_AMD64_IBSBRTARGET		0xc001103b
 
+/* Fam 15h MSRs */
+#define MSR_F15H_PERF_CTL		0xc0010200
+#define MSR_F15H_PERF_CTR		0xc0010201
+
 /* Fam 10h MSRs */
 #define MSR_FAM10H_MMIO_CONF_BASE	0xc0010058
 #define FAM10H_MMIO_CONF_ENABLE		(1<<0)
arch/x86/oprofile/op_model_amd.c +36 -18

143 lines not on this page · raw message

Signature · 1 line
1.7.3.2