Skip to contentSkip to conversation

intel_th: Updates for v6.20

PATCH New Alexander Shishkin 1 participant 3 messages Jan 16

Subsystems (2)
lore
Share & tools
lore

Alexander Shishkin

author maintainer
#0 lore raw

cover intel_th: Updates for v6.20

Hi Greg,

Here are the updates for intel_th for v6.20. These are: a rework of the humongous PCI ID table using PCI_DEVICE_DATA() and 2 new PCI IDs on top of that. Please consider applying.

Pawel Chmielewski (2):
intel_th: pci: Use PCI_DEVICE_DATA() for device entries
intel_th: pci: Add Nova Lake support

 drivers/hwtracing/intel_th/pci.c     | 269 +++++----------------------
 drivers/hwtracing/intel_th/pci_ids.h |  60 ++++++
 2 files changed, 110 insertions(+), 219 deletions(-)
 create mode 100644 drivers/hwtracing/intel_th/pci_ids.h
Signature · 1 line
2.50.1
author maintainer
#1 lore raw

PATCH 1/2 intel_th: pci: Use PCI_DEVICE_DATA() for device entries

From: Pawel Chmielewski <[email protected]>

Switch PCI_DEVICE() macro to PCI_DEVICE_DATA() to reduce the number of lines. Add a new header file for the defined names of the devices. Sort the entries in ascending order.

---
 drivers/hwtracing/intel_th/pci.c     | 265 +++++----------------------
 drivers/hwtracing/intel_th/pci_ids.h |  56 ++++++
 2 files changed, 102 insertions(+), 219 deletions(-)
 create mode 100644 drivers/hwtracing/intel_th/pci_ids.h
drivers/hwtracing/intel_th/pci.c +46 -219
index e3def163d5cf..de069c7aea7c 100644
@@ -14,6 +14,7 @@
 #include <linux/pci.h>
 
 #include "intel_th.h"
+#include "pci_ids.h"
 
 #define DRIVER_NAME "intel_th_pci"
 
