4307 *
4308 * If the error count is excessive for a DIMM, this function will return
4309 * PR_MCE, and the CPU module may then decide to remove that page from use.
4310 */
4311 static int
4312 ce_count_unum(int status, int len, char *unum)
4313 {
4314 int i;
4315 struct ce_info *psimm = mem_ce_simm;
4316 int page_status = PR_OK;
4317
4318 ASSERT(psimm != NULL);
4319
4320 if (len <= 0 ||
4321 (status & (ECC_STICKY | ECC_PERSISTENT | ECC_INTERMITTENT)) == 0)
4322 return (page_status);
4323
4324 /*
4325 * Initialize the leaky_bucket timeout
4326 */
4327 if (casptr(&leaky_bucket_timeout_id,
4328 TIMEOUT_NONE, TIMEOUT_SET) == TIMEOUT_NONE)
4329 add_leaky_bucket_timeout();
4330
4331 for (i = 0; i < mem_ce_simm_size; i++) {
4332 if (psimm[i].name[0] == '\0') {
4333 /*
4334 * Hit the end of the valid entries, add
4335 * a new one.
4336 */
4337 (void) strncpy(psimm[i].name, unum, len);
4338 if (status & ECC_STICKY) {
4339 /*
4340 * Sticky - the leaky bucket is used to track
4341 * soft errors. Since a sticky error is a
4342 * hard error and likely to be retired soon,
4343 * we do not count it in the leaky bucket.
4344 */
4345 psimm[i].leaky_bucket_cnt = 0;
4346 psimm[i].intermittent_total = 0;
4347 psimm[i].persistent_total = 0;
|
4307 *
4308 * If the error count is excessive for a DIMM, this function will return
4309 * PR_MCE, and the CPU module may then decide to remove that page from use.
4310 */
4311 static int
4312 ce_count_unum(int status, int len, char *unum)
4313 {
4314 int i;
4315 struct ce_info *psimm = mem_ce_simm;
4316 int page_status = PR_OK;
4317
4318 ASSERT(psimm != NULL);
4319
4320 if (len <= 0 ||
4321 (status & (ECC_STICKY | ECC_PERSISTENT | ECC_INTERMITTENT)) == 0)
4322 return (page_status);
4323
4324 /*
4325 * Initialize the leaky_bucket timeout
4326 */
4327 if (atomic_cas_ptr(&leaky_bucket_timeout_id,
4328 TIMEOUT_NONE, TIMEOUT_SET) == TIMEOUT_NONE)
4329 add_leaky_bucket_timeout();
4330
4331 for (i = 0; i < mem_ce_simm_size; i++) {
4332 if (psimm[i].name[0] == '\0') {
4333 /*
4334 * Hit the end of the valid entries, add
4335 * a new one.
4336 */
4337 (void) strncpy(psimm[i].name, unum, len);
4338 if (status & ECC_STICKY) {
4339 /*
4340 * Sticky - the leaky bucket is used to track
4341 * soft errors. Since a sticky error is a
4342 * hard error and likely to be retired soon,
4343 * we do not count it in the leaky bucket.
4344 */
4345 psimm[i].leaky_bucket_cnt = 0;
4346 psimm[i].intermittent_total = 0;
4347 psimm[i].persistent_total = 0;
|