@@ -1428,9 +1428,6 @@ static void __dump_misc_regs_df(struct amd64_pvt *pvt)
1428
1428
1429
1429
debug_display_dimm_sizes_df (pvt , i );
1430
1430
}
1431
-
1432
- edac_dbg (1 , "F0x104 (DRAM Hole Address): 0x%08x, base: 0x%08x\n" ,
1433
- pvt -> dhar , dhar_base (pvt ));
1434
1431
}
1435
1432
1436
1433
/* Display and decode various NB registers for debug purposes. */
@@ -1465,6 +1462,8 @@ static void __dump_misc_regs(struct amd64_pvt *pvt)
1465
1462
/* Only if NOT ganged does dclr1 have valid info */
1466
1463
if (!dct_ganging_enabled (pvt ))
1467
1464
debug_dump_dramcfg_low (pvt , pvt -> dclr1 , 1 );
1465
+
1466
+ edac_dbg (1 , " DramHoleValid: %s\n" , dhar_valid (pvt ) ? "yes" : "no" );
1468
1467
}
1469
1468
1470
1469
/* Display and decode various NB registers for debug purposes. */
@@ -1475,8 +1474,6 @@ static void dump_misc_regs(struct amd64_pvt *pvt)
1475
1474
else
1476
1475
__dump_misc_regs (pvt );
1477
1476
1478
- edac_dbg (1 , " DramHoleValid: %s\n" , dhar_valid (pvt ) ? "yes" : "no" );
1479
-
1480
1477
amd64_info ("using x%u syndromes.\n" , pvt -> ecc_sym_sz );
1481
1478
}
1482
1479
@@ -2905,7 +2902,6 @@ static struct amd64_family_type family_types[] = {
2905
2902
},
2906
2903
[F17_CPUS ] = {
2907
2904
.ctl_name = "F17h" ,
2908
- .f0_id = PCI_DEVICE_ID_AMD_17H_DF_F0 ,
2909
2905
.max_mcs = 2 ,
2910
2906
.ops = {
2911
2907
.early_channel_count = f17_early_channel_count ,
@@ -2914,7 +2910,6 @@ static struct amd64_family_type family_types[] = {
2914
2910
},
2915
2911
[F17_M10H_CPUS ] = {
2916
2912
.ctl_name = "F17h_M10h" ,
2917
- .f0_id = PCI_DEVICE_ID_AMD_17H_M10H_DF_F0 ,
2918
2913
.max_mcs = 2 ,
2919
2914
.ops = {
2920
2915
.early_channel_count = f17_early_channel_count ,
@@ -2923,7 +2918,6 @@ static struct amd64_family_type family_types[] = {
2923
2918
},
2924
2919
[F17_M30H_CPUS ] = {
2925
2920
.ctl_name = "F17h_M30h" ,
2926
- .f0_id = PCI_DEVICE_ID_AMD_17H_M30H_DF_F0 ,
2927
2921
.max_mcs = 8 ,
2928
2922
.ops = {
2929
2923
.early_channel_count = f17_early_channel_count ,
@@ -2932,7 +2926,6 @@ static struct amd64_family_type family_types[] = {
2932
2926
},
2933
2927
[F17_M60H_CPUS ] = {
2934
2928
.ctl_name = "F17h_M60h" ,
2935
- .f0_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F0 ,
2936
2929
.max_mcs = 2 ,
2937
2930
.ops = {
2938
2931
.early_channel_count = f17_early_channel_count ,
@@ -2941,7 +2934,6 @@ static struct amd64_family_type family_types[] = {
2941
2934
},
2942
2935
[F17_M70H_CPUS ] = {
2943
2936
.ctl_name = "F17h_M70h" ,
2944
- .f0_id = PCI_DEVICE_ID_AMD_17H_M70H_DF_F0 ,
2945
2937
.max_mcs = 2 ,
2946
2938
.ops = {
2947
2939
.early_channel_count = f17_early_channel_count ,
@@ -2950,7 +2942,6 @@ static struct amd64_family_type family_types[] = {
2950
2942
},
2951
2943
[F19_CPUS ] = {
2952
2944
.ctl_name = "F19h" ,
2953
- .f0_id = PCI_DEVICE_ID_AMD_19H_DF_F0 ,
2954
2945
.max_mcs = 8 ,
2955
2946
.ops = {
2956
2947
.early_channel_count = f17_early_channel_count ,
@@ -2959,7 +2950,6 @@ static struct amd64_family_type family_types[] = {
2959
2950
},
2960
2951
[F19_M10H_CPUS ] = {
2961
2952
.ctl_name = "F19h_M10h" ,
2962
- .f0_id = PCI_DEVICE_ID_AMD_19H_M10H_DF_F0 ,
2963
2953
.max_mcs = 12 ,
2964
2954
.flags .zn_regs_v2 = 1 ,
2965
2955
.ops = {
@@ -2969,7 +2959,6 @@ static struct amd64_family_type family_types[] = {
2969
2959
},
2970
2960
[F19_M50H_CPUS ] = {
2971
2961
.ctl_name = "F19h_M50h" ,
2972
- .f0_id = PCI_DEVICE_ID_AMD_19H_M50H_DF_F0 ,
2973
2962
.max_mcs = 2 ,
2974
2963
.ops = {
2975
2964
.early_channel_count = f17_early_channel_count ,
@@ -3282,26 +3271,12 @@ static void decode_umc_error(int node_id, struct mce *m)
3282
3271
/*
3283
3272
* Use pvt->F3 which contains the F3 CPU PCI device to get the related
3284
3273
* F1 (AddrMap) and F2 (Dct) devices. Return negative value on error.
3285
- * Reserve F0 on systems with a UMC.
3286
3274
*/
3287
3275
static int
3288
3276
reserve_mc_sibling_devs (struct amd64_pvt * pvt , u16 pci_id1 , u16 pci_id2 )
3289
3277
{
3290
- if (pvt -> umc ) {
3291
- pvt -> F0 = pci_get_related_function (pvt -> F3 -> vendor , pci_id1 , pvt -> F3 );
3292
- if (!pvt -> F0 ) {
3293
- edac_dbg (1 , "F0 not found, device 0x%x\n" , pci_id1 );
3294
- return - ENODEV ;
3295
- }
3296
-
3297
- if (!pci_ctl_dev )
3298
- pci_ctl_dev = & pvt -> F0 -> dev ;
3299
-
3300
- edac_dbg (1 , "F0: %s\n" , pci_name (pvt -> F0 ));
3301
- edac_dbg (1 , "F3: %s\n" , pci_name (pvt -> F3 ));
3302
-
3278
+ if (pvt -> umc )
3303
3279
return 0 ;
3304
- }
3305
3280
3306
3281
/* Reserve the ADDRESS MAP Device */
3307
3282
pvt -> F1 = pci_get_related_function (pvt -> F3 -> vendor , pci_id1 , pvt -> F3 );
@@ -3333,7 +3308,7 @@ reserve_mc_sibling_devs(struct amd64_pvt *pvt, u16 pci_id1, u16 pci_id2)
3333
3308
static void free_mc_sibling_devs (struct amd64_pvt * pvt )
3334
3309
{
3335
3310
if (pvt -> umc ) {
3336
- pci_dev_put ( pvt -> F0 ) ;
3311
+ return ;
3337
3312
} else {
3338
3313
pci_dev_put (pvt -> F1 );
3339
3314
pci_dev_put (pvt -> F2 );
@@ -3423,7 +3398,6 @@ static void read_mc_regs(struct amd64_pvt *pvt)
3423
3398
3424
3399
if (pvt -> umc ) {
3425
3400
__read_mc_regs_df (pvt );
3426
- amd64_read_pci_cfg (pvt -> F0 , DF_DHAR , & pvt -> dhar );
3427
3401
3428
3402
goto skip ;
3429
3403
}
@@ -4057,8 +4031,6 @@ static int hw_info_get(struct amd64_pvt *pvt)
4057
4031
pvt -> umc = kcalloc (fam_type -> max_mcs , sizeof (struct amd64_umc ), GFP_KERNEL );
4058
4032
if (!pvt -> umc )
4059
4033
return - ENOMEM ;
4060
-
4061
- pci_id1 = fam_type -> f0_id ;
4062
4034
} else {
4063
4035
pci_id1 = fam_type -> f1_id ;
4064
4036
pci_id2 = fam_type -> f2_id ;
@@ -4075,7 +4047,7 @@ static int hw_info_get(struct amd64_pvt *pvt)
4075
4047
4076
4048
static void hw_info_put (struct amd64_pvt * pvt )
4077
4049
{
4078
- if (pvt -> F0 || pvt -> F1 )
4050
+ if (pvt -> F1 )
4079
4051
free_mc_sibling_devs (pvt );
4080
4052
4081
4053
kfree (pvt -> umc );
0 commit comments