@@ -141,225 +142,51 @@ static const struct intel_th_drvdata intel_th_2x = {
 };
 
 static const struct pci_device_id intel_th_pci_id_table[] = {
-	{
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9d26),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa126),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		/* Apollo Lake */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a8e),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		/* Broxton */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0a80),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		/* Broxton B-step */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1a8e),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		/* Kaby Lake PCH-H */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa2a6),
-		.driver_data = (kernel_ulong_t)&intel_th_1x_multi_is_broken,
-	},
-	{
-		/* Denverton */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x19e1),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		/* Lewisburg PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa1a6),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		/* Lewisburg PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa226),
-		.driver_data = (kernel_ulong_t)0,
-	},
-	{
-		/* Gemini Lake */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x318e),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Cannon Lake H */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa326),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Cannon Lake LP */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9da6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Cedar Fork PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x18e1),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Ice Lake PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x34a6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Comet Lake */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x02a6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Comet Lake PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x06a6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Comet Lake PCH-V */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa3a6),
-		.driver_data = (kernel_ulong_t)&intel_th_1x_multi_is_broken,
-	},
-	{
-		/* Ice Lake NNPI */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x45c5),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Ice Lake CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8a29),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Tiger Lake CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9a33),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Tiger Lake PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa0a6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Tiger Lake PCH-H */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x43a6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Jasper Lake PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Jasper Lake CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4e29),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Elkhart Lake CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4529),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Elkhart Lake */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Emmitsburg PCH */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Alder Lake */
-		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-M */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x54a6),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Meteor Lake-P */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7e24),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Meteor Lake-S */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7f26),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Meteor Lake-S CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xae24),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Raptor Lake-S */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7a26),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Raptor Lake-S CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa76f),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Granite Rapids */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0963),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Granite Rapids SOC */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x3256),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Sapphire Rapids SOC */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x3456),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Lunar Lake */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa824),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Arrow Lake */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x7724),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Panther Lake-H */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe324),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Panther Lake-P/U */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe424),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Alder Lake CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x466f),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{
-		/* Rocket Lake CPU */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c19),
-		.driver_data = (kernel_ulong_t)&intel_th_2x,
-	},
-	{ 0 },
+	{ PCI_DEVICE_DATA(INTEL, NPK_CML,	&intel_th_2x) },   /* Comet Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_CML_PCH,	&intel_th_2x) },   /* Comet Lake PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_GNR,	&intel_th_2x) },   /* Granite Rapids */
+	{ PCI_DEVICE_DATA(INTEL, NPK_BXT,	NULL) },	   /* Broxton */
+	{ PCI_DEVICE_DATA(INTEL, NPK_CDF,	&intel_th_2x) },   /* Cedar Fork PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_DNV,	NULL) },	   /* Denverton */
+	{ PCI_DEVICE_DATA(INTEL, NPK_BXT_B,	NULL) },	   /* Broxton B-step */
+	{ PCI_DEVICE_DATA(INTEL, NPK_EBG,	&intel_th_2x) },   /* Emmitsburg PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_GLK,	&intel_th_2x) },   /* Gemini Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_GNR_SOC,	&intel_th_2x) },   /* Granite Rapids SOC */
+	{ PCI_DEVICE_DATA(INTEL, NPK_SPR,	&intel_th_2x) },   /* Sapphire Rapids SOC */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ICL_PCH,	&intel_th_2x) },   /* Ice Lake PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_TGL_PCH_H,	&intel_th_2x) },   /* Tiger Lake PCH-H */
+	{ PCI_DEVICE_DATA(INTEL, NPK_EHL_CPU,	&intel_th_2x) },   /* Elkhart Lake CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ICL_NNPI,	&intel_th_2x) },   /* Ice Lake NNPI */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ADL_CPU,	&intel_th_2x) },   /* Alder Lake CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_EHL,	&intel_th_2x) },   /* Elkhart Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_RKL,	&intel_th_2x) },   /* Rocket Lake CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_JSL_PCH,	&intel_th_2x) },   /* Jasper Lake PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_JSL_CPU,	&intel_th_2x) },   /* Jasper Lake CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ADL_P,	&intel_th_2x) },   /* Alder Lake-P */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ADL_M,	&intel_th_2x) },   /* Alder Lake-M */
+	{ PCI_DEVICE_DATA(INTEL, NPK_APL,	NULL) },	   /* Apollo Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ARL,	&intel_th_2x) },   /* Arrow Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_RPL_S,	&intel_th_2x) },   /* Raptor Lake-S */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ADL,	&intel_th_2x) },   /* Alder Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_MTL_P,	&intel_th_2x) },   /* Meteor Lake-P */
+	{ PCI_DEVICE_DATA(INTEL, NPK_MTL_S,	&intel_th_2x) },   /* Meteor Lake-S */
+	{ PCI_DEVICE_DATA(INTEL, NPK_ICL_CPU,	&intel_th_2x) },   /* Ice Lake CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_TGL_CPU,	&intel_th_2x) },   /* Tiger Lake CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_0,		NULL) },
+	{ PCI_DEVICE_DATA(INTEL, NPK_CNL_LP,	&intel_th_2x) },   /* Cannon Lake LP */
+	{ PCI_DEVICE_DATA(INTEL, NPK_TGL_PCH,	&intel_th_2x) },   /* Tiger Lake PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_1,		NULL) },
+	{ PCI_DEVICE_DATA(INTEL, NPK_LBG_PCH,	NULL) },	   /* Lewisburg PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_LBG_PCH_2,	NULL) },	   /* Lewisburg PCH */
+	{ PCI_DEVICE_DATA(INTEL, NPK_KBL_PCH,	&intel_th_1x_multi_is_broken) },   /* Kaby Lake PCH-H */
+	{ PCI_DEVICE_DATA(INTEL, NPK_CNL_H,	&intel_th_2x) },   /* Cannon Lake H */
+	{ PCI_DEVICE_DATA(INTEL, NPK_CML_PCH_V,	&intel_th_1x_multi_is_broken) },   /* Comet Lake PCH-V */
+	{ PCI_DEVICE_DATA(INTEL, NPK_RPL_S_CPU,	&intel_th_2x) },   /* Raptor Lake-S CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_LNL,	&intel_th_2x) },   /* Lunar Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_MTL_S_CPU,	&intel_th_2x) },   /* Meteor Lake-S CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_PTL_H,	&intel_th_2x) },   /* Panther Lake-H */
+	{ PCI_DEVICE_DATA(INTEL, NPK_PTL_PU,	&intel_th_2x) },   /* Panther Lake-P/U */
+	{ }
 };
 
 MODULE_DEVICE_TABLE(pci, intel_th_pci_id_table);
drivers/hwtracing/intel_th/pci_ids.h new file +56 -0

56 lines not on this page · raw message

Signature · 1 line
2.50.1
author maintainer
#2 lore raw

