From 0203d6ec4e88062f20558fbed3cdff2af758a53b Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 29 Apr 2009 19:39:38 +0000 Subject: [PATCH] powerpc: Fix setting of oprofile cpu type 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 --- arch/powerpc/kernel/cputable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 5e925dbffbf..f9c40f869c6 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -1837,8 +1837,8 @@ static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s) * oprofile_cpu_type. */ if (old.oprofile_cpu_type == NULL) { - t->oprofile_cpu_type = s->oprofile_cpu_type; - t->oprofile_type = s->oprofile_type; + t->oprofile_cpu_type = old.oprofile_cpu_type; + t->oprofile_type = old.oprofile_type; } } -- 2.32.0.93.g670b81a890