EDAC, amd64: Add Family 17h Model 10h support.
Subsystems (3)
PATCH v3 1/1 EDAC, amd64: Add Family 17h Model 10h support.
Add new device IDs for family 17h models 10h-2fh.
This is required by amd64_edac_mod in order to properly detect PCI device functions 0 and 6.
--- drivers/edac/amd64_edac.c | 14 ++++++++++++++ drivers/edac/amd64_edac.h | 3 +++ 2 files changed, 17 insertions(+)
drivers/edac/amd64_edac.c +14 -0
@@ -2200,6 +2200,15 @@ static struct amd64_family_type family_types[] = { .dbam_to_cs = f17_base_addr_to_cs_size, } }, + [F17_M10H_CPUS ] = { + .ctl_name ="F17h_M10h" , + .f0_id =PCI_DEVICE_ID_AMD_17H_M10H_DF_F0 , + .f6_id =PCI_DEVICE_ID_AMD_17H_M10H_DF_F6 , + .ops = { + .early_channel_count = f17_early_channel_count, + .dbam_to_cs = f17_base_addr_to_cs_size, + } + }, };/*
@@ -3188,6 +3197,11 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)break ;case 0x17 : +if (pvt->model >=0x10 && pvt->model <=0x2f ) { + fam_type = &family_types[F17_M10H_CPUS ]; + pvt->ops = &family_types[F17_M10H_CPUS ].ops; +break ; + } fam_type = &family_types[F17_CPUS ]; pvt->ops = &family_types[F17_CPUS ].ops;break ;
drivers/edac/amd64_edac.h +3 -0
@@ -115,6 +115,8 @@#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F2 0x1582#define PCI_DEVICE_ID_AMD_17H_DF_F0 0x1460#define PCI_DEVICE_ID_AMD_17H_DF_F6 0x1466 +#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F0 0x15e8 +#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F6 0x15ee/* * Function 1 - Address Map
@@ -281,6 +283,7 @@ enum amd_families {F16_CPUS ,F16_M30H_CPUS ,F17_CPUS , +F17_M10H_CPUS , NUM_FAMILIES, };
Quoted 46 lines · Yazen
Quoted 10 lines
-----Original Message-----
From: Michael Jin <[email protected]>
Sent: Wednesday, August 15, 2018 6:41 AM
To: Borislav Petkov <[email protected]>; Ghannam, Yazen <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]; [email protected]; Michael Jin <[email protected]>; [email protected]
Subject: [PATCH V2] EDAC, amd64: Add Family 17h Model 10h support.Quoted 2 lines
Add support for ECC error decoding on family 17h models 10h-2fh.
Can you please make this more specific? Something like "Add PCI device IDs for Fam17h Models 10h-2Fh so that
amd64_edac_modwill load".Quoted 3 lines
This won't apply to all stable branches. EDAC support for Fam17h was added in v4.10.
I'm not sure if the stable tag needs to be modified, or if the stable queues automatically drop patches that don't apply.
Quoted 11 lines
Signed-off-by Michael Jin <[email protected]>--- drivers/edac/amd64_edac.c | 15 +++++++++++++++ drivers/edac/amd64_edac.h | 3 +++ 2 files changed, 18 insertions(+)drivers/edac/amd64_edac.c +0
-0drivers/edac/amd64_edac.c static struct amd64_family_type · line 3201
Quoted 5 lines
drivers/edac/amd64_edac.c +1
-0@@ -3188,6 +3197,12 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt) break;case 0x17 : +/* Check if CPU model is in range 10h-2fh */ This comment is not needed because it's obvious from the code.
Quoted 6 lines
Other than those few nits this looks good to me.
Reviewed-by Yazen Ghannam <[email protected]>Thanks,
Yazen
This version of the patch includes tweaks suggested by Yazen in his review for patch v2 (Link:
https://lkml.kernel.org/r/BN7PR12MB2593B097267132250140FBEAF83E0@BN7PR12MB2593.namprd12.prod.outlook.com).
Does anyone else have any feedback for this patch I submitted a week ago?
Thanks,
Michael
Quoted 12 lines
-----Original Message-----
From: Michael Jin <[email protected]>
Sent: Thursday, August 16, 2018 2:29 PM
To: Borislav Petkov <[email protected]>; Ghannam, Yazen <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]; [email protected]; Michael Jin <[email protected]>; [email protected]
Subject: [PATCH v3] EDAC, amd64: Add Family 17h Model 10h support.Add new device IDs for family 17h models 10h-2fh.
Quoted 7 lines
This is required by
amd64_edac_modin order to properly detect PCI device functions 0 and 6.Cc <[email protected]> # 4.10.xSigned-off-by Michael Jin <[email protected]>
Looks good to me.
Thanks,
Yazen
Quoted 20 lines · Yazen
Quoted 12 lines
-----Original Message-----
From: Michael Jin <[email protected]>
Sent: Thursday, August 16, 2018 2:29 PM
To: Borislav Petkov <[email protected]>; Ghannam, Yazen <[email protected]>; Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]; [email protected]; Michael Jin <[email protected]>; [email protected]
Subject: [PATCH v3] EDAC, amd64: Add Family 17h Model 10h support.Add new device IDs for family 17h models 10h-2fh.
Quoted 7 lines
This is required by
amd64_edac_modin order to properly detect PCI device functions 0 and 6.Cc <[email protected]> # 4.10.xSigned-off-by Michael Jin <[email protected]>
Quoted 6 lines
Looks good to me.
Reviewed-by Yazen Ghannam <[email protected]>Thanks,
Yazen
Thanks for the reviewing patch v3.
Michael
Quoted 5 lines · Michael Jin
Add new device IDs for family 17h models 10h-2fh.
This is required by
amd64_edac_modin order to properly detect PCI device functions 0 and 6.
Quoted 7 lines
Cc <[email protected]> # 4.10.xSigned-off-by Michael Jin <[email protected]>--- drivers/edac/amd64_edac.c | 14 ++++++++++++++ drivers/edac/amd64_edac.h | 3 +++ 2 files changed, 17 insertions(+)
Applied, thanks.