diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-12-13 16:26:14 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-12-13 16:26:14 +0000 |
commit | fa159aeeeba73baf6da7042ed31ea4e48bb97007 (patch) | |
tree | dfc1ad904eda3aa681b4f0ca0a7ae1d2faecda29 /lib/libarch/alpha | |
parent | be4f6aba63262454c2b6152ce2353603a7f6df2c (diff) |
Provide our own copy of {round,trunc}_page() now that uvm's is unreachable from
non-_KERNEL code.
Diffstat (limited to 'lib/libarch/alpha')
-rw-r--r-- | lib/libarch/alpha/bwx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libarch/alpha/bwx.c b/lib/libarch/alpha/bwx.c index 094c879e604..3647a914cac 100644 --- a/lib/libarch/alpha/bwx.c +++ b/lib/libarch/alpha/bwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwx.c,v 1.7 2014/04/18 15:09:52 guenther Exp $ */ +/* $OpenBSD: bwx.c,v 1.8 2014/12/13 16:26:13 miod Exp $ */ /*- * Copyright (c) 1998 Doug Rabson * All rights reserved. @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#define vm_page_size (sysconf(_SC_PAGESIZE)) /* XXX */ #include <sys/param.h> #include <sys/mman.h> #include <sys/fcntl.h> @@ -40,6 +39,9 @@ #include "io.h" +#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK) +#define trunc_page(x) ((x) & ~PAGE_MASK) + #define PATH_APERTURE "/dev/xf86" #define mb() __asm__ volatile("mb" : : : "memory") |