Re: perf hw in kexeced kernel broken in tip

Peter Zijlstra
2010-12-08T10:40:17Z

On Tue, 2010-12-07 at 16:26 -0800, Yinghai Lu wrote:
> > +++ b/arch/x86/kernel/cpu/perf_event.c
> > @@ -377,10 +377,10 @@ static bool check_hw_exists(void)
> > u64 val, val_new = 0;
> > int ret = 0;
> >
> > - val = 0xabcdUL;
> > - ret |= checking_wrmsrl(x86_pmu.perfctr, val);
> > - ret |= rdmsrl_safe(x86_pmu.perfctr, &val_new);
> > - if (ret || val != val_new)
> > + val = 0xabUL;
> > + ret |= checking_wrmsrl(x86_pmu.eventsel, val);
> > + ret |= rdmsrl_safe(x86_pmu.eventsel, &val_new);
> > + if (ret || val != (val_new & 0xFF))
> > return false;
> >
> > return true;
>
> Thanks. it fixes the problem.
>
Won't merge it though, I think it stinks..