Skip to contentSkip to conversation

x86/amd_nb: Add AMD Family 19h A0-AF IDs

PATCH Superseded Mario Limonciello 3 participants 7 messages Jun 1, 2022 – Jun 7, 2022

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 x86/amd_nb: Add AMD Family 19h A0-AF IDs

commit 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs") had claimed to add the IDs for models A0h-AFh, but it appears to only have added the models 10h-1Fh.

Add the actual IDs for A0-AF which are needed for SMN communication to work properly in amd_nb.

Fixes 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs")
---
 arch/x86/kernel/amd_nb.c | 5 +++++
 include/linux/pci_ids.h  | 1 +
 2 files changed, 6 insertions(+)
arch/x86/kernel/amd_nb.c +5 -0
index 190e0f763375..cc8c7cfa9068 100644
@@ -25,11 +25,13 @@
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
 #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
+#define PCI_DEVICE_ID_AMD_19H_MA0H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_DF_F4	0x1654
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 0x14b1
 #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4 0x1728
 
 /* Protect the PCI config register pairs used for SMN. */
 static DEFINE_MUTEX(smn_mutex);
@@ -43,6 +45,7 @@ static const struct pci_device_id amd_root_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_ROOT) },
 	{}
 };
 
@@ -67,6 +70,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3) },
 	{}
 };
 
@@ -85,6 +89,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
 	{}
 };
include/linux/pci_ids.h +1 -0
index 0178823ce8c2..05b4c67a8a2a 100644
@@ -560,6 +560,7 @@
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 0x1727
 #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 hwmon: (k10temp): Load the driver on models A0h-AFh

commit 8bb050cd5cf4 ("hwmon: (k10temp) Support up to 12 CCDs on AMD Family of processors") added the CCD offsets for models A0h-AFh but didn't add the PCI device ID for the device.

Add the missing ID so the driver works on these models.

Fixes 8bb050cd5cf4 ("hwmon: (k10temp) Support up to 12 CCDs on AMD Family of processors")
---
 drivers/hwmon/k10temp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/k10temp.c +1 -0
index 4e239bd75b1d..80a489f89aa2 100644
@@ -493,6 +493,7 @@ static const struct pci_device_id k10temp_id_table[] = {
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3) },
 	{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
 	{}
 };
Signature · 1 line
2.34.1
maintainer Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] hwmon: (k10temp): Load the driver on models A0h-AFh

Quoted 8 lines · Mario Limonciello

commit 8bb050cd5cf4 ("hwmon: (k10temp) Support up to 12 CCDs on AMD Family of processors") added the CCD offsets for models A0h-AFh but didn't add the PCI device ID for the device.

Add the missing ID so the driver works on these models.

Fixes 8bb050cd5cf4 ("hwmon: (k10temp) Support up to 12 CCDs on AMD Family of processors")

I can not apply this patch without the context patch (which I wasn't copied on), so I assume the idea is to push this through the x86 tree. This is ok with me.

Quoted 16 lines
---
  drivers/hwmon/k10temp.c | 1 +
  1 file changed, 1 insertion(+)
drivers/hwmon/k10temp.c +1 -0
index 4e239bd75b1d..80a489f89aa2 100644
@@ -493,6 +493,7 @@ static const struct pci_device_id k10temp_id_table[] = {
  	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
  	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
  	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3) },
  	{ PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
  	{}
  };
#3 lore raw
In reply to Mario Limonciello
Quoted 61 lines · Mario Limonciello

commit 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs") had claimed to add the IDs for models A0h-AFh, but it appears to only have added the models 10h-1Fh.

Add the actual IDs for A0-AF which are needed for SMN communication to work properly in amd_nb.

Fixes 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs")
---
 arch/x86/kernel/amd_nb.c | 5 +++++
 include/linux/pci_ids.h  | 1 +
 2 files changed, 6 insertions(+)
arch/x86/kernel/amd_nb.c +5 -0
index 190e0f763375..cc8c7cfa9068 100644
@@ -25,11 +25,13 @@
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
 #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
+#define PCI_DEVICE_ID_AMD_19H_MA0H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_DF_F4	0x1654
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 0x14b1
 #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4 0x1728
 
 /* Protect the PCI config register pairs used for SMN. */
 static DEFINE_MUTEX(smn_mutex);