PATCH 2/2 intel_th: pci: Add Nova Lake support

In reply to Alexander Shishkin

From: Pawel Chmielewski <[email protected]>

Add support for the Trace Hub in Nova Lake-P/H/S and PCH.

---
 drivers/hwtracing/intel_th/pci.c     | 4 ++++
 drivers/hwtracing/intel_th/pci_ids.h | 4 ++++
 2 files changed, 8 insertions(+)
drivers/hwtracing/intel_th/pci.c +4 -0
index de069c7aea7c..6cd5ac3c6430 100644
@@ -165,6 +165,7 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
 	{ PCI_DEVICE_DATA(INTEL, NPK_ADL_P,	&intel_th_2x) },   /* Alder Lake-P */
 	{ PCI_DEVICE_DATA(INTEL, NPK_ADL_M,	&intel_th_2x) },   /* Alder Lake-M */
 	{ PCI_DEVICE_DATA(INTEL, NPK_APL,	NULL) },	   /* Apollo Lake */
+	{ PCI_DEVICE_DATA(INTEL, NPK_NVL_PCH,	&intel_th_2x) },   /* Nova Lake-PCH */
 	{ PCI_DEVICE_DATA(INTEL, NPK_ARL,	&intel_th_2x) },   /* Arrow Lake */
 	{ PCI_DEVICE_DATA(INTEL, NPK_RPL_S,	&intel_th_2x) },   /* Raptor Lake-S */
 	{ PCI_DEVICE_DATA(INTEL, NPK_ADL,	&intel_th_2x) },   /* Alder Lake */
@@ -184,6 +185,9 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
 	{ PCI_DEVICE_DATA(INTEL, NPK_RPL_S_CPU,	&intel_th_2x) },   /* Raptor Lake-S CPU */
 	{ PCI_DEVICE_DATA(INTEL, NPK_LNL,	&intel_th_2x) },   /* Lunar Lake */
 	{ PCI_DEVICE_DATA(INTEL, NPK_MTL_S_CPU,	&intel_th_2x) },   /* Meteor Lake-S CPU */
+	{ PCI_DEVICE_DATA(INTEL, NPK_NVL_P,	&intel_th_2x) },   /* Nova Lake-P */
+	{ PCI_DEVICE_DATA(INTEL, NPK_NVL_H,	&intel_th_2x) },   /* Nova Lake-H */
+	{ PCI_DEVICE_DATA(INTEL, NPK_NVL_S,	&intel_th_2x) },   /* Nova Lake-S */
 	{ PCI_DEVICE_DATA(INTEL, NPK_PTL_H,	&intel_th_2x) },   /* Panther Lake-H */
 	{ PCI_DEVICE_DATA(INTEL, NPK_PTL_PU,	&intel_th_2x) },   /* Panther Lake-P/U */
 	{ }
drivers/hwtracing/intel_th/pci_ids.h +4 -0
index 7dad5d7621f5..4a0c53beac22 100644
@@ -31,6 +31,7 @@
 #define PCI_DEVICE_ID_INTEL_NPK_ADL_P	0x51a6
 #define PCI_DEVICE_ID_INTEL_NPK_ADL_M	0x54a6
 #define PCI_DEVICE_ID_INTEL_NPK_APL	0x5a8e
+#define PCI_DEVICE_ID_INTEL_NPK_NVL_PCH	0x6e26
 #define PCI_DEVICE_ID_INTEL_NPK_ARL	0x7724
 #define PCI_DEVICE_ID_INTEL_NPK_RPL_S	0x7a26
 #define PCI_DEVICE_ID_INTEL_NPK_ADL	0x7aa6
@@ -50,6 +51,9 @@
 #define PCI_DEVICE_ID_INTEL_NPK_RPL_S_CPU	0xa76f
 #define PCI_DEVICE_ID_INTEL_NPK_LNL	0xa824
 #define PCI_DEVICE_ID_INTEL_NPK_MTL_S_CPU	0xae24
+#define PCI_DEVICE_ID_INTEL_NPK_NVL_P	0xd224
+#define PCI_DEVICE_ID_INTEL_NPK_NVL_H	0xd324
+#define PCI_DEVICE_ID_INTEL_NPK_NVL_S	0xd424
 #define PCI_DEVICE_ID_INTEL_NPK_PTL_H	0xe324
 #define PCI_DEVICE_ID_INTEL_NPK_PTL_PU	0xe424
 
Signature · 1 line
2.50.1