Skip to contentSkip to conversation

oprofile, x86: updates for AMD family 15h systems

PATCH In review Robert Richter 1 participant 4 messages Dec 10, 2010 – Dec 19, 2010 x86

lore
Share & tools
lore
#0 lore raw

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

(resending due to mail corruption)

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

#1 lore raw

PATCH 1/2 oprofile, x86: Add support for AMD family 15h

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
#2 lore raw

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

In reply to Robert Richter

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
#3 lore raw
In reply to Robert Richter
Quoted 10 lines · Robert Richter

(resending due to mail corruption)

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.

I applied the patches to

git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git core

-Robert

Signature · 2 lines
Advanced Micro Devices, Inc.
Operating System Research Center