diff options
| author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2024-11-14 08:03:57 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 14:01:35 +0100 |
| commit | 73521f1855523764becd40546f925085eeac06ce (patch) | |
| tree | 5c364a0a67e5e0ce3753d90476e36c179ddc425f /include | |
| parent | 1c00bb70f3ad03d13077472c6bfad7477ab36efb (diff) | |
| download | linux-73521f1855523764becd40546f925085eeac06ce.tar.gz linux-73521f1855523764becd40546f925085eeac06ce.tar.bz2 linux-73521f1855523764becd40546f925085eeac06ce.zip | |
platform/x86/intel/pmt: allow user offset for PMT callbacks
[ Upstream commit 0c32840763b1579c923b4216c18bb756ca4ba473 ]
Usage of the telem sysfs file allows for partial reads at an offset.
The current callback method returns the buffer starting from offset 0
only.
Include the requested offset in the callback and update the necessary
address calculations with the offset.
Note: offset addition is moved from the caller to the local usage. For
non-callback usage this is unchanged behavior.
Fixes: e92affc74cd8 ("platform/x86/intel/vsec: Add PMT read callbacks")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20241114130358.2467787-2-michael.j.ruhl@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/intel_vsec.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/intel_vsec.h b/include/linux/intel_vsec.h index 11ee185566c3..b94beab64610 100644 --- a/include/linux/intel_vsec.h +++ b/include/linux/intel_vsec.h @@ -74,10 +74,11 @@ enum intel_vsec_quirks { * @pdev: PCI device reference for the callback's use * @guid: ID of data to acccss * @data: buffer for the data to be copied + * @off: offset into the requested buffer * @count: size of buffer */ struct pmt_callbacks { - int (*read_telem)(struct pci_dev *pdev, u32 guid, u64 *data, u32 count); + int (*read_telem)(struct pci_dev *pdev, u32 guid, u64 *data, loff_t off, u32 count); }; /** |
