commit 2657dd4e301d4841ed67a4fac7d145ad8f3e1b28 introduced a bug where we would now always override the "real" oprofile CPU type with the "compatible" one provided by a pseudo-PVR in the device-tree which is incorrect and breaks oprofile on all current configs since the "compatible" ones aren't yet recognized.
This fixes it. Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- Bug hit 2.6.29 too. I'll send this to Linus and Greg tomorrow unless somebody thinks it's wrong. I've tested on POWER6 and verified the bug and the fix. arch/powerpc/kernel/cputable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-work.orig/arch/powerpc/kernel/cputable.c 2009-04-30 14:22:30.000000000 +1000 +++ linux-work/arch/powerpc/kernel/cputable.c 2009-04-30 14:22:41.000000000 +1000 @@ -1833,8 +1833,8 @@ 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) - t->oprofile_cpu_type = s->oprofile_cpu_type; + if (old.oprofile_cpu_type != NULL) + t->oprofile_cpu_type = old.oprofile_cpu_type; } *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev