summaryrefslogtreecommitdiff
path: root/usr/src/uts/sun4u/os
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/sun4u/os')
-rw-r--r--usr/src/uts/sun4u/os/ecc.c10
-rw-r--r--usr/src/uts/sun4u/os/mach_cpu_states.c26
2 files changed, 10 insertions, 26 deletions
diff --git a/usr/src/uts/sun4u/os/ecc.c b/usr/src/uts/sun4u/os/ecc.c
index 10b6cb523f..bd933377e4 100644
--- a/usr/src/uts/sun4u/os/ecc.c
+++ b/usr/src/uts/sun4u/os/ecc.c
@@ -247,23 +247,21 @@ error_init(void)
}
/*
- * Success flags for ecc_page_zero
+ * Flags for ecc_page_zero DTrace probe since ecc_page_zero() is called
+ * as a softint handler.
*/
#define PAGE_ZERO_SUCCESS 0
#define PAGE_ZERO_FAIL_NOLOCK 1
#define PAGE_ZERO_FAIL_ONTRAP 2
-/*
- * arg is a physical address - zero out the page that contains it
- */
void
ecc_page_zero(void *arg)
{
uint64_t pa = (uint64_t)arg;
- page_t *pp = page_numtopp_nolock((pfn_t)(pa >> MMU_PAGESHIFT));
int ret, success_flag;
+ page_t *pp = page_numtopp_nolock(mmu_btop(pa));
- if (pp == NULL || !page_isretired(pp))
+ if (page_retire_check(pa, NULL) != 0)
return;
/*
diff --git a/usr/src/uts/sun4u/os/mach_cpu_states.c b/usr/src/uts/sun4u/os/mach_cpu_states.c
index 0815f54170..4144c91c79 100644
--- a/usr/src/uts/sun4u/os/mach_cpu_states.c
+++ b/usr/src/uts/sun4u/os/mach_cpu_states.c
@@ -66,7 +66,6 @@ extern int disable_watchdog_on_exit;
void
mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb)
{
- page_t *first, *pp;
extern void pm_cfb_check_and_powerup(void);
/*
@@ -79,25 +78,6 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb)
}
/*
- * Clear any unresolved UEs from memory. We rely on the fact that on
- * sun4u, pagezero() will always clear UEs. Since we're rebooting, we
- * just force p_selock to appear locked so pagezero()'s assert works.
- *
- * Pages that were retired successfully due to multiple CEs will
- * also be cleared.
- */
- if (memsegs != NULL) {
- pp = first = page_first();
- do {
- if (page_isretired(pp) || page_istoxic(pp)) {
- /* pagezero asserts PAGE_LOCKED */
- pp->p_selock = -1;
- pagezero(pp, 0, PAGESIZE);
- }
- } while ((pp = page_next(pp)) != first);
- }
-
- /*
* XXX - rconsvp is set to NULL to ensure that output messages
* are sent to the underlying "hardware" device using the
* monitor's printf routine since we are in the process of
@@ -123,6 +103,12 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb)
(void) callb_execute_class(CB_CL_MDBOOT, NULL);
/*
+ * Clear any unresolved UEs from memory.
+ */
+ if (memsegs != NULL)
+ page_retire_hunt(page_retire_mdboot_cb);
+
+ /*
* stop other cpus which also raise our priority. since there is only
* one active cpu after this, and our priority will be too high
* for us to be preempted, we're essentially single threaded