powerpc/pseries: Really fix the oprofile CPU type on pseries
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 14 May 2009 18:34:06 +0000 (18:34 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 15 May 2009 06:43:42 +0000 (16:43 +1000)
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>
arch/powerpc/kernel/cputable.c

index f9c40f869c6e8088abd17d01213377fe5538f985..3e33fb933d991e885172675687e75195f5e52b57 100644 (file)
@@ -1836,7 +1836,7 @@ static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
                 * 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;
                }