stm class/intel_th: Fixes for v5.11
Alexander Shishkin
maintainercover 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
Alexander Shishkin
maintainerPATCH 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.
--- drivers/hwtracing/stm/heartbeat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/hwtracing/stm/heartbeat.c +4 -2
@@ -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
Alexander Shishkin
maintainerPATCH 2/2 intel_th: pci: Add Alder Lake-P support
In reply to Alexander ShishkinThis 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
@@ -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
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 failuredrivers/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