Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 2975

kernel-2.6.18-194.11.1.el5.src.rpm

From: Scott Moser <smoser@redhat.com>
Date: Wed, 12 Dec 2007 14:07:08 -0500
Subject: [ppc64] oprofile: power5+ needs unique entry
Message-id: Pine.LNX.4.64.0712121403380.19799@squad5-lp1.lab.boston.redhat.com
O-Subject: [PATCH RHEL5u2] bz244719 DD3.0 POWER5+ needs unique entry in cputable.c
Bugzilla: 244719

Bug 244719 [1]
---------------

Description:
-----------
The DD3.0 (or later) POWER5+ processors need special handling by
performance tools like OProfile.  A unique entry in
arch/powerpc/cputable.c is needed (with the oprofile_cpu_type field set
accordingly) to uniquely identify the processor as distinct from pre-DD3.0
POWER5+ processors.

When starting oprofile with 'opcontrol --init', the /dev/oprofile/cpu_type
for a DD3.0 POWER5+ is "ppc64/power5+", which is not distinct from a
pre-DD3.0 POWER5+.

An upgrade of oprofile from 0.9.2 to 0.9.3 would (per bug 253109) would
provide a solution to 244717, and thus we would also need this patch.

I am posting this patch now, to make sure it gets in before the patch
deadline.  However, I have not been able to verify whether or not the
oprofile user space bug will be fixed.  Please do not pull this patch into
RHEL5u2 if it is not.

Kernel Version:
--------------
Patch built against 2.6.18-54

Upstream Status:
---------------
This code is present upstream with git commit
31a12cece7c71c47e61ab8ed45bbff5aac4c1931

Test Status:
----
To ensure cross platform build, a brew scratch build has been done against
2.6.18-54 at [2].

This patch has been tested by IBM and is present in upstream kernels
and oprofile upstream.

Please review patch below for RHEL5u2
--
[1]:https://bugzilla.redhat.com/show_bug.cgi?id=244719
--
 arch/powerpc/kernel/cputable.c |   15 +++++++++++++++
 2 files changed, 15 insertions(+), 4 deletions(-)

Acked-by: David Howells <dhowells@redhat.com>

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index d1ab8e0..15f61a5 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -237,6 +237,21 @@ static struct cpu_spec cpu_specs[] = {
 		.oprofile_mmcra_sipr	= MMCRA_SIPR,
 		.platform		= "power5",
 	},
+	{	/* Power5++ */
+		.pvr_mask		= 0xffffff00,
+		.pvr_value		= 0x003b0300,
+		.cpu_name		= "POWER5+ (gs)",
+		.cpu_features		= CPU_FTRS_POWER5,
+		.cpu_user_features	= COMMON_USER_POWER5_PLUS,
+		.icache_bsize		= 128,
+		.dcache_bsize		= 128,
+		.num_pmcs		= 6,
+		.oprofile_cpu_type	= "ppc64/power5++",
+		.oprofile_type		= PPC_OPROFILE_POWER4,
+		.oprofile_mmcra_sihv	= MMCRA_SIHV,
+		.oprofile_mmcra_sipr	= MMCRA_SIPR,
+		.platform		= "power5+",
+	},
 	{	/* Power5 GS */
 		.pvr_mask		= 0xffff0000,
 		.pvr_value		= 0x003b0000,