* [PATCH] platform/x86/intel/tpmi: Change vsec offset to u64
@ 2024-03-05 19:46 Srinivas Pandruvada
2024-03-06 11:01 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Pandruvada @ 2024-03-05 19:46 UTC (permalink / raw)
To: hdegoede, markgross, ilpo.jarvinen, andriy.shevchenko
Cc: platform-driver-x86, linux-kernel, Srinivas Pandruvada, stable
The vsec offset can be 64 bit long depending on the PFS start. So change
type to u64. Also use 64 bit formatting for seq_printf.
Fixes: 47731fd2865f ("platform/x86/intel: Intel TPMI enumeration driver")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: <stable@vger.kernel.org> # v6.3+
---
This is a forward looking change. There is no platform with this issue.
This can go through regular cycle.
drivers/platform/x86/intel/tpmi.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel/tpmi.c b/drivers/platform/x86/intel/tpmi.c
index e73cdea67fff..910df7c654f4 100644
--- a/drivers/platform/x86/intel/tpmi.c
+++ b/drivers/platform/x86/intel/tpmi.c
@@ -96,7 +96,7 @@ struct intel_tpmi_pfs_entry {
*/
struct intel_tpmi_pm_feature {
struct intel_tpmi_pfs_entry pfs_header;
- unsigned int vsec_offset;
+ u64 vsec_offset;
struct intel_vsec_device *vsec_dev;
};
@@ -376,7 +376,7 @@ static int tpmi_pfs_dbg_show(struct seq_file *s, void *unused)
read_blocked = feature_state.read_blocked ? 'Y' : 'N';
write_blocked = feature_state.write_blocked ? 'Y' : 'N';
}
- seq_printf(s, "0x%02x\t\t0x%02x\t\t0x%04x\t\t0x%04x\t\t0x%02x\t\t0x%08x\t%c\t%c\t\t%c\t\t%c\n",
+ seq_printf(s, "0x%02x\t\t0x%02x\t\t0x%04x\t\t0x%04x\t\t0x%02x\t\t0x%016llx\t%c\t%c\t\t%c\t\t%c\n",
pfs->pfs_header.tpmi_id, pfs->pfs_header.num_entries,
pfs->pfs_header.entry_size, pfs->pfs_header.cap_offset,
pfs->pfs_header.attribute, pfs->vsec_offset, locked, disabled,
@@ -395,7 +395,8 @@ static int tpmi_mem_dump_show(struct seq_file *s, void *unused)
struct intel_tpmi_pm_feature *pfs = s->private;
int count, ret = 0;
void __iomem *mem;
- u32 off, size;
+ u32 size;
+ u64 off;
u8 *buffer;
size = TPMI_GET_SINGLE_ENTRY_SIZE(pfs);
@@ -411,7 +412,7 @@ static int tpmi_mem_dump_show(struct seq_file *s, void *unused)
mutex_lock(&tpmi_dev_lock);
for (count = 0; count < pfs->pfs_header.num_entries; ++count) {
- seq_printf(s, "TPMI Instance:%d offset:0x%x\n", count, off);
+ seq_printf(s, "TPMI Instance:%d offset:0x%llx\n", count, off);
mem = ioremap(off, size);
if (!mem) {
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86/intel/tpmi: Change vsec offset to u64
2024-03-05 19:46 [PATCH] platform/x86/intel/tpmi: Change vsec offset to u64 Srinivas Pandruvada
@ 2024-03-06 11:01 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2024-03-06 11:01 UTC (permalink / raw)
To: Srinivas Pandruvada
Cc: Hans de Goede, markgross, Andy Shevchenko, platform-driver-x86,
LKML, stable
On Tue, 5 Mar 2024, Srinivas Pandruvada wrote:
> The vsec offset can be 64 bit long depending on the PFS start. So change
> type to u64. Also use 64 bit formatting for seq_printf.
>
> Fixes: 47731fd2865f ("platform/x86/intel: Intel TPMI enumeration driver")
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v6.3+
> ---
> This is a forward looking change. There is no platform with this issue.
> This can go through regular cycle.
I've applied this to review-ilpo.
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-06 11:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 19:46 [PATCH] platform/x86/intel/tpmi: Change vsec offset to u64 Srinivas Pandruvada
2024-03-06 11:01 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).