x86/amd_nb: add AMD family 19h model 50h PCI ids
PATCH 1/1 x86/amd_nb: add AMD family 19h model 50h PCI ids
This is required to support Zen3 APUs in k10temp.
--- arch/x86/kernel/amd_nb.c | 3 +++ include/linux/pci_ids.h | 1 + 2 files changed, 4 insertions(+)
arch/x86/kernel/amd_nb.c +3 -0
@@ -25,6 +25,7 @@#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_DF_F4 0x1654 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e/* Protect the PCI config register pairs used for SMN and DF indirect access. */ static DEFINE_MUTEX (smn_mutex);
@@ -57,6 +58,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} };
@@ -72,6 +74,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_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_CNB17H_F4) }, {} };
include/linux/pci_ids.h +1 -0
@@ -555,6 +555,7 @@#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d#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.30.2
According to the specification, these IDs look correct to me. I also found them on two real machines.
Thanks,
-Wei
Quoted 49 lines · David Bartley
This is required to support Zen3 APUs in k10temp.
Signed-off-by David Bartley <[email protected]>--- arch/x86/kernel/amd_nb.c | 3 +++ include/linux/pci_ids.h | 1 + 2 files changed, 4 insertions(+)arch/x86/kernel/amd_nb.c +3
-0@@ -25,6 +25,7 @@#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_DF_F4 0x1654 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e/* Protect the PCI config register pairs used for SMN and DF indirect access. */ static DEFINE_MUTEX (smn_mutex);@@ -57,6 +58,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} };@@ -72,6 +74,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_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_CNB17H_F4) }, {} };include/linux/pci_ids.h +1
-0@@ -555,6 +555,7 @@#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703#define PCI_DEVICE_ID_AMD_LANCE 0x2000#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
Borislav Petkov
maintainerQuoted 2 lines · Wei Huang
According to the specification, these IDs look correct to me. I also found them on two real machines.
Wei, I'm assuming that's an ACK?
Quoted 4 lines · David Bartley
Quoted 3 lines
This is required to support Zen3 APUs in k10temp.
Signed-off-by David Bartley <[email protected]>
Btw, David, for the future, pls run your patches through
./scripts/get_maintainer.pl
so that you get a list of people and mailing lists to CC - otherwise it likely will get missed.
This one I managed to fish out from the lkml firehose, by chance. :-)
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 5 lines · Borislav Petkov
Quoted 2 lines · Wei Huang
According to the specification, these IDs look correct to me. I also found them on two real machines.
Wei, I'm assuming that's an ACK?
Yes, it is an ACK. They match with the values specified in PPR.
Quoted 17 lines
Quoted 5 lines · David Bartley
Quoted 3 lines
This is required to support Zen3 APUs in k10temp.
Signed-off-by David Bartley <[email protected]>Btw, David, for the future, pls run your patches through
./scripts/get_maintainer.plso that you get a list of people and mailing lists to CC - otherwise it likely will get missed.
This one I managed to fish out from the lkml firehose, by chance. :-)
Thx.
Borislav Petkov
maintainerQuoted 41 lines · David Bartley
This is required to support Zen3 APUs in k10temp.
Signed-off-by David Bartley <[email protected]>--- arch/x86/kernel/amd_nb.c | 3 +++ include/linux/pci_ids.h | 1 + 2 files changed, 4 insertions(+)arch/x86/kernel/amd_nb.c +3
-0@@ -25,6 +25,7 @@#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_DF_F4 0x1654 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e/* Protect the PCI config register pairs used for SMN and DF indirect access. */ static DEFINE_MUTEX (smn_mutex);@@ -57,6 +58,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} };@@ -72,6 +74,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_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_CNB17H_F4) }, {} };include/linux/pci_ids.h +0
-0
include/linux/pci_ids.h line 558
Quoted 4 lines
include/linux/pci_ids.h +1
-0@@ -555,6 +555,7 @@#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
I don't see this define used anywhere else besides amd_nb.c. If there's no use for it outside of that file, I'm moving it there...?
Or does it need to get added to that k10temp_id_table in k10temp.c too?
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 50 lines · Borislav Petkov
Quoted 41 lines · David Bartley
This is required to support Zen3 APUs in k10temp.
Signed-off-by David Bartley <[email protected]>--- arch/x86/kernel/amd_nb.c | 3 +++ include/linux/pci_ids.h | 1 + 2 files changed, 4 insertions(+)arch/x86/kernel/amd_nb.c +3
-0@@ -25,6 +25,7 @@#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_DF_F4 0x1654 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e/* Protect the PCI config register pairs used for SMN and DF indirect access. */ static DEFINE_MUTEX (smn_mutex);@@ -57,6 +58,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} };@@ -72,6 +74,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_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_CNB17H_F4) }, {} };include/linux/pci_ids.h +0
-0include/linux/pci_ids.h line 558
Quoted 4 lines
include/linux/pci_ids.h +1
-0@@ -555,6 +555,7 @@#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166dI don't see this define used anywhere else besides
amd_nb.c. If there's no use for it outside of that file, I'm moving it there...?
Quoted 1 line
Or does it need to get added to that
k10temp_id_tableink10temp.ctoo?
[+Guenter]
I think it needs to be added to k10temp.c as well. In the meanwhile, k10temp_probe() shall be extended with support for family 19h, model 0x5x.
Quoted 1 line
Quoted 51 lines · Wei Huang
Quoted 48 lines · Borislav Petkov
Quoted 39 lines · David Bartley
This is required to support Zen3 APUs in k10temp.
Signed-off-by David Bartley <[email protected]>---
arch/x86/kernel/amd_nb.c| 3 +++
include/linux/pci_ids.h | 1 +2 files changed, 4 insertions(+)arch/x86/kernel/amd_nb.c +3
-0@@ -25,6 +25,7 @@ #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_DF_F4 0x1654 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e /* Protect the PCI config register pairs used for SMN and DF indirect access. */ static DEFINE_MUTEX(smn_mutex);@@ -57,6 +58,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} };@@ -72,6 +74,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_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_CNB17H_F4) }, {} };include/linux/pci_ids.h +0
-0include/linux/pci_ids.h line 558
Quoted 4 lines
include/linux/pci_ids.h +1
-0@@ -555,6 +555,7 @@ #define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443 #define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166dI don't see this define used anywhere else besides
amd_nb.c. If there's no use for it outside of that file, I'm moving it there...?
Quoted 6 lines
Quoted 1 line
Or does it need to get added to that
k10temp_id_tableink10temp.ctoo?[+Guenter]
I think it needs to be added to
k10temp.cas well. In the meanwhile,k10temp_probe()shall be extended with support for family 19h, model 0x5x.
Yes, it does [1]. Fine with me though to define it locally there. I personally find that easier since it would avoid the recurring "I don't see this define used anywhere else besides xxx". Someone else can clean that up later if so desired.
Thanks,
Guenter
---
[1] https://patchwork.kernel.org/project/linux-hwmon/patch/[email protected]/
Borislav Petkov
maintainerQuoted 4 lines · Guenter Roeck
Yes, it does [1]. Fine with me though to define it locally there. I personally find that easier since it would avoid the recurring "I don't see this define used anywhere else besides xxx". Someone else can clean that up later if so desired.
Or someone can ask first or maybe even get CCed on both patches so that someone can see the full picture. :-)
Anyway, I'll commit it as-is.
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette[tip: x86/cpu] x86/amd_nb: Add AMD family 19h model 50h PCI ids
In reply to David BartleyThe following commit has been merged into the x86/cpu branch of tip:
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: 2ade8fc65076095460e3ea1ca65a8f619d7d9a3a Gitweb: https://git.kernel.org/tip/2ade8fc65076095460e3ea1ca65a8f619d7d9a3a Author: David Bartley <[email protected]> AuthorDate: Thu, 20 May 2021 10:41:30 -07:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Fri, 21 May 2021 12:01:38 +02:00
x86/amd_nb: Add AMD family 19h model 50h PCI ids
This is required to support Zen3 APUs in k10temp.
--- arch/x86/kernel/amd_nb.c | 3 +++ include/linux/pci_ids.h | 1 + 2 files changed, 4 insertions(+)
arch/x86/kernel/amd_nb.c +3 -0
@@ -25,6 +25,7 @@#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_DF_F4 0x1654 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e/* Protect the PCI config register pairs used for SMN and DF indirect access. */ static DEFINE_MUTEX (smn_mutex);
@@ -57,6 +58,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, {} };
@@ -72,6 +74,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M60H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M70H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_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_CNB17H_F4) }, {} };
include/linux/pci_ids.h +1 -0
@@ -555,6 +555,7 @@#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653 +#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703#define PCI_DEVICE_ID_AMD_LANCE 0x2000#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001