diff options
-rw-r--r-- | sys/arch/hppa/hppa/machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/mainbus.c | 10 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/pmap.c | 8 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa/include/param.h | 5 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/mainbus.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/pmap.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa64/hppa64/trap.c | 6 | ||||
-rw-r--r-- | sys/arch/hppa64/include/param.h | 5 |
10 files changed, 29 insertions, 35 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index cb076b0edf1..36b7944eab8 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.148 2005/08/06 14:26:52 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.149 2005/10/26 18:35:44 martin Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -396,7 +396,7 @@ hppa_init(start) if (bufpages > nbuf * MAXBSIZE / PAGE_SIZE) bufpages = nbuf * MAXBSIZE / PAGE_SIZE; - v1 = v = hppa_round_page(start); + v1 = v = round_page(start); #define valloc(name, type, num) (name) = (type *)v; v = (vaddr_t)((name)+(num)) valloc(buf, struct buf, nbuf); @@ -408,7 +408,7 @@ hppa_init(start) valloc(msqids, struct msqid_ds, msginfo.msgmni); #endif #undef valloc - v = hppa_round_page(v); + v = round_page(v); bzero ((void *)v1, (v - v1)); /* sets resvphysmem */ diff --git a/sys/arch/hppa/hppa/mainbus.c b/sys/arch/hppa/hppa/mainbus.c index e5466c6b7c1..b81cd980221 100644 --- a/sys/arch/hppa/hppa/mainbus.c +++ b/sys/arch/hppa/hppa/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.62 2005/04/07 00:21:51 mickey Exp $ */ +/* $OpenBSD: mainbus.c,v 1.63 2005/10/26 18:35:44 martin Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -132,8 +132,8 @@ mbus_add_mapping(bus_addr_t bpa, bus_size_t size, int flags, } spa = pa; } else { - spa = hppa_trunc_page(bpa); - epa = hppa_round_page(bpa + size); + spa = trunc_page(bpa); + epa = round_page(bpa + size); if (epa - 1 > ~0U) epa = (u_int64_t)~0U + 1; @@ -186,8 +186,8 @@ mbus_unmap(void *v, bus_space_handle_t bsh, bus_size_t size) { u_long sva, eva; - sva = hppa_trunc_page(bsh); - eva = hppa_round_page(bsh + size); + sva = trunc_page(bsh); + eva = round_page(bsh + size); #ifdef DIAGNOSTIC if (eva <= sva) diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index d67e5b9d508..9475f72a1e9 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.126 2005/04/18 12:19:44 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.127 2005/10/26 18:35:44 martin Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -438,7 +438,7 @@ pmap_bootstrap(vstart) extern int resvphysmem, etext, __rodata_end, __data_start; extern u_int *ie_mem; extern paddr_t hppa_vtop; - vaddr_t va, addr = hppa_round_page(vstart), eaddr, t; + vaddr_t va, addr = round_page(vstart), eaddr, t; vsize_t size; struct pmap *kpm; int npdes, nkpdes; @@ -480,7 +480,7 @@ pmap_bootstrap(vstart) mtctl(addr, CR_VTOP); hppa_vtop = addr; - size = hppa_round_page((hppa_sid_max + 1) * 4); + size = round_page((hppa_sid_max + 1) * 4); bzero((void *)addr, size); fdcache(HPPA_SID_KERNEL, addr, size); DPRINTF(PDB_INIT, ("vtop: 0x%x @ 0x%x\n", size, addr)); @@ -913,7 +913,7 @@ pmap_write_protect(pmap, sva, eva, prot) DPRINTF(PDB_FOLLOW|PDB_PMAP, ("pmap_write_protect(%p, %x, %x, %x)\n", pmap, sva, eva, prot)); - sva = hppa_trunc_page(sva); + sva = trunc_page(sva); tlbprot = PTE_PROT(pmap_prot(pmap, prot)); simple_lock(&pmap->pm_lock); diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index b421c9a1989..f06d01ccce0 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.90 2005/09/15 21:14:27 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.91 2005/10/26 18:35:44 martin Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -414,7 +414,7 @@ trap(type, frame) if ((type & T_USER && space == HPPA_SID_KERNEL) || (frame->tf_iioq_head & 3) != pl || (type & T_USER && va >= VM_MAXUSER_ADDRESS) || - uvm_fault(map, hppa_trunc_page(va), fault, + uvm_fault(map, trunc_page(va), fault, opcode & 0x40? UVM_PROT_WRITE : UVM_PROT_READ)) { frame_regmap(frame, opcode & 0x1f) = 0; frame->tf_ipsw |= PSL_N; @@ -462,7 +462,7 @@ trap(type, frame) break; } - ret = uvm_fault(map, hppa_trunc_page(va), fault, vftype); + ret = uvm_fault(map, trunc_page(va), fault, vftype); /* * If this was a stack access we keep track of the maximum diff --git a/sys/arch/hppa/include/param.h b/sys/arch/hppa/include/param.h index 4e78cee3b34..6667d2e66f4 100644 --- a/sys/arch/hppa/include/param.h +++ b/sys/arch/hppa/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.26 2005/07/31 15:31:12 miod Exp $ */ +/* $OpenBSD: param.h,v 1.27 2005/10/26 18:35:44 martin Exp $ */ /* * Copyright (c) 1988-1994, The University of Utah and @@ -112,9 +112,6 @@ /* * Mach derived conversion macros */ -#define hppa_round_page(x) ((((unsigned long)(x)) + NBPG - 1) & ~(NBPG-1)) -#define hppa_trunc_page(x) ((unsigned long)(x) & ~(NBPG-1)) - #define btop(x) ((unsigned long)(x) >> PGSHIFT) #define ptob(x) ((unsigned long)(x) << PGSHIFT) diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c index d4342b253f1..b76467dfe09 100644 --- a/sys/arch/hppa64/hppa64/machdep.c +++ b/sys/arch/hppa64/hppa64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.2 2005/08/06 14:26:52 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.3 2005/10/26 18:35:45 martin Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -275,14 +275,14 @@ TODO hpmc/toc/pfr { vaddr_t v; - v = hppa_round_page(start); + v = round_page(start); #define valloc(name, type, num) (name) = (type *)v; v = (vaddr_t)((name)+(num)) valloc(msgpool, char, msginfo.msgmax); valloc(msgmaps, struct msgmap, msginfo.msgseg); valloc(msghdrs, struct msg, msginfo.msgtql); valloc(msqids, struct msqid_ds, msginfo.msgmni); #undef valloc - v = hppa_round_page(v); + v = round_page(v); bzero ((void *)start, (v - start)); start = v; } diff --git a/sys/arch/hppa64/hppa64/mainbus.c b/sys/arch/hppa64/hppa64/mainbus.c index b1276b56140..59e1d06a354 100644 --- a/sys/arch/hppa64/hppa64/mainbus.c +++ b/sys/arch/hppa64/hppa64/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.2 2005/05/22 01:38:09 mickey Exp $ */ +/* $OpenBSD: mainbus.c,v 1.3 2005/10/26 18:35:45 martin Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -102,8 +102,8 @@ mbus_unmap(void *v, bus_space_handle_t bsh, bus_size_t size) { u_long sva, eva; - sva = hppa_trunc_page(bsh); - eva = hppa_round_page(bsh + size); + sva = trunc_page(bsh); + eva = round_page(bsh + size); #ifdef DIAGNOSTIC if (eva <= sva) diff --git a/sys/arch/hppa64/hppa64/pmap.c b/sys/arch/hppa64/hppa64/pmap.c index 4edab6922d7..dc7b95b0849 100644 --- a/sys/arch/hppa64/hppa64/pmap.c +++ b/sys/arch/hppa64/hppa64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.1 2005/04/01 10:40:47 mickey Exp $ */ +/* $OpenBSD: pmap.c,v 1.2 2005/10/26 18:35:45 martin Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -451,7 +451,7 @@ pmap_bootstrap(vstart) vaddr_t vstart; { extern int resvphysmem, __rodata_end, __data_start; - vaddr_t va, eaddr, addr = hppa_round_page(vstart); + vaddr_t va, eaddr, addr = round_page(vstart); struct pmap *kpm; DPRINTF(PDB_FOLLOW|PDB_INIT, ("pmap_bootstrap(0x%lx)\n", vstart)); @@ -857,7 +857,7 @@ pmap_write_protect(pmap, sva, eva, prot) DPRINTF(PDB_FOLLOW|PDB_PMAP, ("pmap_write_protect(%p, %lx, %lx, %x)\n", pmap, sva, eva, prot)); - sva = hppa_trunc_page(sva); + sva = trunc_page(sva); tlbprot = pmap_prot(pmap, prot); simple_lock(&pmap->pm_lock); diff --git a/sys/arch/hppa64/hppa64/trap.c b/sys/arch/hppa64/hppa64/trap.c index 04d6c00312a..73ff5be1703 100644 --- a/sys/arch/hppa64/hppa64/trap.c +++ b/sys/arch/hppa64/hppa64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.5 2005/09/15 21:14:27 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.6 2005/10/26 18:35:45 martin Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -379,7 +379,7 @@ trap(type, frame) if ((type & T_USER && space == HPPA_SID_KERNEL) || (type & T_USER && !pl) || (type & T_USER && va >= VM_MAXUSER_ADDRESS) || - uvm_fault(map, hppa_trunc_page(va), fault, + uvm_fault(map, trunc_page(va), fault, opcode & 0x40? UVM_PROT_WRITE : UVM_PROT_READ)) { frame_regmap(frame, opcode & 0x1f) = 0; frame->tf_ipsw |= PSL_N; @@ -428,7 +428,7 @@ trap(type, frame) } printf("here\n"); - ret = uvm_fault(map, hppa_trunc_page(va), fault, vftype); + ret = uvm_fault(map, trunc_page(va), fault, vftype); /* * If this was a stack access we keep track of the maximum diff --git a/sys/arch/hppa64/include/param.h b/sys/arch/hppa64/include/param.h index 2fe2d417f37..f17536782e4 100644 --- a/sys/arch/hppa64/include/param.h +++ b/sys/arch/hppa64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.3 2005/09/12 23:05:05 miod Exp $ */ +/* $OpenBSD: param.h,v 1.4 2005/10/26 18:35:45 martin Exp $ */ /* * Copyright (c) 1988-1994, The University of Utah and @@ -111,9 +111,6 @@ /* * Mach derived conversion macros */ -#define hppa_round_page(x) ((((unsigned long)(x)) + NBPG - 1) & ~(NBPG-1)) -#define hppa_trunc_page(x) ((unsigned long)(x) & ~(NBPG-1)) - #define btop(x) ((unsigned long)(x) >> PAGE_SHIFT) #define ptob(x) ((unsigned long)(x) << PAGE_SHIFT) |