Re: perf hw in kexeced kernel broken in tip

From: Peter Zijlstra
Date: Wed Dec 08 2010 - 05:40:24 EST


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..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/