]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/intel/pmt: Use PMT callbacks
authorDavid E. Box <david.e.box@linux.intel.com>
Thu, 25 Jul 2024 12:23:42 +0000 (08:23 -0400)
committerHans de Goede <hdegoede@redhat.com>
Mon, 12 Aug 2024 14:21:31 +0000 (16:21 +0200)
commit045a513040cc0242d364c05c3791594e2294f32d
tree3955cb4bfcabf537483a850a91e06db06249fbf1
parente92affc74cd8624a548b380af7364be037adef35
platform/x86/intel/pmt: Use PMT callbacks

PMT providers may require device specific actions before their telemetry
may be read. If the read_telem() is assigned, call it instead of
memcpy_fromio() and return. Since this needs to be done in multiple
locations, add pmt_telem_read_mmio() as a wrapper function to perform this
and any other needed checks.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20240725122346.4063913-4-michael.j.ruhl@intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/pmt/class.c
drivers/platform/x86/intel/pmt/class.h
drivers/platform/x86/intel/pmt/telemetry.c