-/* $OpenBSD: if_de.c,v 1.19 2006/04/16 00:46:32 pascoe Exp $ */
+/* $OpenBSD: if_de.c,v 1.20 2008/08/14 11:41:30 martin Exp $ */
/* $NetBSD: if_de.c,v 1.27 1997/04/19 15:02:29 ragge Exp $ */
/*
return;
if ((ifp->if_flags & IFF_RUNNING) == 0) {
if (if_ubaminit(&ds->ds_deuba, (void *)ds->ds_dev.dv_parent,
- sizeof (struct ether_header), (int)vax_btoc(ETHERMTU),
+ sizeof (struct ether_header), (int)vax_atop(ETHERMTU),
ds->ds_ifr, NRCV, ds->ds_ifw, NXMT) == 0) {
printf("%s: can't initialize\n", ds->ds_dev.dv_xname);
ds->ds_if.if_flags &= ~IFF_UP;
-/* $OpenBSD: param.h,v 1.33 2007/05/28 21:02:49 thib Exp $ */
+/* $OpenBSD: param.h,v 1.34 2008/08/14 11:41:30 martin Exp $ */
/* $NetBSD: param.h,v 1.39 1999/10/22 21:14:34 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
-/* clicks to bytes */
-#define ctob(x) ((x) << PGSHIFT)
-#define btoc(x) (((unsigned)(x) + PGOFSET) >> PGSHIFT)
-
/* bytes to disk blocks */
#define btodb(x) ((x) >> DEV_BSHIFT)
#define dbtob(x) ((x) << DEV_BSHIFT)
/* MD conversion macros */
-#define vax_btoc(x) (((unsigned)(x) + VAX_PGOFSET) >> VAX_PGSHIFT)
+#define vax_atop(x) (((unsigned)(x) + VAX_PGOFSET) >> VAX_PGSHIFT)
#define vax_btop(x) (((unsigned)(x)) >> VAX_PGSHIFT)
#define ovbcopy(x,y,z) bcopy(x, y, z)
-/* $OpenBSD: disksubr.c,v 1.57 2008/06/12 06:58:38 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.58 2008/08/14 11:41:30 martin Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */
/*
caddr_t addr;
o = (int)bp->b_data & VAX_PGOFSET;
- npf = vax_btoc(bp->b_bcount + o) + 1;
+ npf = vax_atop(bp->b_bcount + o) + 1;
addr = bp->b_data;
p = bp->b_proc;
-/* $OpenBSD: ka650.c,v 1.13 2004/01/29 21:34:17 deraadt Exp $ */
+/* $OpenBSD: ka650.c,v 1.14 2008/08/14 11:41:30 martin Exp $ */
/* $NetBSD: ka650.c,v 1.25 2001/04/27 15:02:37 ragge Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
syssub == VAX_SIE_KA655 ? 5 : 0,
(vax_cpudata & 0xff), GETFRMREV(vax_siedata));
ka650setcache(CACHEON);
- if (ctob(physmem) > ka650merr_ptr->merr_qbmbr) {
+ if (ptoa(physmem) > ka650merr_ptr->merr_qbmbr) {
printf("physmem(0x%x) > qbmbr(0x%x)\n",
- ctob(physmem), (int)ka650merr_ptr->merr_qbmbr);
+ ptoa(physmem), (int)ka650merr_ptr->merr_qbmbr);
panic("qbus map unprotected");
}
if (mfpr(PR_TODR) == 0)
-/* $OpenBSD: machdep.c,v 1.96 2008/06/27 17:22:15 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.97 2008/08/14 11:41:30 martin Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
printf("real mem = %u (%uMB)\n", avail_end,
avail_end/1024/1024);
- physmem = btoc(avail_end);
+ physmem = atop(avail_end);
mtpr(AST_NO, PR_ASTLVL);
spl0();
* XXX include the final RAM page which is not included in physmem.
*/
dumpsize = physmem + 1;
- if (dumpsize > btoc(dbtob(nblks - dumplo)))
- dumpsize = btoc(dbtob(nblks - dumplo));
+ if (dumpsize > atop(dbtob(nblks - dumplo)))
+ dumpsize = atop(dbtob(nblks - dumplo));
else if (dumplo == 0)
- dumplo = nblks - btodb(ctob(dumpsize));
+ dumplo = nblks - btodb(ptoa(dumpsize));
/*
* Don't dump on the first block in case the dump
-/* $OpenBSD: pmap.c,v 1.44 2008/06/14 10:55:20 mk Exp $ */
+/* $OpenBSD: pmap.c,v 1.45 2008/08/14 11:41:30 martin Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */
/*
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
size, vstartp, vendp);
#endif
size = round_page(size);
- npgs = btoc(size);
+ npgs = atop(size);
#ifdef DIAGNOSTIC
if (uvm.page_init_done == TRUE)
(u_long *)&pmap->pm_p0br);
if (res)
panic("pmap_create");
- pmap->pm_p0lr = vax_btoc(MAXTSIZ + MAXDSIZ + BRKSIZ) | AST_PCB;
+ pmap->pm_p0lr = vax_atop(MAXTSIZ + MAXDSIZ + BRKSIZ) | AST_PCB;
(vaddr_t)pmap->pm_p1br = (vaddr_t)pmap->pm_p0br + bytesiz - 0x800000;
- pmap->pm_p1lr = vax_btoc(0x40000000 - MAXSSIZ);
+ pmap->pm_p1lr = vax_atop(0x40000000 - MAXSSIZ);
pmap->pm_stack = USRSTACK;
#ifdef PMAPDEBUG