svn commit: r290541 - in head/sys/arm: arm include

Svatopluk Kraus skra at FreeBSD.org
Sun Nov 8 08:31:36 UTC 2015


Author: skra
Date: Sun Nov  8 08:31:34 2015
New Revision: 290541
URL: https://svnweb.freebsd.org/changeset/base/290541

Log:
  Make usermode variable the bool type. It's already used that way.
  
  Suggested by:	kib
  Approved by:	kib (mentor)

Modified:
  head/sys/arm/arm/pmap-v6-new.c
  head/sys/arm/arm/trap-v6.c
  head/sys/arm/include/pmap-v6.h

Modified: head/sys/arm/arm/pmap-v6-new.c
==============================================================================
--- head/sys/arm/arm/pmap-v6-new.c	Sun Nov  8 08:27:51 2015	(r290540)
+++ head/sys/arm/arm/pmap-v6-new.c	Sun Nov  8 08:31:34 2015	(r290541)
@@ -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;

Modified: head/sys/arm/arm/trap-v6.c
==============================================================================
--- head/sys/arm/arm/trap-v6.c	Sun Nov  8 08:27:51 2015	(r290540)
+++ head/sys/arm/arm/trap-v6.c	Sun Nov  8 08:31:34 2015	(r290541)
@@ -211,7 +211,7 @@ call_trapsignal(struct thread *td, int s
  *	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 @@ out:
  *
  */
 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 
 {
 	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 
 	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) {

Modified: head/sys/arm/include/pmap-v6.h
==============================================================================
--- head/sys/arm/include/pmap-v6.h	Sun Nov  8 08:27:51 2015	(r290540)
+++ head/sys/arm/include/pmap-v6.h	Sun Nov  8 08:31:34 2015	(r290541)
@@ -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);


More information about the svn-src-head mailing list