diff options
-rw-r--r-- | sys/arch/aviion/aviion/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/luna88k/luna88k/machdep.c | 10 | ||||
-rw-r--r-- | sys/arch/m88k/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/pmap.c | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/sig_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/machdep.c | 12 |
6 files changed, 18 insertions, 22 deletions
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index 9f72bf20f15..7616fa13df4 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.20 2007/12/19 22:05:04 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.21 2007/12/31 09:23:53 martin Exp $ */ /* * Copyright (c) 2007 Miodrag Vallat. * @@ -255,7 +255,7 @@ cpu_startup() * Initialize error message buffer (at end of core). * avail_end was pre-decremented in aviion_bootstrap() to compensate. */ - for (i = 0; i < btoc(MSGBUFSIZE); i++) + for (i = 0; i < atop(MSGBUFSIZE); i++) pmap_kenter_pa((paddr_t)msgbufp + i * PAGE_SIZE, avail_end + i * PAGE_SIZE, VM_PROT_READ | VM_PROT_WRITE); pmap_update(pmap_kernel()); diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c index c8f2de5a0fc..e2239984816 100644 --- a/sys/arch/luna88k/luna88k/machdep.c +++ b/sys/arch/luna88k/luna88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.53 2007/12/17 05:23:49 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.54 2007/12/31 09:23:53 martin Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -363,7 +363,7 @@ cpu_startup() * Initialize error message buffer (at end of core). * avail_end was pre-decremented in luna88k_bootstrap() to compensate. */ - for (i = 0; i < btoc(MSGBUFSIZE); i++) + for (i = 0; i < atop(MSGBUFSIZE); i++) pmap_kenter_pa((paddr_t)msgbufp + i * PAGE_SIZE, avail_end + i * PAGE_SIZE, VM_PROT_READ | VM_PROT_WRITE); pmap_update(pmap_kernel()); @@ -384,7 +384,7 @@ cpu_startup() */ printf(version); identifycpu(); - printf("real mem = %d\n", ctob(physmem)); + printf("real mem = %d\n", ptoa(physmem)); /* * Check front DIP switch setting @@ -625,7 +625,7 @@ dumpconf(void) /* luna88k only uses a single segment. */ cpu_kcore_hdr.ram_segs[0].start = 0; - cpu_kcore_hdr.ram_segs[0].size = ctob(physmem); + cpu_kcore_hdr.ram_segs[0].size = ptoa(physmem); cpu_kcore_hdr.cputype = cputyp; /* @@ -1004,7 +1004,7 @@ luna88k_bootstrap() first_addr = round_page((vaddr_t)&end); /* XXX temp until symbols */ last_addr = size_memory(); - physmem = btoc(last_addr); + physmem = atop(last_addr); setup_board_config(); master_cpu = cmmu_init(); diff --git a/sys/arch/m88k/include/param.h b/sys/arch/m88k/include/param.h index f643deefa85..690629eb66c 100644 --- a/sys/arch/m88k/include/param.h +++ b/sys/arch/m88k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.11 2007/12/05 22:12:32 miod Exp $ */ +/* $OpenBSD: param.h,v 1.12 2007/12/31 09:23:53 martin Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1988 University of Utah. @@ -99,10 +99,6 @@ #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) #define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT)) -/* pages to bytes */ -#define ctob(x) ((x) << PGSHIFT) -#define btoc(x) (((x) + PGOFSET) >> PGSHIFT) - /* bytes to disk blocks */ #define btodb(x) ((x) >> DEV_BSHIFT) #define dbtob(x) ((x) << DEV_BSHIFT) diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c index 1eeb3d29467..63d655e7500 100644 --- a/sys/arch/m88k/m88k/pmap.c +++ b/sys/arch/m88k/m88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.42 2007/12/20 21:15:51 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.43 2007/12/31 09:23:53 martin Exp $ */ /* * Copyright (c) 2001-2004, Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -704,7 +704,7 @@ pmap_bootstrap(vaddr_t load_start) SYSMAP(caddr_t, vmpte, vmmap, 1); invalidate_pte(vmpte); - SYSMAP(struct msgbuf *, msgbufmap, msgbufp, btoc(MSGBUFSIZE)); + SYSMAP(struct msgbuf *, msgbufmap, msgbufp, atop(MSGBUFSIZE)); virtual_avail = virt; diff --git a/sys/arch/m88k/m88k/sig_machdep.c b/sys/arch/m88k/m88k/sig_machdep.c index 1478743b52c..703c0e6cb07 100644 --- a/sys/arch/m88k/m88k/sig_machdep.c +++ b/sys/arch/m88k/m88k/sig_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sig_machdep.c,v 1.7 2007/12/08 18:38:23 miod Exp $ */ +/* $OpenBSD: sig_machdep.c,v 1.8 2007/12/31 09:23:53 martin Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -118,7 +118,7 @@ sendsig(sig_t catcher, int sig, int mask, unsigned long code, int type, if (((vaddr_t)fp & 0x07) != 0) fp = (struct sigframe *)((vaddr_t)fp & ~0x07); - if ((vaddr_t)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize)) + if ((vaddr_t)fp <= USRSTACK - ptoa(p->p_vmspace->vm_ssize)) (void)uvm_grow(p, (vaddr_t)fp); #ifdef DEBUG diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c index 4aa9f800d52..c51f2f55019 100644 --- a/sys/arch/mvme88k/mvme88k/machdep.c +++ b/sys/arch/mvme88k/mvme88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.206 2007/12/27 23:17:55 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.207 2007/12/31 09:23:54 martin Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -328,7 +328,7 @@ cpu_startup() * Initialize error message buffer (at end of core). * avail_end was pre-decremented in mvme_bootstrap() to compensate. */ - for (i = 0; i < btoc(MSGBUFSIZE); i++) + for (i = 0; i < atop(MSGBUFSIZE); i++) pmap_kenter_pa((paddr_t)msgbufp + i * PAGE_SIZE, avail_end + i * PAGE_SIZE, VM_PROT_READ | VM_PROT_WRITE); pmap_update(pmap_kernel()); @@ -339,8 +339,8 @@ cpu_startup() */ printf(version); identifycpu(); - printf("real mem = %u (%uMB)\n", ctob(physmem), - ctob(physmem)/1024/1024); + printf("real mem = %u (%uMB)\n", ptoa(physmem), + ptoa(physmem)/1024/1024); /* * Find out how much space we need, allocate it, @@ -543,7 +543,7 @@ dumpconf(void) /* mvme88k only uses a single segment. */ cpu_kcore_hdr.ram_segs[0].start = 0; - cpu_kcore_hdr.ram_segs[0].size = ctob(physmem); + cpu_kcore_hdr.ram_segs[0].size = ptoa(physmem); cpu_kcore_hdr.cputype = cputyp; /* @@ -980,7 +980,7 @@ mvme_bootstrap() break; #endif } - physmem = btoc(last_addr); + physmem = atop(last_addr); setup_board_config(); master_cpu = cmmu_init(); |