From 742405538975cf72bc0cb15008f43b8c1dd1764a Mon Sep 17 00:00:00 2001 From: skra Date: Sun, 8 Nov 2015 08:31:34 +0000 Subject: [PATCH] Make usermode variable the bool type. It's already used that way. Suggested by: kib Approved by: kib (mentor) --- sys/arm/arm/pmap-v6-new.c | 2 +- sys/arm/arm/trap-v6.c | 12 ++++++------ sys/arm/include/pmap-v6.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/arm/arm/pmap-v6-new.c b/sys/arm/arm/pmap-v6-new.c index 97ee56692289..729603cf8ca2 100644 --- a/sys/arm/arm/pmap-v6-new.c +++ b/sys/arm/arm/pmap-v6-new.c @@ -6133,7 +6133,7 @@ CTASSERT(powerof2(PT2MAP_SIZE)); * Handle access and R/W emulation faults. */ int -pmap_fault(pmap_t pmap, vm_offset_t far, uint32_t fsr, int idx, int usermode) +pmap_fault(pmap_t pmap, vm_offset_t far, uint32_t fsr, int idx, bool usermode) { pt1_entry_t *pte1p, pte1; pt2_entry_t *pte2p, pte2; diff --git a/sys/arm/arm/trap-v6.c b/sys/arm/arm/trap-v6.c index 6dd38eb2e477..60ecd4d97eea 100644 --- a/sys/arm/arm/trap-v6.c +++ b/sys/arm/arm/trap-v6.c @@ -211,7 +211,7 @@ call_trapsignal(struct thread *td, int sig, int code, vm_offset_t addr) * FAULT_IS_NOT_MINE value, then the abort is fatal. */ static __inline void -abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode) +abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode) { /* @@ -243,7 +243,7 @@ abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode) * */ static __inline void -abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode, +abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode, u_int far) { @@ -277,7 +277,7 @@ abort_handler(struct trapframe *tf, int prefetch) { struct thread *td; vm_offset_t far, va; - int idx, usermode; + int idx, rv; uint32_t fsr; struct ksig ksig; struct proc *p; @@ -285,7 +285,7 @@ abort_handler(struct trapframe *tf, int prefetch) struct vm_map *map; struct vmspace *vm; vm_prot_t ftype; - int rv; + bool usermode; #ifdef INVARIANTS void *onfault; #endif @@ -556,7 +556,7 @@ static int abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, struct thread *td, struct ksig *ksig) { - u_int usermode; + bool usermode; const char *mode; const char *rw_mode; @@ -617,7 +617,7 @@ static int abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, struct thread *td, struct ksig *ksig) { - u_int usermode; + bool usermode; usermode = TRAPF_USERMODE(tf); if (!usermode) { diff --git a/sys/arm/include/pmap-v6.h b/sys/arm/include/pmap-v6.h index ef6758d98fa8..d2ea3bbdc5a4 100644 --- a/sys/arm/include/pmap-v6.h +++ b/sys/arm/include/pmap-v6.h @@ -201,7 +201,7 @@ void pmap_tlb_flush_ng(pmap_t ); void pmap_dcache_wb_range(vm_paddr_t , vm_size_t , vm_memattr_t ); vm_paddr_t pmap_kextract(vm_offset_t ); -int pmap_fault(pmap_t , vm_offset_t , uint32_t , int , int ); +int pmap_fault(pmap_t , vm_offset_t , uint32_t , int , bool); #define vtophys(va) pmap_kextract((vm_offset_t)(va)) void pmap_set_tex(void);