Lines Matching defs:cs

139 	    "[0x%llx, 0x%llx] of MC %d; normalized address for cs compare "
153 cs_match(struct mcamd_hdl *hdl, uint64_t iaddr, mcamd_node_t *cs)
159 cs, MCAMD_PROP_NUM, &csnum,
160 cs, MCAMD_PROP_BASE_ADDR, &csbase,
161 cs, MCAMD_PROP_MASK, &csmask,
162 cs, MCAMD_PROP_CSBE, &csbe,
188 cs_sparedto(struct mcamd_hdl *hdl, mcamd_node_t *cs, mcamd_node_t *mc)
193 cs, MCAMD_PROP_NUM, &csnum,
206 for (cs = mcamd_cs_next(hdl, mc, NULL); cs != NULL;
207 cs = mcamd_cs_next(hdl, mc, cs)) {
208 if (!mcamd_get_numprop(hdl, cs, MCAMD_PROP_NUM, &tmpcsnum)) {
217 if (cs != NULL) {
218 mcamd_dprintf(hdl, MCAMD_DBG_FLOW, "cs_sparedto: cs#%d is "
219 "redirected to active online spare of cs#%d\n", csnum,
222 mcamd_dprintf(hdl, MCAMD_DBG_ERR, "cs_sparedto: cs#%d is "
223 "redirected but cannot find spare cs# - cannout reroute to "
224 "cs#%d\n", csnum, sparecsnum);
227 return (cs);
237 unum_fill(struct mcamd_hdl *hdl, mcamd_node_t *cs, int which,
245 if ((mc = mcamd_cs_mc(hdl, cs)) == NULL ||
248 cs, MCAMD_PROP_NUM, &csnum,
249 cs, MCAMD_PROP_DIMMRANK, &ranknum,
257 !mcamd_get_numprop(hdl, cs, MCAMD_PROP_CSDIMM1, &dimm1) ||
259 !mcamd_get_numprop(hdl, cs, MCAMD_PROP_CSDIMM2, &dimm2)) {
324 (void) mc_pa_to_offset(hdl, mc, cs, iaddr, &unump->unum_offset);
347 mc_whichdimm(struct mcamd_hdl *hdl, mcamd_node_t *cs, uint64_t pa,
362 cs, MCAMD_PROP_CSDIMM1, &dimm1,
363 cs, MCAMD_PROP_CSDIMM2, &dimm2,
439 * Brute-force BKDG pa to cs translation, coded to look as much like the
449 mcamd_node_t *cs;
535 for (cs = mcamd_cs_next(hdl, mc, NULL); cs != NULL;
536 cs = mcamd_cs_next(hdl, mc, cs)) {
540 cs, MCAMD_REG_CSBASE, &CSBase,
541 cs, MCAMD_REG_CSMASK, &CSMask,
544 cs, MCAMD_PROP_NUM, &csnum,
545 cs, MCAMD_PROP_CSBE, &CSEn,
548 "failed to read cs registers\n");
558 * CSEn = We only keep enabled cs.
577 if ((sparecs = cs_sparedto(hdl, cs, mc)) != NULL)
578 cs = sparecs;
580 if ((which = mc_whichdimm(hdl, cs, pa, valid_lo,
590 if (unum_fill(hdl, cs, which, InputAddr, unump, 0) < 0)
598 "for MC %d but no cs responds\n", (int)mcnum);
615 mcamd_node_t *cs, *sparecs;
635 for (cs = mcamd_cs_next(hdl, mc, NULL); cs != NULL;
636 cs = mcamd_cs_next(hdl, mc, cs)) {
637 if (cs_match(hdl, iaddr, cs))
641 if (cs == NULL)
651 if ((sparecs = cs_sparedto(hdl, cs, mc)) != NULL) {
652 cs = sparecs;
655 if ((which = mc_whichdimm(hdl, cs, pa, valid_lo, synd,
659 if (unum_fill(hdl, cs, which, iaddr, unump, 1) < 0)
676 "BKDG: node %d mc %d cs %d dimm(s) %d/%d\n"
677 "Ours: node 5d mc %d cs %d dimm(s) %d/%d\n",
685 mcamd_dprintf(hdl, MCAMD_DBG_FLOW, "Result: chip %d mc %d cs %d "