@@ -43,6 +45,7 @@ static const struct pci_device_id amd_root_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_ROOT) },
 	{}
 };
 
@@ -67,6 +70,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3) },
 	{}
 };
 
@@ -85,6 +89,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
 	{}
 };
include/linux/pci_ids.h +0 -0
index 0178823ce8c2..05b4c67a8a2a 100644

include/linux/pci_ids.h line 563

Quoted 4 lines
include/linux/pci_ids.h +1 -0
@@ -560,6 +560,7 @@
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 0x1727

This file is nominally sorted by numeric device ID inside the vendor section, but that has really deteriorated over time.

I can't quite figure out the rationale for deciding whether to put things in amd_nb.c vs pci_ids.h. The IDs in amd_nb.c look basically the same as this one.

Normally we put things in pci_ids.h if they are used more than one place. PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 looks like it's only used in one place.

Quoted 6 lines
include/linux/pci_ids.h +0 -0
 #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
Signature · 1 line
2.34.1
#4 lore raw
Quoted 61 lines · Bjorn Helgaas
Quoted 60 lines · Mario Limonciello

commit 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs") had claimed to add the IDs for models A0h-AFh, but it appears to only have added the models 10h-1Fh.

Add the actual IDs for A0-AF which are needed for SMN communication to work properly in amd_nb.

Fixes 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs")
---
  arch/x86/kernel/amd_nb.c | 5 +++++
  include/linux/pci_ids.h  | 1 +
  2 files changed, 6 insertions(+)
arch/x86/kernel/amd_nb.c +5 -0
index 190e0f763375..cc8c7cfa9068 100644
@@ -25,11 +25,13 @@
  #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
  #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
  #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
+#define PCI_DEVICE_ID_AMD_19H_MA0H_ROOT	0x14b5
  #define PCI_DEVICE_ID_AMD_19H_DF_F4	0x1654
  #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 0x14b1
  #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
  #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
  #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4 0x1728
 
  /* Protect the PCI config register pairs used for SMN. */
  static DEFINE_MUTEX(smn_mutex);
@@ -43,6 +45,7 @@ static const struct pci_device_id amd_root_ids[] = {
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_ROOT) },
  	{}
  };
 
@@ -67,6 +70,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3) },
  	{}
  };
 
@@ -85,6 +89,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F4) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
  	{}
  };
include/linux/pci_ids.h +0 -0
index 0178823ce8c2..05b4c67a8a2a 100644
Quoted 8 lines

include/linux/pci_ids.h line 563

Quoted 5 lines
include/linux/pci_ids.h +1 -0
@@ -560,6 +560,7 @@
  #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
  #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
  #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 0x1727

This file is nominally sorted by numeric device ID inside the vendor section, but that has really deteriorated over time.

It seemed like it was more oriented to be sorted by the macro definition than the ID.

Quoted 8 lines

I can't quite figure out the rationale for deciding whether to put things in amd_nb.c vs pci_ids.h. The IDs in amd_nb.c look basically the same as this one.

Normally we put things in pci_ids.h if they are used more than one place. PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 looks like it's only used in one place.

I suppose you weren't on CC for patch 2/2 in this series (thanks scripts/get_maintainer.pl), so it's not obvious to you that this ID is used in a second place in patch 2. I didn't want to ping pong in/out from amd_nb.c in the series.

Here is a lore link to it:
https://lore.kernel.org/linux-kernel/[email protected]/

Quoted 7 lines
Quoted 7 lines
include/linux/pci_ids.h +0 -0
  #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
  #define PCI_DEVICE_ID_AMD_LANCE		0x2000
  #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
Signature · 1 line
2.34.1
Acked-by
#5 lore raw
Quoted 11 lines · Mario Limonciello
Quoted 10 lines · Bjorn Helgaas
Quoted 9 lines · Mario Limonciello

commit 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs") had claimed to add the IDs for models A0h-AFh, but it appears to only have added the models 10h-1Fh.

Add the actual IDs for A0-AF which are needed for SMN communication to work properly in amd_nb.

Fixes 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs")
Quoted 57 lines
Quoted 48 lines
Quoted 48 lines
---
  arch/x86/kernel/amd_nb.c | 5 +++++
  include/linux/pci_ids.h  | 1 +
  2 files changed, 6 insertions(+)
