powerpc/pseries: Really fix the oprofile CPU type on pseries

Submitted by Benjamin Herrenschmidt on May 15, 2009, 4:34 a.m.

Details

Message ID 20090515043414.E5C7ADE071@ozlabs.org
State Accepted, archived
Commit b173f03d7c48d3346541f26e0b29690dbadca279
Headers show

Commit Message

Benjamin Herrenschmidt May 15, 2009, 4:34 a.m.
My previous pach for fixing the oprofile CPU type got somewhat mismerged
(by my fault) when it collided with another related patch. This should
finally (fingers crossed) fix the whole thing.

We make sure we keep the -old- oprofile type and CPU type whenever
one of them was specified in the first pass through the function.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

More eyes welcome to check I finally got that right.

 arch/powerpc/kernel/cputable.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

--- linux-work.orig/arch/powerpc/kernel/cputable.c	2009-05-15 14:24:53.000000000 +1000
+++ linux-work/arch/powerpc/kernel/cputable.c	2009-05-15 14:27:04.000000000 +1000
@@ -1836,7 +1836,7 @@  static void __init setup_cpu_spec(unsign
 		 * and, in that case, keep the current value for
 		 * oprofile_cpu_type.
 		 */
-		if (old.oprofile_cpu_type == NULL) {
+		if (old.oprofile_cpu_type != NULL) {
 			t->oprofile_cpu_type = old.oprofile_cpu_type;
 			t->oprofile_type = old.oprofile_type;
 		}