summaryrefslogtreecommitdiff
path: root/usr/src/uts/sun4v/os/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/sun4v/os/error.c')
-rw-r--r--usr/src/uts/sun4v/os/error.c50
1 files changed, 11 insertions, 39 deletions
diff --git a/usr/src/uts/sun4v/os/error.c b/usr/src/uts/sun4v/os/error.c
index 05d014d0aa..8fc0aa6cf1 100644
--- a/usr/src/uts/sun4v/os/error.c
+++ b/usr/src/uts/sun4v/os/error.c
@@ -38,8 +38,6 @@
#include <sys/error.h>
#include <sys/fm/util.h>
#include <sys/ivintr.h>
-#include <sys/machasi.h>
-#include <sys/mmu.h>
#include <sys/archsystm.h>
#define MAX_CE_FLTS 10
@@ -212,7 +210,6 @@ process_nonresumable_error(struct regs *rp, uint64_t flags,
int expected = DDI_FM_ERR_UNEXPECTED;
uint64_t exec_mode;
uint8_t u_spill_fill;
- int u_kill = 1;
mcpup = &(CPU->cpu_m);
@@ -278,33 +275,8 @@ process_nonresumable_error(struct regs *rp, uint64_t flags,
break;
}
/*
- * Context Register Parity - for reload of secondary
- * context register, see nonresumable_error.
- */
- if ((errh_flt.errh_er.attr & ERRH_ATTR_ASI) &&
- (errh_flt.errh_er.asi == ASI_MMU_CTX)) {
-
- if (aflt->flt_tl) /* TL>0, so panic */
- break;
-
- /* Panic on unknown context registers */
- if (errh_flt.errh_er.addr < MMU_PCONTEXT0 ||
- errh_flt.errh_er.addr + errh_flt.errh_er.sz
- > MMU_SCONTEXT1 + sizeof (uint64_t)) {
- cmn_err(CE_WARN, "Parity error on "
- "unknown context register\n");
- aflt->flt_panic = 1;
- break;
- }
-
- u_kill = 0; /* do not terminate */
- break;
- }
- /*
- * All other PR_NRE fall through in order to
- * check for protection. The list can include
- * ERRH_ATTR_FRF, ERRH_ATTR_IRF, ERRH_ATTR_MEM,
- * and ERRH_ATTR_PIO.
+ * Fall through, precise fault also need to check
+ * to see if it was protected.
*/
/*FALLTHRU*/
@@ -344,7 +316,7 @@ process_nonresumable_error(struct regs *rp, uint64_t flags,
* for fatal errors.
*/
if (aflt->flt_class == BUS_FAULT) {
- aflt->flt_addr = errh_flt.errh_er.addr;
+ aflt->flt_addr = errh_flt.errh_er.ra;
errh_cpu_run_bus_error_handlers(aflt,
expected);
}
@@ -393,13 +365,13 @@ process_nonresumable_error(struct regs *rp, uint64_t flags,
errh_page_retire(&errh_flt, PR_UE);
/*
- * If we queued an error for a thread that should terminate
- * and it was in user mode or protected by t_lofault, set AST
- * flag so the queue will be drained before returning to user
- * mode. Note that user threads can be killed via pcb_flags.
+ * If we queued an error and the it was in user mode, or
+ * protected by t_lofault, or user_spill_fill is set, we
+ * set AST flag so the queue will be drained before
+ * returning to user mode.
*/
- if (u_kill && (!aflt->flt_priv ||
- aflt->flt_prot == AFLT_PROT_COPY || u_spill_fill)) {
+ if (!aflt->flt_priv || aflt->flt_prot == AFLT_PROT_COPY ||
+ u_spill_fill) {
int pcb_flag = 0;
if (aflt->flt_class == CPU_FAULT)
@@ -550,7 +522,7 @@ cpu_async_log_err(void *flt)
* If we are going to panic, scrub the page first
*/
if (errh_fltp->cmn_asyncflt.flt_panic)
- mem_scrub(errh_fltp->errh_er.addr,
+ mem_scrub(errh_fltp->errh_er.ra,
errh_fltp->errh_er.sz);
}
break;
@@ -606,7 +578,7 @@ cpu_ue_log_err(struct async_flt *aflt)
static void
errh_page_retire(errh_async_flt_t *errh_fltp, uchar_t flag)
{
- uint64_t flt_real_addr_start = errh_fltp->errh_er.addr;
+ uint64_t flt_real_addr_start = errh_fltp->errh_er.ra;
uint64_t flt_real_addr_end = flt_real_addr_start +
errh_fltp->errh_er.sz - 1;
int64_t current_addr;