Hi, On Mon, Mar 08, 2021 at 07:37:07AM -0800, Doug Smythies wrote: > On Mon, Mar 8, 2021 at 5:50 AM youling257 <youling...@gmail.com> wrote: > > > > this cause turbostat not work on amd cpu. > > > > root@localhost:~# /turbostat > > turbostat version 20.09.30 - Len Brown <l...@kernel.org> > > CPUID(0): AuthenticAMD 0xd CPUID levels; 0x8000001f xlevels; > > family:model:stepping 0x17:18:1 (23:24:1) > > There are already two fixes for this in the queue. > https://marc.info/?l=linux-pm&m=161382097503925&w=2 > https://marc.info/?l=linux-pm&m=161141701219263&w=2 Thanks for reporting and pointing this out. I assume these two patches are both fixing the same issue? It looks like these two patches should be merged into one: 1. Bingsong's patch access MSR_PKG_ENERGY_STAT only when RAPL_AMD_F17H is set, which is consistent with the original context. 2. Bas Nieuwenhuizen's patch also fixes the issue in idx_valid() in case RAPL_PKG was not set but with RAPL_AMD_F17H set.
thanks, Chenyu