Lines Matching defs:nid
296 static bool base_limit_match(struct amd64_pvt *pvt, u64 sys_addr, u8 nid)
308 return ((addr >= get_dram_base(pvt, nid)) &&
309 (addr <= get_dram_limit(pvt, nid)));
1839 static int f1x_lookup_addr_in_dct(u64 in_addr, u8 nid, u8 dct)
1847 mci = edac_mc_find(nid);
2795 u8 nid = pvt->mc_node_id;
2805 amd_smn_read(nid, umc_base + UMCCH_DIMM_CFG, &umc->dimm_cfg);
2806 amd_smn_read(nid, umc_base + UMCCH_UMC_CFG, &umc->umc_cfg);
2807 amd_smn_read(nid, umc_base + UMCCH_SDP_CTRL, &umc->sdp_ctrl);
2808 amd_smn_read(nid, umc_base + UMCCH_ECC_CTRL, &umc->ecc_ctrl);
2809 amd_smn_read(nid, umc_base + UMCCH_UMC_CAP_HI, &umc->umc_cap_hi);
3073 static void get_cpus_on_this_dct_cpumask(struct cpumask *mask, u16 nid)
3078 if (amd_get_nb_id(cpu) == nid)
3083 static bool nb_mce_bank_enabled_on_node(u16 nid)
3094 get_cpus_on_this_dct_cpumask(mask, nid);
3116 static int toggle_ecc_err_reporting(struct ecc_settings *s, u16 nid, bool on)
3126 get_cpus_on_this_dct_cpumask(cmask, nid);
3154 static bool enable_ecc_error_reporting(struct ecc_settings *s, u16 nid,
3160 if (toggle_ecc_err_reporting(s, nid, ON)) {
3176 nid, value, !!(value & NBCFG_ECC_ENABLE));
3201 nid, value, !!(value & NBCFG_ECC_ENABLE));
3206 static void restore_ecc_error_reporting(struct ecc_settings *s, u16 nid,
3228 if (toggle_ecc_err_reporting(s, nid, OFF))
3234 u16 nid = pvt->mc_node_id;
3260 edac_dbg(0, "Node %d: No enabled UMCs.\n", nid);
3269 nb_mce_en = nb_mce_bank_enabled_on_node(nid);
3272 MSR_IA32_MCG_CTL, nid);
3276 nid, (ecc_en ? "enabled" : "disabled"));
3552 static int probe_one_instance(unsigned int nid)
3554 struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
3564 ecc_stngs[nid] = s;
3570 pvt->mc_node_id = nid;
3584 amd64_info("Node %d: No DIMMs detected.\n", nid);
3600 if (!enable_ecc_error_reporting(s, nid, F3))
3606 amd64_err("Error probing instance: %d\n", nid);
3609 restore_ecc_error_reporting(s, nid, F3);
3624 ecc_stngs[nid] = NULL;
3630 static void remove_one_instance(unsigned int nid)
3632 struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
3633 struct ecc_settings *s = ecc_stngs[nid];
3644 restore_ecc_error_reporting(s, nid, F3);
3646 kfree(ecc_stngs[nid]);
3647 ecc_stngs[nid] = NULL;