From f7d58684337af132950a904c46db820a68d42541 Mon Sep 17 00:00:00 2001 From: miod Date: Sat, 13 Dec 2014 16:26:13 +0000 Subject: [PATCH] Provide our own copy of {round,trunc}_page() now that uvm's is unreachable from non-_KERNEL code. --- lib/libarch/alpha/bwx.c | 6 ++++-- 1 file 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 #include #include @@ -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") -- 2.20.1