aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/helper.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:51:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:02 -0400
commit1ffb9164f51094b7105ce9f81600b222ddf5b82c (patch)
treeb2efe2af99a2827692a7541058eaef9e938f1da6 /arch/um/os-Linux/helper.c
parent6e21aec3fcf6c8862b755d45c0af45acdefff976 (diff)
uml: remove page_size()
userspace code used to have to call the kernelspace function page_size() in order to determine the value of the kernel's PAGE_SIZE. Since this is now available directly from kern_constants.h as UM_KERN_PAGE_SIZE, page_size() can be deleted and calls changed to use the constant. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> 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/helper.c')
-rw-r--r--arch/um/os-Linux/helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index f35220c72042..2184ddb9cb31 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -15,6 +15,7 @@
15#include "kern_util.h" 15#include "kern_util.h"
16#include "os.h" 16#include "os.h"
17#include "um_malloc.h" 17#include "um_malloc.h"
18#include "kern_constants.h"
18 19
19struct helper_data { 20struct helper_data {
20 void (*pre_exec)(void*); 21 void (*pre_exec)(void*);
@@ -69,7 +70,7 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
69 goto out_close; 70 goto out_close;
70 } 71 }
71 72
72 sp = stack + page_size() - sizeof(void *); 73 sp = stack + UM_KERN_PAGE_SIZE - sizeof(void *);
73 data.pre_exec = pre_exec; 74 data.pre_exec = pre_exec;
74 data.pre_data = pre_data; 75 data.pre_data = pre_data;
75 data.argv = argv; 76 data.argv = argv;
@@ -123,7 +124,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
123 if (stack == 0) 124 if (stack == 0)
124 return -ENOMEM; 125 return -ENOMEM;
125 126
126 sp = stack + (page_size() << stack_order) - sizeof(void *); 127 sp = stack + (UM_KERN_PAGE_SIZE << stack_order) - sizeof(void *);
127 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); 128 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg);
128 if (pid < 0) { 129 if (pid < 0) {
129 err = -errno; 130 err = -errno;