@@ -1428,9 +1428,6 @@ static void __dump_misc_regs_df(struct amd64_pvt *pvt)
14281428
14291429 debug_display_dimm_sizes_df (pvt , i );
14301430 }
1431-
1432- edac_dbg (1 , "F0x104 (DRAM Hole Address): 0x%08x, base: 0x%08x\n" ,
1433- pvt -> dhar , dhar_base (pvt ));
14341431}
14351432
14361433/* Display and decode various NB registers for debug purposes. */
@@ -1465,6 +1462,8 @@ static void __dump_misc_regs(struct amd64_pvt *pvt)
14651462 /* Only if NOT ganged does dclr1 have valid info */
14661463 if (!dct_ganging_enabled (pvt ))
14671464 debug_dump_dramcfg_low (pvt , pvt -> dclr1 , 1 );
1465+
1466+ edac_dbg (1 , " DramHoleValid: %s\n" , dhar_valid (pvt ) ? "yes" : "no" );
14681467}
14691468
14701469/* Display and decode various NB registers for debug purposes. */
@@ -1475,8 +1474,6 @@ static void dump_misc_regs(struct amd64_pvt *pvt)
14751474 else
14761475 __dump_misc_regs (pvt );
14771476
1478- edac_dbg (1 , " DramHoleValid: %s\n" , dhar_valid (pvt ) ? "yes" : "no" );
1479-
14801477 amd64_info ("using x%u syndromes.\n" , pvt -> ecc_sym_sz );
14811478}
14821479
@@ -2905,7 +2902,6 @@ static struct amd64_family_type family_types[] = {
29052902 },
29062903 [F17_CPUS ] = {
29072904 .ctl_name = "F17h" ,
2908- .f0_id = PCI_DEVICE_ID_AMD_17H_DF_F0 ,
29092905 .max_mcs = 2 ,
29102906 .ops = {
29112907 .early_channel_count = f17_early_channel_count ,
@@ -2914,7 +2910,6 @@ static struct amd64_family_type family_types[] = {
29142910 },
29152911 [F17_M10H_CPUS ] = {
29162912 .ctl_name = "F17h_M10h" ,
2917- .f0_id = PCI_DEVICE_ID_AMD_17H_M10H_DF_F0 ,
29182913 .max_mcs = 2 ,
29192914 .ops = {
29202915 .early_channel_count = f17_early_channel_count ,
@@ -2923,7 +2918,6 @@ static struct amd64_family_type family_types[] = {
29232918 },
29242919 [F17_M30H_CPUS ] = {
29252920 .ctl_name = "F17h_M30h" ,
2926- .f0_id = PCI_DEVICE_ID_AMD_17H_M30H_DF_F0 ,
29272921 .max_mcs = 8 ,
29282922 .ops = {
29292923 .early_channel_count = f17_early_channel_count ,
@@ -2932,7 +2926,6 @@ static struct amd64_family_type family_types[] = {
29322926 },
29332927 [F17_M60H_CPUS ] = {
29342928 .ctl_name = "F17h_M60h" ,
2935- .f0_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F0 ,
29362929 .max_mcs = 2 ,
29372930 .ops = {
29382931 .early_channel_count = f17_early_channel_count ,
@@ -2941,7 +2934,6 @@ static struct amd64_family_type family_types[] = {
29412934 },
29422935 [F17_M70H_CPUS ] = {
29432936 .ctl_name = "F17h_M70h" ,
2944- .f0_id = PCI_DEVICE_ID_AMD_17H_M70H_DF_F0 ,
29452937 .max_mcs = 2 ,
29462938 .ops = {
29472939 .early_channel_count = f17_early_channel_count ,
@@ -2950,7 +2942,6 @@ static struct amd64_family_type family_types[] = {
29502942 },
29512943 [F19_CPUS ] = {
29522944 .ctl_name = "F19h" ,
2953- .f0_id = PCI_DEVICE_ID_AMD_19H_DF_F0 ,
29542945 .max_mcs = 8 ,
29552946 .ops = {
29562947 .early_channel_count = f17_early_channel_count ,
@@ -2959,7 +2950,6 @@ static struct amd64_family_type family_types[] = {
29592950 },
29602951 [F19_M10H_CPUS ] = {
29612952 .ctl_name = "F19h_M10h" ,
2962- .f0_id = PCI_DEVICE_ID_AMD_19H_M10H_DF_F0 ,
29632953 .max_mcs = 12 ,
29642954 .flags .zn_regs_v2 = 1 ,
29652955 .ops = {
@@ -2969,7 +2959,6 @@ static struct amd64_family_type family_types[] = {
29692959 },
29702960 [F19_M50H_CPUS ] = {
29712961 .ctl_name = "F19h_M50h" ,
2972- .f0_id = PCI_DEVICE_ID_AMD_19H_M50H_DF_F0 ,
29732962 .max_mcs = 2 ,
29742963 .ops = {
29752964 .early_channel_count = f17_early_channel_count ,
@@ -3282,26 +3271,12 @@ static void decode_umc_error(int node_id, struct mce *m)
32823271/*
32833272 * Use pvt->F3 which contains the F3 CPU PCI device to get the related
32843273 * F1 (AddrMap) and F2 (Dct) devices. Return negative value on error.
3285- * Reserve F0 on systems with a UMC.
32863274 */
32873275static int
32883276reserve_mc_sibling_devs (struct amd64_pvt * pvt , u16 pci_id1 , u16 pci_id2 )
32893277{
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 )
33033279 return 0 ;
3304- }
33053280
33063281 /* Reserve the ADDRESS MAP Device */
33073282 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)
33333308static void free_mc_sibling_devs (struct amd64_pvt * pvt )
33343309{
33353310 if (pvt -> umc ) {
3336- pci_dev_put ( pvt -> F0 ) ;
3311+ return ;
33373312 } else {
33383313 pci_dev_put (pvt -> F1 );
33393314 pci_dev_put (pvt -> F2 );
@@ -3423,7 +3398,6 @@ static void read_mc_regs(struct amd64_pvt *pvt)
34233398
34243399 if (pvt -> umc ) {
34253400 __read_mc_regs_df (pvt );
3426- amd64_read_pci_cfg (pvt -> F0 , DF_DHAR , & pvt -> dhar );
34273401
34283402 goto skip ;
34293403 }
@@ -4057,8 +4031,6 @@ static int hw_info_get(struct amd64_pvt *pvt)
40574031 pvt -> umc = kcalloc (fam_type -> max_mcs , sizeof (struct amd64_umc ), GFP_KERNEL );
40584032 if (!pvt -> umc )
40594033 return - ENOMEM ;
4060-
4061- pci_id1 = fam_type -> f0_id ;
40624034 } else {
40634035 pci_id1 = fam_type -> f1_id ;
40644036 pci_id2 = fam_type -> f2_id ;
@@ -4075,7 +4047,7 @@ static int hw_info_get(struct amd64_pvt *pvt)
40754047
40764048static void hw_info_put (struct amd64_pvt * pvt )
40774049{
4078- if (pvt -> F0 || pvt -> F1 )
4050+ if (pvt -> F1 )
40794051 free_mc_sibling_devs (pvt );
40804052
40814053 kfree (pvt -> umc );
0 commit comments