Module Name: src Committed By: riastradh Date: Sun Sep 8 15:38:35 UTC 2013
Modified Files: src/sys/external/bsd/drm2/include/linux [riastradh-drm2]: mm.h Log Message: Fix definition of Linux PAGE_ALIGN in <linux/mm.h>. Can't use uvm round_page because that depends on PAGE_MASK, whose sense we have to invert for Linux! Plurgh. To generate a diff of this commit: cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/external/bsd/drm2/include/linux/mm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/include/linux/mm.h diff -u src/sys/external/bsd/drm2/include/linux/mm.h:1.1.2.4 src/sys/external/bsd/drm2/include/linux/mm.h:1.1.2.5 --- src/sys/external/bsd/drm2/include/linux/mm.h:1.1.2.4 Wed Jul 24 03:58:04 2013 +++ src/sys/external/bsd/drm2/include/linux/mm.h Sun Sep 8 15:38:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mm.h,v 1.1.2.4 2013/07/24 03:58:04 riastradh Exp $ */ +/* $NetBSD: mm.h,v 1.1.2.5 2013/09/08 15:38:35 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -40,12 +40,13 @@ #include <uvm/uvm_extern.h> -#define PAGE_ALIGN(x) round_page(x) - /* XXX Ugh bletch! Whattakludge! Linux's sense is reversed... */ #undef PAGE_MASK #define PAGE_MASK (~(PAGE_SIZE-1)) +#define PAGE_ALIGN(x) (((x) + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1)) +#define offset_in_page(x) ((x) & (PAGE_SIZE-1)) + /* * ################################################################### * ############### XXX THIS NEEDS SERIOUS SCRUTINY XXX ###############