aboutsummaryrefslogtreecommitdiff
path: root/sys
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
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')
-rw-r--r--sys/arm/arm/fiq.c5
-rw-r--r--sys/arm/arm/pmap-v6.c5
-rw-r--r--sys/arm/include/pmap-v6.h5
3 files changed, 3 insertions, 12 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);
diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c
index c41bd4117c5b..05e0137aa596 100644
--- a/sys/arm/arm/pmap-v6.c
+++ b/sys/arm/arm/pmap-v6.c
@@ -6314,11 +6314,6 @@ pte1_setrw:
return (KERN_FAILURE);
}
-/* !!!! REMOVE !!!! */
-void vector_page_setprot(int p)
-{
-}
-
#if defined(PMAP_DEBUG)
/*
* Reusing of KVA used in pmap_zero_page function !!!
diff --git a/sys/arm/include/pmap-v6.h b/sys/arm/include/pmap-v6.h
index d636331e128f..bb38356a1921 100644
--- a/sys/arm/include/pmap-v6.h
+++ b/sys/arm/include/pmap-v6.h
@@ -243,11 +243,6 @@ void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t,
*/
#define PMAP_DOMAIN_KERNEL 0 /* The kernel uses domain #0 */
-/*
- * sys/arm/arm/cpufunc.c
- */
-void vector_page_setprot(int);
-
#endif /* _KERNEL */
// -----------------------------------------------------------------------------