[PATCH V2 16/17] platform/x86/intel/pmc/ssram: Make PMT registration optional

David E. Box
2026-03-25T01:48:35Z

The SSRAM telemetry driver extracts essential PMC device ID and power
management base address information that intel_pmc_core depends on for core
functionality. If PMT registration failure prevents this critical data from
being available, intel_pmc_core operation would break entirely. Therefore,
PMT registration failures must not block access to this data.

Change the behavior to log a warning when PMT registration fails but
continue with successful driver initialization, ensuring the primary
telemetry data remains accessible to dependent drivers.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---

V2 changes:
- Update commit message for clarity
- Also apply the PCI telemetry path

drivers/platform/x86/intel/pmc/ssram_telemetry.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/intel/pmc/ssram_telemetry.c b/drivers/platform/x86/intel/pmc/ssram_telemetry.c
index 543f7d7c5049..74a2f56881c1 100644
--- a/drivers/platform/x86/intel/pmc/ssram_telemetry.c
+++ b/drivers/platform/x86/intel/pmc/ssram_telemetry.c
@@ -107,6 +107,7 @@ static int
pmc_ssram_telemetry_get_pmc_pci(struct pci_dev *pcidev, unsigned int pmc_idx, u32 offset)
{
u64 ssram_base;
+ int ret;

ssram_base = pci_resource_start(pcidev, 0);
void __iomem __free(pmc_ssram_telemetry_iounmap) *tmp_ssram =
@@ -132,7 +133,9 @@ pmc_ssram_telemetry_get_pmc_pci(struct pci_dev *pcidev, unsigned int pmc_idx, u3
pmc_ssram_get_devid_pwrmbase(ssram, pmc_idx);

/* Find and register and PMC telemetry entries */
- return pmc_ssram_telemetry_add_pmt(pcidev, ssram_base, ssram);
+ ret = pmc_ssram_telemetry_add_pmt(pcidev, ssram_base, ssram);
+ if (ret)
+ dev_warn(&pcidev->dev, "could not register PMT\n");
} else {
void __iomem __free(pmc_ssram_telemetry_iounmap) *ssram =
no_free_ptr(tmp_ssram);
@@ -140,8 +143,12 @@ pmc_ssram_telemetry_get_pmc_pci(struct pci_dev *pcidev, unsigned int pmc_idx, u3
pmc_ssram_get_devid_pwrmbase(ssram, pmc_idx);

/* Find and register and PMC telemetry entries */
- return pmc_ssram_telemetry_add_pmt(pcidev, ssram_base, ssram);
+ ret = pmc_ssram_telemetry_add_pmt(pcidev, ssram_base, ssram);
+ if (ret)
+ dev_warn(&pcidev->dev, "could not register PMT\n");
}
+
+ return 0;
}

static int pmc_ssram_telemetry_pci_init(struct pci_dev *pcidev)
@@ -214,7 +221,7 @@ static int pmc_ssram_telemetry_acpi_init(struct pci_dev *pcidev,

ret = intel_vsec_register(&pcidev->dev, &info);
if (ret)
- return ret;
+ dev_warn(&pcidev->dev, "could not register PMT\n");

return pmc_ssram_telemetry_get_pmc_acpi(pcidev, index);
}
--
2.43.0