aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/arm/fiq.c
diff options
context:
space:
mode:
authorSvatopluk Kraus <skra@FreeBSD.org>2016-02-17 13:29:17 +0000
committerSvatopluk Kraus <skra@FreeBSD.org>2016-02-17 13:29:17 +0000
commitbcbc0ff17d9c21cecd9c36f269553fd9a1379843 (patch)
tree5c02b89be7095547141e87831c162ceea58e0d33 /sys/arm/arm/fiq.c
parent195ea683fb6a5781cdd219cddf6d7c68773b43d1 (diff)
downloadsrc-bcbc0ff17d9c21cecd9c36f269553fd9a1379843.tar.gz
src-bcbc0ff17d9c21cecd9c36f269553fd9a1379843.zip
Remove unneeded vector_page_setprot() for __ARM_ARCH >= 6. A vector
page is always mapped in KVA space and so it's always writeable.
Notes
Notes: svn path=/head/; revision=295696
Diffstat (limited to 'sys/arm/arm/fiq.c')
-rw-r--r--sys/arm/arm/fiq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arm/arm/fiq.c b/sys/arm/arm/fiq.c
index f475a303d3c4..f5ddcc6c8f17 100644
--- a/sys/arm/arm/fiq.c
+++ b/sys/arm/arm/fiq.c
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
+#include <machine/acle-compat.h>
#include <machine/armreg.h>
#include <machine/cpufunc.h>
#include <machine/fiq.h>
@@ -73,13 +74,13 @@ fiq_installhandler(void *func, size_t size)
{
const uint32_t fiqvector = 7 * sizeof(uint32_t);
-#if !defined(__ARM_FIQ_INDIRECT)
+#if __ARM_ARCH < 6 && !defined(__ARM_FIQ_INDIRECT)
vector_page_setprot(VM_PROT_READ|VM_PROT_WRITE);
#endif
memcpy((void *)(vector_page + fiqvector), func, size);
-#if !defined(__ARM_FIQ_INDIRECT)
+#if __ARM_ARCH < 6 && !defined(__ARM_FIQ_INDIRECT)
vector_page_setprot(VM_PROT_READ);
#endif
icache_sync((vm_offset_t) fiqvector, size);