RE: [patch 04/11] x86/perf/intel_uncore: Cleanup hardware on exit
From: Thomas Gleixner
Date: Wed Feb 17 2016 - 17:01:24 EST
On Wed, 17 Feb 2016, Liang, Kan wrote:
> > If there is a single instance of exit_box() in that patch which flips the wrong
> > bits, then please point it out with the proper reference in the manual and
> > not with such half baken statements as above.
> >
> Sorry, I didn't make it clear.
> For the older server platforms like nhmex and client platforms like snb, I agree
> with you on nhmex_uncore_msr_exit_box and snb_uncore_imc_exit_box.
>
> However, for newer server platforms (start from IVB server), we cannot write 0
> to rsv bit of BOX control registers. The behavior is undefined.
> The following codes may have issues.
> It looks we also write 0 to rsv bit in box_init. We may need to fix it.
Each platform can have its own init/exit callbacks or just omit them when not
needed. But we certainly want them for platforms where it is either needed
(i.e. undo ioremap) or makes sense from the hardware POV.
Thanks,
tglx