Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
edac, pci: remove pesky debug printk
amd64_edac: restrict PCI config space access
amd64_edac: fix forcing module load/unload
amd64_edac: make driver loading more robust
amd64_edac: fix driver instance freeing
amd64_edac: fix K8 chip select reporting

+28 -19
+28 -17
drivers/edac/amd64_edac.c
··· 1700 1700 */ 1701 1701 static void amd64_debug_display_dimm_sizes(int ctrl, struct amd64_pvt *pvt) 1702 1702 { 1703 - int dimm, size0, size1; 1703 + int dimm, size0, size1, factor = 0; 1704 1704 u32 dbam; 1705 1705 u32 *dcsb; 1706 1706 1707 1707 if (boot_cpu_data.x86 == 0xf) { 1708 + if (pvt->dclr0 & F10_WIDTH_128) 1709 + factor = 1; 1710 + 1708 1711 /* K8 families < revF not supported yet */ 1709 1712 if (pvt->ext_model < K8_REV_F) 1710 1713 return; ··· 1735 1732 size1 = pvt->ops->dbam_to_cs(pvt, DBAM_DIMM(dimm, dbam)); 1736 1733 1737 1734 edac_printk(KERN_DEBUG, EDAC_MC, " %d: %5dMB %d: %5dMB\n", 1738 - dimm * 2, size0, dimm * 2 + 1, size1); 1735 + dimm * 2, size0 << factor, 1736 + dimm * 2 + 1, size1 << factor); 1739 1737 } 1740 1738 } 1741 1739 ··· 2349 2345 amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCLR_0, &pvt->dclr0); 2350 2346 amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCHR_0, &pvt->dchr0); 2351 2347 2352 - if (!dct_ganging_enabled(pvt)) { 2348 + if (!dct_ganging_enabled(pvt) && boot_cpu_data.x86 >= 0x10) { 2353 2349 amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCLR_1, &pvt->dclr1); 2354 2350 amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCHR_1, &pvt->dchr1); 2355 2351 } ··· 2690 2686 amd64_printk(KERN_WARNING, "%s", ecc_warning); 2691 2687 return -ENODEV; 2692 2688 } 2693 - } else 2694 - /* CLEAR the override, since BIOS controlled it */ 2695 2689 ecc_enable_override = 0; 2690 + } 2696 2691 2697 2692 return 0; 2698 2693 } ··· 2928 2925 2929 2926 amd64_free_mc_sibling_devices(pvt); 2930 2927 2931 - kfree(pvt); 2932 - mci->pvt_info = NULL; 2933 - 2934 - mci_lookup[pvt->mc_node_id] = NULL; 2935 - 2936 2928 /* unregister from EDAC MCE */ 2937 2929 amd_report_gart_errors(false); 2938 2930 amd_unregister_ecc_decoder(amd64_decode_bus_error); 2939 2931 2940 2932 /* Free the EDAC CORE resources */ 2933 + mci->pvt_info = NULL; 2934 + mci_lookup[pvt->mc_node_id] = NULL; 2935 + 2936 + kfree(pvt); 2941 2937 edac_mc_free(mci); 2942 2938 } 2943 2939 ··· 3013 3011 static int __init amd64_edac_init(void) 3014 3012 { 3015 3013 int nb, err = -ENODEV; 3014 + bool load_ok = false; 3016 3015 3017 3016 edac_printk(KERN_INFO, EDAC_MOD_STR, EDAC_AMD64_VERSION "\n"); 3018 3017 3019 3018 opstate_init(); 3020 3019 3021 3020 if (cache_k8_northbridges() < 0) 3022 - return err; 3021 + goto err_ret; 3023 3022 3024 3023 msrs = msrs_alloc(); 3024 + if (!msrs) 3025 + goto err_ret; 3025 3026 3026 3027 err = pci_register_driver(&amd64_pci_driver); 3027 3028 if (err) 3028 - return err; 3029 + goto err_pci; 3029 3030 3030 3031 /* 3031 3032 * At this point, the array 'pvt_lookup[]' contains pointers to alloc'd 3032 3033 * amd64_pvt structs. These will be used in the 2nd stage init function 3033 3034 * to finish initialization of the MC instances. 3034 3035 */ 3036 + err = -ENODEV; 3035 3037 for (nb = 0; nb < num_k8_northbridges; nb++) { 3036 3038 if (!pvt_lookup[nb]) 3037 3039 continue; ··· 3043 3037 err = amd64_init_2nd_stage(pvt_lookup[nb]); 3044 3038 if (err) 3045 3039 goto err_2nd_stage; 3040 + 3041 + load_ok = true; 3046 3042 } 3047 3043 3048 - amd64_setup_pci_device(); 3049 - 3050 - return 0; 3044 + if (load_ok) { 3045 + amd64_setup_pci_device(); 3046 + return 0; 3047 + } 3051 3048 3052 3049 err_2nd_stage: 3053 - debugf0("2nd stage failed\n"); 3054 3050 pci_unregister_driver(&amd64_pci_driver); 3055 - 3051 + err_pci: 3052 + msrs_free(msrs); 3053 + msrs = NULL; 3054 + err_ret: 3056 3055 return err; 3057 3056 } 3058 3057
-2
drivers/edac/edac_pci_sysfs.c
··· 534 534 { 535 535 u8 header_type; 536 536 537 - debugf0("%s()\n", __func__); 538 - 539 537 get_pci_parity_status(dev, 0); 540 538 541 539 /* read the device TYPE, looking for bridges */