arch/x86/kernel/amd_nb.c +5 -0
index 190e0f763375..cc8c7cfa9068 100644
@@ -25,11 +25,13 @@
  #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
  #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
  #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
+#define PCI_DEVICE_ID_AMD_19H_MA0H_ROOT	0x14b5
  #define PCI_DEVICE_ID_AMD_19H_DF_F4	0x1654
  #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 0x14b1
  #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
  #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
  #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4 0x1728
  /* Protect the PCI config register pairs used for SMN. */
  static DEFINE_MUTEX(smn_mutex);
@@ -43,6 +45,7 @@ static const struct pci_device_id amd_root_ids[] = {
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_ROOT) },
  	{}
  };
@@ -67,6 +70,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3) },
  	{}
  };
@@ -85,6 +89,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F4) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4) },
  	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
  	{}
  };
include/linux/pci_ids.h +0 -0
index 0178823ce8c2..05b4c67a8a2a 100644
Quoted 8 lines

include/linux/pci_ids.h line 563

Quoted 5 lines
include/linux/pci_ids.h +1 -0
@@ -560,6 +560,7 @@
  #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
  #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
  #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 0x1727

This file is nominally sorted by numeric device ID inside the vendor section, but that has really deteriorated over time.

Quoted 2 lines

It seemed like it was more oriented to be sorted by the macro definition than the ID.

Yeah, it's kind of a mess. Not really clear which way.

Quoted 24 lines
Quoted 7 lines

I can't quite figure out the rationale for deciding whether to put things in amd_nb.c vs pci_ids.h. The IDs in amd_nb.c look basically the same as this one.

Normally we put things in pci_ids.h if they are used more than one place. PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 looks like it's only used in one place.

I suppose you weren't on CC for patch 2/2 in this series (thanks scripts/get_maintainer.pl), so it's not obvious to you that this ID is used in a second place in patch 2. I didn't want to ping pong in/out from amd_nb.c in the series.

Here is a lore link to it:
https://lore.kernel.org/linux-kernel/[email protected]/

Quoted 7 lines
Quoted 7 lines
include/linux/pci_ids.h +0 -0
  #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
  #define PCI_DEVICE_ID_AMD_LANCE		0x2000
  #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
Signature · 1 line
2.34.1
maintainer
#6 lore raw
In reply to Mario Limonciello
Quoted 4 lines · Mario Limonciello

commit 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs") had claimed to add the IDs for models A0h-AFh, but it appears to only have added the models 10h-1Fh.

Quoted 8 lines

Add the actual IDs for A0-AF which are needed for SMN communication to work properly in amd_nb.

Fixes 4fb0abfee424 ("x86/amd_nb: Add AMD Family 19h Models (10h-1Fh) and (A0h-AFh) PCI IDs")
---
 arch/x86/kernel/amd_nb.c | 5 +++++

I'll need an Ack from a x86 maintainer to apply this series, or it needs to be applied through x86. I sent an Ack for patch 2/2, so the latter would be fine with me.

Thanks,
Guenter

Quoted 57 lines
 include/linux/pci_ids.h  | 1 +
 2 files changed, 6 insertions(+)
arch/x86/kernel/amd_nb.c +5 -0
index 190e0f763375..cc8c7cfa9068 100644
@@ -25,11 +25,13 @@
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
 #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F4 0x144c
 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F4 0x1444
+#define PCI_DEVICE_ID_AMD_19H_MA0H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_DF_F4	0x1654
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F4 0x14b1
 #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT	0x14b5
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F4 0x167d
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4 0x1728
 
 /* Protect the PCI config register pairs used for SMN. */
 static DEFINE_MUTEX(smn_mutex);
@@ -43,6 +45,7 @@ static const struct pci_device_id amd_root_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_ROOT) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_ROOT) },
 	{}
 };
 
@@ -67,6 +70,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3) },
 	{}
 };
 
@@ -85,6 +89,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M10H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_MA0H_DF_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
 	{}
 };
include/linux/pci_ids.h +1 -0
index 0178823ce8c2..05b4c67a8a2a 100644
@@ -560,6 +560,7 @@
 #define PCI_DEVICE_ID_AMD_19H_M10H_DF_F3 0x14b0
 #define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c
 #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
+#define PCI_DEVICE_ID_AMD_19H_MA0H_DF_F3 0x1727
 #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001