5625 } cache_scrub_info[] = {
5626 { &ecache_scrub_enable, 0, CACHE_SCRUBBER_INFO_E, 0, 0, 0, "E$"},
5627 { &dcache_scrub_enable, 0, CACHE_SCRUBBER_INFO_D, 0, 0, 0, "D$"},
5628 { &icache_scrub_enable, 0, CACHE_SCRUBBER_INFO_I, 0, 0, 0, "I$"}
5629 };
5630
5631 /*
5632 * If scrubbing is enabled, increment the outstanding request counter. If it
5633 * is 1 (meaning there were no previous requests outstanding), call
5634 * setsoftint_tl1 through xt_one_unchecked, which eventually ends up doing
5635 * a self trap.
5636 */
5637 static void
5638 do_scrub(struct scrub_info *csi)
5639 {
5640 ch_scrub_misc_t *csmp = CPU_PRIVATE_PTR(CPU, chpr_scrub_misc);
5641 int index = csi->csi_index;
5642 uint32_t *outstanding = &csmp->chsm_outstanding[index];
5643
5644 if (*(csi->csi_enable) && (csmp->chsm_enable[index])) {
5645 if (atomic_add_32_nv(outstanding, 1) == 1) {
5646 xt_one_unchecked(CPU->cpu_id, setsoftint_tl1,
5647 csi->csi_inum, 0);
5648 }
5649 }
5650 }
5651
5652 /*
5653 * Omni cyclics don't fire on offline cpus, so we use another cyclic to
5654 * cross-trap the offline cpus.
5655 */
5656 static void
5657 do_scrub_offline(struct scrub_info *csi)
5658 {
5659 ch_scrub_misc_t *csmp = CPU_PRIVATE_PTR(CPU, chpr_scrub_misc);
5660
5661 if (CPUSET_ISNULL(cpu_offline_set)) {
5662 /*
5663 * No offline cpus - nothing to do
5664 */
5665 return;
|
5625 } cache_scrub_info[] = {
5626 { &ecache_scrub_enable, 0, CACHE_SCRUBBER_INFO_E, 0, 0, 0, "E$"},
5627 { &dcache_scrub_enable, 0, CACHE_SCRUBBER_INFO_D, 0, 0, 0, "D$"},
5628 { &icache_scrub_enable, 0, CACHE_SCRUBBER_INFO_I, 0, 0, 0, "I$"}
5629 };
5630
5631 /*
5632 * If scrubbing is enabled, increment the outstanding request counter. If it
5633 * is 1 (meaning there were no previous requests outstanding), call
5634 * setsoftint_tl1 through xt_one_unchecked, which eventually ends up doing
5635 * a self trap.
5636 */
5637 static void
5638 do_scrub(struct scrub_info *csi)
5639 {
5640 ch_scrub_misc_t *csmp = CPU_PRIVATE_PTR(CPU, chpr_scrub_misc);
5641 int index = csi->csi_index;
5642 uint32_t *outstanding = &csmp->chsm_outstanding[index];
5643
5644 if (*(csi->csi_enable) && (csmp->chsm_enable[index])) {
5645 if (atomic_inc_32_nv(outstanding) == 1) {
5646 xt_one_unchecked(CPU->cpu_id, setsoftint_tl1,
5647 csi->csi_inum, 0);
5648 }
5649 }
5650 }
5651
5652 /*
5653 * Omni cyclics don't fire on offline cpus, so we use another cyclic to
5654 * cross-trap the offline cpus.
5655 */
5656 static void
5657 do_scrub_offline(struct scrub_info *csi)
5658 {
5659 ch_scrub_misc_t *csmp = CPU_PRIVATE_PTR(CPU, chpr_scrub_misc);
5660
5661 if (CPUSET_ISNULL(cpu_offline_set)) {
5662 /*
5663 * No offline cpus - nothing to do
5664 */
5665 return;
|