Lines Matching refs:nid
269 static bool base_limit_match(struct amd64_pvt *pvt, u64 sys_addr, u8 nid) in base_limit_match() argument
281 return ((addr >= get_dram_base(pvt, nid)) && in base_limit_match()
282 (addr <= get_dram_limit(pvt, nid))); in base_limit_match()
1524 static int f1x_lookup_addr_in_dct(u64 in_addr, u8 nid, u8 dct) in f1x_lookup_addr_in_dct() argument
1532 mci = edac_mc_find(nid); in f1x_lookup_addr_in_dct()
2488 static void get_cpus_on_this_dct_cpumask(struct cpumask *mask, u16 nid) in get_cpus_on_this_dct_cpumask() argument
2493 if (amd_get_nb_id(cpu) == nid) in get_cpus_on_this_dct_cpumask()
2498 static bool nb_mce_bank_enabled_on_node(u16 nid) in nb_mce_bank_enabled_on_node() argument
2509 get_cpus_on_this_dct_cpumask(mask, nid); in nb_mce_bank_enabled_on_node()
2531 static int toggle_ecc_err_reporting(struct ecc_settings *s, u16 nid, bool on) in toggle_ecc_err_reporting() argument
2541 get_cpus_on_this_dct_cpumask(cmask, nid); in toggle_ecc_err_reporting()
2569 static bool enable_ecc_error_reporting(struct ecc_settings *s, u16 nid, in enable_ecc_error_reporting() argument
2575 if (toggle_ecc_err_reporting(s, nid, ON)) { in enable_ecc_error_reporting()
2591 nid, value, !!(value & NBCFG_ECC_ENABLE)); in enable_ecc_error_reporting()
2616 nid, value, !!(value & NBCFG_ECC_ENABLE)); in enable_ecc_error_reporting()
2621 static void restore_ecc_error_reporting(struct ecc_settings *s, u16 nid, in restore_ecc_error_reporting() argument
2644 if (toggle_ecc_err_reporting(s, nid, OFF)) in restore_ecc_error_reporting()
2660 static bool ecc_enabled(struct pci_dev *F3, u16 nid) in ecc_enabled() argument
2671 nb_mce_en = nb_mce_bank_enabled_on_node(nid); in ecc_enabled()
2675 MSR_IA32_MCG_CTL, nid); in ecc_enabled()
2788 u16 nid = amd_pci_dev_to_node_id(F2); in init_one_instance() local
2795 pvt->mc_node_id = nid; in init_one_instance()
2834 mci = edac_mc_alloc(nid, ARRAY_SIZE(layers), layers, 0); in init_one_instance()
2878 u16 nid = amd_pci_dev_to_node_id(pdev); in probe_one_instance() local
2879 struct pci_dev *F3 = node_to_amd_nb(nid)->misc; in probe_one_instance()
2894 ecc_stngs[nid] = s; in probe_one_instance()
2896 if (!ecc_enabled(F3, nid)) { in probe_one_instance()
2904 if (!enable_ecc_error_reporting(s, nid, F3)) in probe_one_instance()
2910 amd64_err("Error probing instance: %d\n", nid); in probe_one_instance()
2911 restore_ecc_error_reporting(s, nid, F3); in probe_one_instance()
2918 ecc_stngs[nid] = NULL; in probe_one_instance()
2928 u16 nid = amd_pci_dev_to_node_id(pdev); in remove_one_instance() local
2929 struct pci_dev *F3 = node_to_amd_nb(nid)->misc; in remove_one_instance()
2930 struct ecc_settings *s = ecc_stngs[nid]; in remove_one_instance()
2942 restore_ecc_error_reporting(s, nid, F3); in remove_one_instance()
2950 kfree(ecc_stngs[nid]); in remove_one_instance()
2951 ecc_stngs[nid] = NULL; in remove_one_instance()