On Tue, Feb 24, 2009 at 6:09 AM, Octavian Purdila <opurd...@ixiacom.com> wrote: > Signed-off-by: Octavian Purdila <opurd...@ixiacom.com> > --- > arch/powerpc/kernel/cputable.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c > index 923f87a..4e20cfb 100644 > --- a/arch/powerpc/kernel/cputable.c > +++ b/arch/powerpc/kernel/cputable.c > @@ -726,6 +726,8 @@ static struct cpu_spec __initdata cpu_specs[] = { > .cpu_setup = __setup_cpu_750, > .machine_check = machine_check_generic, > .platform = "ppc750", > + .oprofile_cpu_type = "ppc/7450", > + .oprofile_type = PPC_OPROFILE_G4, > },
I know this saves you some code, but it seems hacky. It would be better to modify oprofile to detect the proper cpu type. Also, this will screw things up if you try to use the different event set that the 750 has. Also, one more concern is the long-standing errata which makes this quite dangerous. All of the versions of the 750 I'm aware of have a bug where if a Performance Monitor exception occurs within one cycle of the Decrementer exception, the cpu will lose the ability to return from the interrupt (SRR0/SRR1 become corrupted). It's possible the 750s you have modified to support oprofile don't have this errata. Alternatively, we can decide we don't care, as you have to be root to use oprofile. But this is why I didn't add support for anything before the 7450. Andy _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev