Use the right symbols for determining arm architecture. Include the

necessary header file which has the new FAULT_WNR symbol defined in it.
This commit is contained in:
ian 2014-02-12 19:59:30 +00:00
parent d231df0ee2
commit 64c07b454d
2 changed files with 5 additions and 2 deletions

View File

@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_map.h>
#include <vm/vm_extern.h>
#include <machine/armreg.h>
#include <machine/cpuconf.h>
#include <machine/vmparam.h>
#include <machine/frame.h>
@ -393,7 +394,7 @@ data_abort_handler(struct trapframe *tf)
* location, so we can deal with those quickly. Otherwise we need to
* disassemble the faulting instruction to determine if it was a write.
*/
#ifdef _ARM_ARCH_6
#if ARM_ARCH_6 || ARM_ARCH_7A
ftype = (fsr & FAULT_WNR) ? VM_PROT_READ | VM_PROT_WRITE : VM_PROT_READ;
#else
if (IS_PERMISSION_FAULT(fsr))
@ -411,8 +412,8 @@ data_abort_handler(struct trapframe *tf)
else
ftype = VM_PROT_READ;
}
#endif
}
#endif
/*
* See if the fault is as a result of ref/mod emulation,

View File

@ -404,6 +404,8 @@
#define FAULT_PERM_P 0x0f /* Permission -- Page */
#define FAULT_IMPRECISE 0x400 /* Imprecise exception (XSCALE) */
#define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */
#define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */
/*
* Address of the vector page, low and high versions.