Lines Matching refs:nid

254 static bool base_limit_match(struct amd64_pvt *pvt, u64 sys_addr, u8 nid)  in base_limit_match()  argument
266 return ((addr >= get_dram_base(pvt, nid)) && in base_limit_match()
267 (addr <= get_dram_limit(pvt, nid))); in base_limit_match()
1509 static int f1x_lookup_addr_in_dct(u64 in_addr, u8 nid, u8 dct) in f1x_lookup_addr_in_dct() argument
1517 mci = edac_mc_find(nid); in f1x_lookup_addr_in_dct()
2473 static void get_cpus_on_this_dct_cpumask(struct cpumask *mask, u16 nid) in get_cpus_on_this_dct_cpumask() argument
2478 if (amd_get_nb_id(cpu) == nid) in get_cpus_on_this_dct_cpumask()
2483 static bool nb_mce_bank_enabled_on_node(u16 nid) in nb_mce_bank_enabled_on_node() argument
2494 get_cpus_on_this_dct_cpumask(mask, nid); in nb_mce_bank_enabled_on_node()
2516 static int toggle_ecc_err_reporting(struct ecc_settings *s, u16 nid, bool on) in toggle_ecc_err_reporting() argument
2526 get_cpus_on_this_dct_cpumask(cmask, nid); in toggle_ecc_err_reporting()
2554 static bool enable_ecc_error_reporting(struct ecc_settings *s, u16 nid, in enable_ecc_error_reporting() argument
2560 if (toggle_ecc_err_reporting(s, nid, ON)) { in enable_ecc_error_reporting()
2576 nid, value, !!(value & NBCFG_ECC_ENABLE)); in enable_ecc_error_reporting()
2601 nid, value, !!(value & NBCFG_ECC_ENABLE)); in enable_ecc_error_reporting()
2606 static void restore_ecc_error_reporting(struct ecc_settings *s, u16 nid, in restore_ecc_error_reporting() argument
2629 if (toggle_ecc_err_reporting(s, nid, OFF)) in restore_ecc_error_reporting()
2645 static bool ecc_enabled(struct pci_dev *F3, u16 nid) in ecc_enabled() argument
2656 nb_mce_en = nb_mce_bank_enabled_on_node(nid); in ecc_enabled()
2660 MSR_IA32_MCG_CTL, nid); in ecc_enabled()
2773 u16 nid = amd_get_node_id(F2); in init_one_instance() local
2780 pvt->mc_node_id = nid; in init_one_instance()
2819 mci = edac_mc_alloc(nid, ARRAY_SIZE(layers), layers, 0); in init_one_instance()
2863 u16 nid = amd_get_node_id(pdev); in probe_one_instance() local
2864 struct pci_dev *F3 = node_to_amd_nb(nid)->misc; in probe_one_instance()
2879 ecc_stngs[nid] = s; in probe_one_instance()
2881 if (!ecc_enabled(F3, nid)) { in probe_one_instance()
2889 if (!enable_ecc_error_reporting(s, nid, F3)) in probe_one_instance()
2895 amd64_err("Error probing instance: %d\n", nid); in probe_one_instance()
2896 restore_ecc_error_reporting(s, nid, F3); in probe_one_instance()
2903 ecc_stngs[nid] = NULL; in probe_one_instance()
2913 u16 nid = amd_get_node_id(pdev); in remove_one_instance() local
2914 struct pci_dev *F3 = node_to_amd_nb(nid)->misc; in remove_one_instance()
2915 struct ecc_settings *s = ecc_stngs[nid]; in remove_one_instance()
2927 restore_ecc_error_reporting(s, nid, F3); in remove_one_instance()
2935 kfree(ecc_stngs[nid]); in remove_one_instance()
2936 ecc_stngs[nid] = NULL; in remove_one_instance()