diff options
Diffstat (limited to 'drivers/platform/x86/intel')
5 files changed, 20 insertions, 5 deletions
| diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h index e136d18b1d38..4a94a4ee031e 100644 --- a/drivers/platform/x86/intel/pmc/core.h +++ b/drivers/platform/x86/intel/pmc/core.h @@ -299,6 +299,13 @@ enum ppfear_regs {  #define PTL_PCD_PMC_MMIO_REG_LEN		0x31A8  /* SSRAM PMC Device ID */ +/* LNL */ +#define PMC_DEVID_LNL_SOCM	0xa87f + +/* PTL */ +#define PMC_DEVID_PTL_PCDH	0xe37f +#define PMC_DEVID_PTL_PCDP	0xe47f +  /* ARL */  #define PMC_DEVID_ARL_SOCM	0x777f  #define PMC_DEVID_ARL_SOCS	0xae7f diff --git a/drivers/platform/x86/intel/pmc/ssram_telemetry.c b/drivers/platform/x86/intel/pmc/ssram_telemetry.c index b207247eb5dd..93579152188e 100644 --- a/drivers/platform/x86/intel/pmc/ssram_telemetry.c +++ b/drivers/platform/x86/intel/pmc/ssram_telemetry.c @@ -187,6 +187,9 @@ static const struct pci_device_id intel_pmc_ssram_telemetry_pci_ids[] = {  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PMC_DEVID_MTL_SOCM) },  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PMC_DEVID_ARL_SOCS) },  	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PMC_DEVID_ARL_SOCM) }, +	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PMC_DEVID_LNL_SOCM) }, +	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PMC_DEVID_PTL_PCDH) }, +	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PMC_DEVID_PTL_PCDP) },  	{ }  };  MODULE_DEVICE_TABLE(pci, intel_pmc_ssram_telemetry_pci_ids); diff --git a/drivers/platform/x86/intel/tpmi_power_domains.c b/drivers/platform/x86/intel/tpmi_power_domains.c index 0c5c88eb7baf..9d8247bb9cfa 100644 --- a/drivers/platform/x86/intel/tpmi_power_domains.c +++ b/drivers/platform/x86/intel/tpmi_power_domains.c @@ -228,8 +228,10 @@ static int __init tpmi_init(void)  	domain_die_map = kcalloc(size_mul(topology_max_packages(), MAX_POWER_DOMAINS),  				 sizeof(*domain_die_map), GFP_KERNEL); -	if (!domain_die_map) +	if (!domain_die_map) { +		ret = -ENOMEM;  		goto free_domain_mask; +	}  	ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,  				"platform/x86/tpmi_power_domains:online", diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c index 0f8aea18275b..65897fae17df 100644 --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c @@ -58,7 +58,7 @@ static ssize_t show_agent_types(struct kobject *kobj, struct kobj_attribute *att  		if (length)  			length += sysfs_emit_at(buf, length, " "); -		length += sysfs_emit_at(buf, length, agent_name[agent]); +		length += sysfs_emit_at(buf, length, "%s", agent_name[agent]);  	}  	length += sysfs_emit_at(buf, length, "\n"); diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c index 1c7b2f2716ca..44d9948ed224 100644 --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c @@ -511,10 +511,13 @@ static int uncore_probe(struct auxiliary_device *auxdev, const struct auxiliary_  	/* Get the package ID from the TPMI core */  	plat_info = tpmi_get_platform_data(auxdev); -	if (plat_info) -		pkg = plat_info->package_id; -	else +	if (unlikely(!plat_info)) {  		dev_info(&auxdev->dev, "Platform information is NULL\n"); +		ret = -ENODEV; +		goto err_rem_common; +	} + +	pkg = plat_info->package_id;  	for (i = 0; i < num_resources; ++i) {  		struct tpmi_uncore_power_domain_info *pd_info; | 
