• Home
  • Raw
  • Download

Lines Matching full:dct

87  * Select DCT to which PCI cfg accesses are routed
89 static void f15h_select_dct(struct amd64_pvt *pvt, u8 dct) in f15h_select_dct() argument
95 reg |= dct; in f15h_select_dct()
101 * Depending on the family, F2 DCT reads need special handling:
103 * K8: has a single DCT only and no address offsets >= 0x100
105 * F10h: each DCT has its own set of regs
109 * F16h: has only 1 DCT
111 * F15h: we select which DCT we access using F1x10C[DctCfgSel]
113 static inline int amd64_read_dct_pci_cfg(struct amd64_pvt *pvt, u8 dct, in amd64_read_dct_pci_cfg() argument
118 if (dct || offset >= 0x100) in amd64_read_dct_pci_cfg()
123 if (dct) { in amd64_read_dct_pci_cfg()
139 * We should select which DCT we access using F1x10C[DctCfgSel] in amd64_read_dct_pci_cfg()
141 dct = (dct && pvt->model == 0x30) ? 3 : dct; in amd64_read_dct_pci_cfg()
142 f15h_select_dct(pvt, dct); in amd64_read_dct_pci_cfg()
146 if (dct) in amd64_read_dct_pci_cfg()
382 * compute the CS base address of the @csrow on the DRAM controller @dct.
385 static void get_cs_base_and_mask(struct amd64_pvt *pvt, int csrow, u8 dct, in get_cs_base_and_mask() argument
392 csbase = pvt->csels[dct].csbases[csrow]; in get_cs_base_and_mask()
393 csmask = pvt->csels[dct].csmasks[csrow]; in get_cs_base_and_mask()
404 csbase = pvt->csels[dct].csbases[csrow]; in get_cs_base_and_mask()
405 csmask = pvt->csels[dct].csmasks[csrow >> 1]; in get_cs_base_and_mask()
420 csbase = pvt->csels[dct].csbases[csrow]; in get_cs_base_and_mask()
421 csmask = pvt->csels[dct].csmasks[csrow >> 1]; in get_cs_base_and_mask()
441 #define for_each_chip_select(i, dct, pvt) \ argument
442 for (i = 0; i < pvt->csels[dct].b_cnt; i++)
444 #define chip_select_base(i, dct, pvt) \ argument
445 pvt->csels[dct].csbases[i]
447 #define for_each_chip_select_mask(i, dct, pvt) \ argument
448 for (i = 0; i < pvt->csels[dct].m_cnt; i++)
760 * It's assumed all LRDIMMs in a DCT are going to be of in debug_dump_dramcfg_low()
775 edac_dbg(1, " DCT 128bit mode width: %s\n", in debug_dump_dramcfg_low()
1103 * 'Rank' value on a DCT. But this is not the common case. So, in determine_memory_type()
1134 /* Get the number of DCT channels the memory controller is using. */
1356 static int k8_dbam_to_chip_select(struct amd64_pvt *pvt, u8 dct, in k8_dbam_to_chip_select() argument
1359 u32 dclr = dct ? pvt->dclr1 : pvt->dclr0; in k8_dbam_to_chip_select()
1404 * Get the number of DCT channels in use.
1523 static int f10_dbam_to_chip_select(struct amd64_pvt *pvt, u8 dct, in f10_dbam_to_chip_select() argument
1526 u32 dclr = dct ? pvt->dclr1 : pvt->dclr0; in f10_dbam_to_chip_select()
1537 * F15h supports only 64bit DCT interfaces
1539 static int f15_dbam_to_chip_select(struct amd64_pvt *pvt, u8 dct, in f15_dbam_to_chip_select() argument
1548 static int f15_m60h_dbam_to_chip_select(struct amd64_pvt *pvt, u8 dct, in f15_m60h_dbam_to_chip_select() argument
1552 u32 dcsm = pvt->csels[dct].csmasks[cs_mask_nr]; in f15_m60h_dbam_to_chip_select()
1581 static int f16_dbam_to_chip_select(struct amd64_pvt *pvt, u8 dct, in f16_dbam_to_chip_select() argument
1668 edac_dbg(0, " Address range split per DCT: %s\n", in read_dram_ctl_register()
1685 * Determine channel (DCT) based on the interleaving mode (see F15h M30h BKDG,
1716 * Determine channel (DCT) based on the interleaving mode: F10h BKDG, 2.8.9 Memory
1736 /* return DCT select function: 0=DCT0, 1=DCT1 */ in f1x_determine_channel()
1762 /* Convert the sys_addr to the normalized DCT address */
1777 * DRAM address space on this DCT is hoisted above 4Gb && in f1x_get_norm_dct_addr()
1799 * remove dram base to normalize to DCT address in f1x_get_norm_dct_addr()
1814 static int f10_process_possible_spare(struct amd64_pvt *pvt, u8 dct, int csrow) in f10_process_possible_spare() argument
1818 if (online_spare_swap_done(pvt, dct) && in f10_process_possible_spare()
1819 csrow == online_spare_bad_dramcs(pvt, dct)) { in f10_process_possible_spare()
1821 for_each_chip_select(tmp_cs, dct, pvt) { in f10_process_possible_spare()
1822 if (chip_select_base(tmp_cs, dct, pvt) & 0x2) { in f10_process_possible_spare()
1832 * Iterate over the DRAM DCT "base" and "mask" registers looking for a
1839 static int f1x_lookup_addr_in_dct(u64 in_addr, u8 nid, u8 dct) in f1x_lookup_addr_in_dct() argument
1853 edac_dbg(1, "input addr: 0x%llx, DCT: %d\n", in_addr, dct); in f1x_lookup_addr_in_dct()
1855 for_each_chip_select(csrow, dct, pvt) { in f1x_lookup_addr_in_dct()
1856 if (!csrow_enabled(csrow, dct, pvt)) in f1x_lookup_addr_in_dct()
1859 get_cs_base_and_mask(pvt, csrow, dct, &cs_base, &cs_mask); in f1x_lookup_addr_in_dct()
1874 cs_found = f10_process_possible_spare(pvt, dct, csrow); in f1x_lookup_addr_in_dct()
1988 edac_dbg(1, " Normalized DCT addr: 0x%llx\n", chan_addr); in f1x_match_to_this_node()
2034 /* Verify sys_addr is within DCT Range. */ in f15_m30h_match_to_this_node()
2043 /* Verify number of dct's that participate in channel interleaving. */ in f15_m30h_match_to_this_node()
2061 /* Get normalized DCT addr */ in f15_m30h_match_to_this_node()
2100 edac_dbg(1, " Normalized DCT addr: 0x%llx\n", chan_addr); in f15_m30h_match_to_this_node()
2105 * there is support for 4 DCT's, but only 2 are currently functional. in f15_m30h_match_to_this_node()
2149 * a @sys_addr to NodeID, DCT (channel) and chip select (CSROW).
2207 edac_printk(KERN_DEBUG, EDAC_MC, "DCT%d chip selects:\n", ctrl); in debug_display_dimm_sizes()
2687 * F1 (AddrMap) and F2 (Dct) devices. Return negative value on error.
2726 /* Reserve the DCT Device */ in reserve_mc_sibling_devs()
2928 static u32 get_csrow_nr_pages(struct amd64_pvt *pvt, u8 dct, int csrow_nr_orig) in get_csrow_nr_pages() argument
2930 u32 dbam = dct ? pvt->dbam1 : pvt->dbam0; in get_csrow_nr_pages()
2938 cs_mode = f17_get_cs_mode(csrow_nr >> 1, dct, pvt); in get_csrow_nr_pages()
2941 nr_pages = pvt->ops->dbam_to_cs(pvt, dct, cs_mode, csrow_nr); in get_csrow_nr_pages()
2945 csrow_nr_orig, dct, cs_mode); in get_csrow_nr_pages()
3044 /* K8 has only one DCT */ in init_csrows()
3072 /* get all cores on this DCT */
3542 int cs = 0, dct = 0; in instance_has_memory() local
3544 for (dct = 0; dct < fam_type->max_mcs; dct++) { in instance_has_memory()
3545 for_each_chip_select(cs, dct, pvt) in instance_has_memory()
3546 cs_enabled |= csrow_enabled(cs, dct, pvt); in instance_has_memory()