indications for oprofile in compact mode
This patch allows Performance monitoring driver to detect when operating in PowerPC compliance mode.
use patch -p0 to apply.
==========================================================================
arch/powerpc/kernel/cputable.c +11 -0
@@ -352,6 +352,7 @@ .icache_bsize = 128, .dcache_bsize = 128, .machine_check = machine_check_generic, + .oprofile_cpu_type = "ppc64/compat-power5+", .platform = "power5+", }, {/* Power6 */
@@ -383,6 +384,7 @@ .icache_bsize = 128, .dcache_bsize = 128, .machine_check = machine_check_generic, + .oprofile_cpu_type = "ppc64/compat-power6", .platform = "power6", }, {/* 2.06-compliant processor, i.e. Power7 "architected" mode */
@@ -394,6 +396,7 @@ .icache_bsize = 128, .dcache_bsize = 128, .machine_check = machine_check_generic, + .oprofile_cpu_type = "ppc64/compat-power7", .platform = "power7", }, {/* Power7 */
@@ -1593,6 +1596,12 @@* from the real PVR with a new value obtained * using a logical PVR value, don't modify the * performance monitor fields. +* The performance monitor sub-system needs to have +* access to the values from the real PVR, but, at +* the same time it needs to be aware it may be running +* in compatibility mode. We we are changing the values +* for the real PVR to those of the compatibility PVR, +* change the oprofile_cpu_type field as well. */ if (t->num_pmcs && !s->num_pmcs) { t->cpu_name = s->cpu_name;
@@ -1603,6 +1612,8 @@ t->cpu_setup = s->cpu_setup; t->cpu_restore = s->cpu_restore; t->platform = s->platform; +if (t->oprofile_cpu_type ==NULL ) + t->oprofile_cpu_type = s->oprofile_cpu_type; }else *t = *s; *PTRRELOC (&cur_cpu_spec) = &the_cpu_spec;
Quoted 2 lines · torez
plain text document attachment (Indications oprofile in compact mode.txt)
Please don't send patches at attachments.
Quoted 2 lines
This patch allows Performance monitoring driver to detect when operating in PowerPC compliance mode.
And why is that needed? The reason should be included in the changelog for the patch.
Quoted 1 line
use patch -p0 to apply.
This seems wrong. The patch looks like a -p1 to me.
You're missing your Signed-off-by line. SeeDocumentation/SubmittingPatches.
Quoted 30 lines
==========================================================================
diff -urNlinux-2.6.26-rc7.orig/arch/powerpc/kernel/cputable.clinux-2.6.26-rc7/arch/powerpc/kernel/cputable.carch/powerpc/kernel/cputable.c +3
-0@@ -352,6 +352,7 @@ .icache_bsize = 128, .dcache_bsize = 128, .machine_check = machine_check_generic, + .oprofile_cpu_type = "ppc64/compat-power5+", .platform = "power5+", }, {/* Power6 */ @@ -383,6 +384,7 @@ .icache_bsize = 128, .dcache_bsize = 128, .machine_check = machine_check_generic, + .oprofile_cpu_type = "ppc64/compat-power6", .platform = "power6", }, {/* 2.06-compliant processor, i.e. Power7 "architected" mode */ @@ -394,6 +396,7 @@ .icache_bsize = 128, .dcache_bsize = 128, .machine_check = machine_check_generic, + .oprofile_cpu_type = "ppc64/compat-power7", .platform = "power7", }, {/* Power7 */
arch/powerpc/kernel/cputable.c line 1602
Quoted 7 lines
arch/powerpc/kernel/cputable.c +4
-0@@ -1593,6 +1596,12 @@* from the real PVR with a new value obtained * using a logical PVR value, don't modify the * performance monitor fields. +* The performance monitor sub-system needs to have +* access to the values from the real PVR, but, at +* the same time it needs to be aware it may be running +* in compatibility mode. We we are changing the values
When ^ ?
arch/powerpc/kernel/cputable.c line 1604
Quoted 2 lines
arch/powerpc/kernel/cputable.c +2
-0+* for the real PVR to those of the compatibility PVR, +* change the oprofile_cpu_type field as well.
You might want to change the original comment to not say "...don't modify the performance monitor fields." Your addition explains why, but it doesn't flow well with the original comment.
josh