From 59377078fca7bc471d831a664d3455936cf44d75 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Tue, 17 Aug 1999 16:09:22 +0000 Subject: mem_access_fault4m: init ftype earlier to avoid passing junk to trapsignal --- sys/arch/sparc/sparc/trap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c index 1ea9edb154f..66db2e86a76 100644 --- a/sys/arch/sparc/sparc/trap.c +++ b/sys/arch/sparc/sparc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.18 1999/07/09 21:30:03 art Exp $ */ +/* $OpenBSD: trap.c,v 1.19 1999/08/17 16:09:21 art Exp $ */ /* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */ /* @@ -890,6 +890,8 @@ mem_access_fault4m(type, sfsr, sfva, afsr, afva, tf) if ((sfsr & SFSR_FT) == SFSR_FT_NONE) goto out; /* No fault. Why were we called? */ + ftype = sfsr & SFSR_AT_STORE ? VM_PROT_WRITE : VM_PROT_READ; + /* * NOTE: the per-CPU fault status register readers (in locore) * may already have decided to pass `pc' in `sfva', so we avoid @@ -943,7 +945,6 @@ mem_access_fault4m(type, sfsr, sfva, afsr, afva, tf) /* Now munch on protections... */ - ftype = sfsr & SFSR_AT_STORE ? VM_PROT_WRITE : VM_PROT_READ; if (psr & PSR_PS) { extern char Lfsbail[]; if (sfsr & SFSR_AT_TEXT || type == T_TEXTFAULT) { -- cgit v1.2.3