Make that OEA based kernels can properly deal with kernel ISI faults. Now

that LKMs are supported, it is possible for a LKM page to be "outspilled"
resulting in a possible ISI fault.  Try to spill the page back in.
This commit is contained in:
matt 2003-08-04 22:26:59 +00:00
parent f6629b85f8
commit 0e50e47bb9
3 changed files with 19 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.32 2003/08/02 19:35:26 matt Exp $ */
/* $NetBSD: cpu.h,v 1.33 2003/08/04 22:26:59 matt Exp $ */
/*
* Copyright (C) 1999 Wolfgang Solfrank.
@ -104,6 +104,7 @@ struct cpu_info {
struct evcnt ci_ev_kdsi; /* kernel DSI traps */
struct evcnt ci_ev_udsi; /* user DSI traps */
struct evcnt ci_ev_udsi_fatal; /* user DSI trap failures */
struct evcnt ci_ev_kisi; /* kernel ISI traps */
struct evcnt ci_ev_isi; /* user ISI traps */
struct evcnt ci_ev_isi_fatal; /* user ISI trap failures */
struct evcnt ci_ev_pgm; /* user PGM traps */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu_subr.c,v 1.9 2003/07/15 02:54:45 lukem Exp $ */
/* $NetBSD: cpu_subr.c,v 1.10 2003/08/04 22:26:59 matt Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.9 2003/07/15 02:54:45 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.10 2003/08/04 22:26:59 matt Exp $");
#include "opt_ppcparam.h"
#include "opt_multiprocessor.h"
@ -455,6 +455,8 @@ cpu_setup(self, ci)
&ci->ci_ev_traps, self->dv_xname, "user DSI traps");
evcnt_attach_dynamic(&ci->ci_ev_udsi_fatal, EVCNT_TYPE_TRAP,
&ci->ci_ev_udsi, self->dv_xname, "user DSI failures");
evcnt_attach_dynamic(&ci->ci_ev_kisi, EVCNT_TYPE_TRAP,
&ci->ci_ev_traps, self->dv_xname, "kernel ISI traps");
evcnt_attach_dynamic(&ci->ci_ev_isi, EVCNT_TYPE_TRAP,
&ci->ci_ev_traps, self->dv_xname, "user ISI traps");
evcnt_attach_dynamic(&ci->ci_ev_isi_fatal, EVCNT_TYPE_TRAP,

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.81 2003/07/15 02:54:49 lukem Exp $ */
/* $NetBSD: trap.c,v 1.82 2003/08/04 22:27:00 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.81 2003/07/15 02:54:49 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.82 2003/08/04 22:27:00 matt Exp $");
#include "opt_altivec.h"
#include "opt_ddb.h"
@ -241,6 +241,17 @@ trap(struct trapframe *frame)
break;
case EXC_ISI:
ci->ci_ev_kisi.ev_count++;
/*
* Try to spill an evicted pte into the page table
* if the pmap has some evicted pte's. Now that LKMs
* are supported, this is a real possibility.
*/
if (pmap_kernel()->pm_evictions > 0 &&
pmap_pte_spill(pmap_kernel(), trunc_page(frame->srr0))) {
break;
}
printf("trap: kernel ISI by %#lx (SRR1 %#lx)\n",
frame->srr0, frame->srr1);
goto brain_damage2;