Skip to contentSkip to conversation

stm class/intel_th: Fixes for v5.11

PATCH In review Alexander Shishkin 2 participants 4 messages Jan 15, 2021 – Jan 21, 2021

Subsystems (4)
lore
Share & tools
lore

Alexander Shishkin

author maintainer
#0 lore raw

cover stm class/intel_th: Fixes for v5.11

Hi Greg,

Here are updates that I have for v5.11. These are: one minor bugfix and a new PCI ID.

Alexander Shishkin (1):
intel_th: pci: Add Alder Lake-P support

Wang Hui (1):
stm class: Fix module init return on allocation failure

 drivers/hwtracing/intel_th/pci.c  | 5 +++++
 drivers/hwtracing/stm/heartbeat.c | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
Signature · 1 line
2.29.2
author maintainer
#1 lore raw

PATCH 1/2 stm class: Fix module init return on allocation failure

From: Wang Hui <[email protected]>

In stm_heartbeat_init(): return value gets reset after the first iteration by stm_source_register_device(), so allocation failures after that will, after a clean up, return success. Fix that.

Fixes 119291853038 ("stm class: Add heartbeat stm source device")
---
 drivers/hwtracing/stm/heartbeat.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/hwtracing/stm/heartbeat.c +4 -2
index 3e7df1c0477f..81d7b21d31ec 100644
@@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data)
 
 static int stm_heartbeat_init(void)
 {
-	int i, ret = -ENOMEM;
+	int i, ret;
 
 	if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX)
 		return -EINVAL;
@@ -72,8 +72,10 @@ static int stm_heartbeat_init(void)
 	for (i = 0; i < nr_devs; i++) {
 		stm_heartbeat[i].data.name =
 			kasprintf(GFP_KERNEL, "heartbeat.%d", i);
-		if (!stm_heartbeat[i].data.name)
+		if (!stm_heartbeat[i].data.name) {
+			ret = -ENOMEM;
 			goto fail_unregister;
+		}
 
 		stm_heartbeat[i].data.nr_chans	= 1;
 		stm_heartbeat[i].data.link	= stm_heartbeat_link;
Signature · 1 line
2.29.2
author maintainer
#2 lore raw

PATCH 2/2 intel_th: pci: Add Alder Lake-P support

In reply to Alexander Shishkin

This adds support for the Trace Hub in Alder Lake-P.

---
 drivers/hwtracing/intel_th/pci.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/hwtracing/intel_th/pci.c +5 -0
index 52acd77438ed..251e75c9ba9d 100644
@@ -268,6 +268,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
 		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7aa6),
 		.driver_data = (kernel_ulong_t)&intel_th_2x,
 	},
+	{
+		/* Alder Lake-P */
+		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x51a6),
+		.driver_data = (kernel_ulong_t)&intel_th_2x,
+	},
 	{
 		/* Alder Lake CPU */
 		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x466f),
Signature · 1 line
2.29.2
#3 lore raw
In reply to Alexander Shishkin
Quoted 8 lines · Alexander Shishkin

Hi Greg,

Here are updates that I have for v5.11. These are: one minor bugfix and a new PCI ID.

Alexander Shishkin (1):
intel_th: pci: Add Alder Lake-P support

Quoted 6 lines

Wang Hui (1):
stm class: Fix module init return on allocation failure

 drivers/hwtracing/intel_th/pci.c  | 5 +++++
 drivers/hwtracing/stm/heartbeat.c | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

Now applied, thanks.

greg k-h