aboutsummaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/main.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-06-16 10:16:09 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-16 13:16:16 -0700
commitc539ab73070b381f0452dae791f891ec2515098e (patch)
tree68e4e706fe31b88b26bd4b29eadb32440148eb3e /arch/um/os-Linux/main.c
parentf5a9c77df45b113d21b64cbc2bf6c72a0da48998 (diff)
uml: remove PAGE_SIZE from libc code
Distros seem to be removing PAGE_SIZE from asm/page.h. So, the libc side of UML should stop using it. I replace it with UM_KERN_PAGE_SIZE, which is defined to be the same as PAGE_SIZE on the kernel side of the house. I could also use getpagesize(), but it's more important that UML have the same value of PAGE_SIZE everywhere. It's conceivable that it could be built with a larger PAGE_SIZE, and use of getpagesize() would break that badly. PAGE_MASK got the same treatment, as it is closely tied to PAGE_SIZE. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux/main.c')
-rw-r--r--arch/um/os-Linux/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index ea9a23696f3..fb510d40480 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -24,6 +24,7 @@
#include "uml-config.h"
#include "os.h"
#include "um_malloc.h"
+#include "kern_constants.h"
/* Set in main, unchanged thereafter */
char *linux_prog;
@@ -232,7 +233,8 @@ void *__wrap_malloc(int size)
if(!CAN_KMALLOC())
return __real_malloc(size);
- else if(size <= PAGE_SIZE) /* finding contiguos pages can be hard*/
+ else if(size <= UM_KERN_PAGE_SIZE)
+ /* finding contiguous pages can be hard*/
ret = um_kmalloc(size);
else ret = um_vmalloc(size);