Skip to content

Commit 6229235

Browse files
yghannambp3tk0v
authored andcommitted
EDAC/amd64: Remove PCI Function 6
PCI Function 6 is used on Family 17h and later to access scrub registers. With scrub access removed, this function has no other use. Remove all Function 6 PCI IDs and related code. Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6e241bc commit 6229235

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

drivers/edac/amd64_edac.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,7 +2906,6 @@ static struct amd64_family_type family_types[] = {
29062906
[F17_CPUS] = {
29072907
.ctl_name = "F17h",
29082908
.f0_id = PCI_DEVICE_ID_AMD_17H_DF_F0,
2909-
.f6_id = PCI_DEVICE_ID_AMD_17H_DF_F6,
29102909
.max_mcs = 2,
29112910
.ops = {
29122911
.early_channel_count = f17_early_channel_count,
@@ -2916,7 +2915,6 @@ static struct amd64_family_type family_types[] = {
29162915
[F17_M10H_CPUS] = {
29172916
.ctl_name = "F17h_M10h",
29182917
.f0_id = PCI_DEVICE_ID_AMD_17H_M10H_DF_F0,
2919-
.f6_id = PCI_DEVICE_ID_AMD_17H_M10H_DF_F6,
29202918
.max_mcs = 2,
29212919
.ops = {
29222920
.early_channel_count = f17_early_channel_count,
@@ -2926,7 +2924,6 @@ static struct amd64_family_type family_types[] = {
29262924
[F17_M30H_CPUS] = {
29272925
.ctl_name = "F17h_M30h",
29282926
.f0_id = PCI_DEVICE_ID_AMD_17H_M30H_DF_F0,
2929-
.f6_id = PCI_DEVICE_ID_AMD_17H_M30H_DF_F6,
29302927
.max_mcs = 8,
29312928
.ops = {
29322929
.early_channel_count = f17_early_channel_count,
@@ -2936,7 +2933,6 @@ static struct amd64_family_type family_types[] = {
29362933
[F17_M60H_CPUS] = {
29372934
.ctl_name = "F17h_M60h",
29382935
.f0_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F0,
2939-
.f6_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F6,
29402936
.max_mcs = 2,
29412937
.ops = {
29422938
.early_channel_count = f17_early_channel_count,
@@ -2946,7 +2942,6 @@ static struct amd64_family_type family_types[] = {
29462942
[F17_M70H_CPUS] = {
29472943
.ctl_name = "F17h_M70h",
29482944
.f0_id = PCI_DEVICE_ID_AMD_17H_M70H_DF_F0,
2949-
.f6_id = PCI_DEVICE_ID_AMD_17H_M70H_DF_F6,
29502945
.max_mcs = 2,
29512946
.ops = {
29522947
.early_channel_count = f17_early_channel_count,
@@ -2956,7 +2951,6 @@ static struct amd64_family_type family_types[] = {
29562951
[F19_CPUS] = {
29572952
.ctl_name = "F19h",
29582953
.f0_id = PCI_DEVICE_ID_AMD_19H_DF_F0,
2959-
.f6_id = PCI_DEVICE_ID_AMD_19H_DF_F6,
29602954
.max_mcs = 8,
29612955
.ops = {
29622956
.early_channel_count = f17_early_channel_count,
@@ -2966,7 +2960,6 @@ static struct amd64_family_type family_types[] = {
29662960
[F19_M10H_CPUS] = {
29672961
.ctl_name = "F19h_M10h",
29682962
.f0_id = PCI_DEVICE_ID_AMD_19H_M10H_DF_F0,
2969-
.f6_id = PCI_DEVICE_ID_AMD_19H_M10H_DF_F6,
29702963
.max_mcs = 12,
29712964
.flags.zn_regs_v2 = 1,
29722965
.ops = {
@@ -2977,7 +2970,6 @@ static struct amd64_family_type family_types[] = {
29772970
[F19_M50H_CPUS] = {
29782971
.ctl_name = "F19h_M50h",
29792972
.f0_id = PCI_DEVICE_ID_AMD_19H_M50H_DF_F0,
2980-
.f6_id = PCI_DEVICE_ID_AMD_19H_M50H_DF_F6,
29812973
.max_mcs = 2,
29822974
.ops = {
29832975
.early_channel_count = f17_early_channel_count,
@@ -3290,7 +3282,7 @@ static void decode_umc_error(int node_id, struct mce *m)
32903282
/*
32913283
* Use pvt->F3 which contains the F3 CPU PCI device to get the related
32923284
* F1 (AddrMap) and F2 (Dct) devices. Return negative value on error.
3293-
* Reserve F0 and F6 on systems with a UMC.
3285+
* Reserve F0 on systems with a UMC.
32943286
*/
32953287
static int
32963288
reserve_mc_sibling_devs(struct amd64_pvt *pvt, u16 pci_id1, u16 pci_id2)
@@ -3302,21 +3294,11 @@ reserve_mc_sibling_devs(struct amd64_pvt *pvt, u16 pci_id1, u16 pci_id2)
33023294
return -ENODEV;
33033295
}
33043296

3305-
pvt->F6 = pci_get_related_function(pvt->F3->vendor, pci_id2, pvt->F3);
3306-
if (!pvt->F6) {
3307-
pci_dev_put(pvt->F0);
3308-
pvt->F0 = NULL;
3309-
3310-
edac_dbg(1, "F6 not found: device 0x%x\n", pci_id2);
3311-
return -ENODEV;
3312-
}
3313-
33143297
if (!pci_ctl_dev)
33153298
pci_ctl_dev = &pvt->F0->dev;
33163299

33173300
edac_dbg(1, "F0: %s\n", pci_name(pvt->F0));
33183301
edac_dbg(1, "F3: %s\n", pci_name(pvt->F3));
3319-
edac_dbg(1, "F6: %s\n", pci_name(pvt->F6));
33203302

33213303
return 0;
33223304
}
@@ -3352,7 +3334,6 @@ static void free_mc_sibling_devs(struct amd64_pvt *pvt)
33523334
{
33533335
if (pvt->umc) {
33543336
pci_dev_put(pvt->F0);
3355-
pci_dev_put(pvt->F6);
33563337
} else {
33573338
pci_dev_put(pvt->F1);
33583339
pci_dev_put(pvt->F2);
@@ -4078,7 +4059,6 @@ static int hw_info_get(struct amd64_pvt *pvt)
40784059
return -ENOMEM;
40794060

40804061
pci_id1 = fam_type->f0_id;
4081-
pci_id2 = fam_type->f6_id;
40824062
} else {
40834063
pci_id1 = fam_type->f1_id;
40844064
pci_id2 = fam_type->f2_id;

drivers/edac/amd64_edac.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,13 @@
115115
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F1 0x1581
116116
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F2 0x1582
117117
#define PCI_DEVICE_ID_AMD_17H_DF_F0 0x1460
118-
#define PCI_DEVICE_ID_AMD_17H_DF_F6 0x1466
119118
#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F0 0x15e8
120-
#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F6 0x15ee
121119
#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F0 0x1490
122-
#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F6 0x1496
123120
#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F0 0x1448
124-
#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F6 0x144e
125121
#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F0 0x1440
126-
#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F6 0x1446
127122
#define PCI_DEVICE_ID_AMD_19H_DF_F0 0x1650
128-
#define PCI_DEVICE_ID_AMD_19H_DF_F6 0x1656
129123
#define PCI_DEVICE_ID_AMD_19H_M10H_DF_F0 0x14ad
130-
#define PCI_DEVICE_ID_AMD_19H_M10H_DF_F6 0x14b3
131124
#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F0 0x166a
132-
#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F6 0x1670
133125

134126
/*
135127
* Function 1 - Address Map
@@ -354,7 +346,7 @@ struct amd64_pvt {
354346
struct low_ops *ops;
355347

356348
/* pci_device handles which we utilize */
357-
struct pci_dev *F0, *F1, *F2, *F3, *F6;
349+
struct pci_dev *F0, *F1, *F2, *F3;
358350

359351
u16 mc_node_id; /* MC index of this MC node */
360352
u8 fam; /* CPU family */
@@ -501,7 +493,7 @@ struct amd64_family_flags {
501493

502494
struct amd64_family_type {
503495
const char *ctl_name;
504-
u16 f0_id, f1_id, f2_id, f6_id;
496+
u16 f0_id, f1_id, f2_id;
505497
/* Maximum number of memory controllers per die/node. */
506498
u8 max_mcs;
507499
struct amd64_family_flags flags;

0 commit comments

Comments
 (0)