aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/skas/process.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/skas/process.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/skas/process.c')
-rw-r--r--arch/um/os-Linux/skas/process.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 6554ff530128..29fd079c30b1 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -33,6 +33,7 @@
33#include "uml-config.h" 33#include "uml-config.h"
34#include "process.h" 34#include "process.h"
35#include "longjmp.h" 35#include "longjmp.h"
36#include "kern_constants.h"
36 37
37int is_skas_winch(int pid, int fd, void *data) 38int is_skas_winch(int pid, int fd, void *data)
38{ 39{
@@ -171,7 +172,7 @@ static int userspace_tramp(void *stack)
171 int fd; 172 int fd;
172 __u64 offset; 173 __u64 offset;
173 fd = phys_mapping(to_phys(&__syscall_stub_start), &offset); 174 fd = phys_mapping(to_phys(&__syscall_stub_start), &offset);
174 addr = mmap64((void *) UML_CONFIG_STUB_CODE, page_size(), 175 addr = mmap64((void *) UML_CONFIG_STUB_CODE, UM_KERN_PAGE_SIZE,
175 PROT_EXEC, MAP_FIXED | MAP_PRIVATE, fd, offset); 176 PROT_EXEC, MAP_FIXED | MAP_PRIVATE, fd, offset);
176 if(addr == MAP_FAILED){ 177 if(addr == MAP_FAILED){
177 printk("mapping mmap stub failed, errno = %d\n", 178 printk("mapping mmap stub failed, errno = %d\n",
@@ -181,8 +182,8 @@ static int userspace_tramp(void *stack)
181 182
182 if(stack != NULL){ 183 if(stack != NULL){
183 fd = phys_mapping(to_phys(stack), &offset); 184 fd = phys_mapping(to_phys(stack), &offset);
184 addr = mmap((void *) UML_CONFIG_STUB_DATA, page_size(), 185 addr = mmap((void *) UML_CONFIG_STUB_DATA,
185 PROT_READ | PROT_WRITE, 186 UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,
186 MAP_FIXED | MAP_SHARED, fd, offset); 187 MAP_FIXED | MAP_SHARED, fd, offset);
187 if(addr == MAP_FAILED){ 188 if(addr == MAP_FAILED){
188 printk("mapping segfault stack failed, " 189 printk("mapping segfault stack failed, "
@@ -198,7 +199,7 @@ static int userspace_tramp(void *stack)
198 (unsigned long) stub_segv_handler - 199 (unsigned long) stub_segv_handler -
199 (unsigned long) &__syscall_stub_start; 200 (unsigned long) &__syscall_stub_start;
200 201
201 set_sigstack((void *) UML_CONFIG_STUB_DATA, page_size()); 202 set_sigstack((void *) UML_CONFIG_STUB_DATA, UM_KERN_PAGE_SIZE);
202 sigemptyset(&sa.sa_mask); 203 sigemptyset(&sa.sa_mask);
203 sigaddset(&sa.sa_mask, SIGIO); 204 sigaddset(&sa.sa_mask, SIGIO);
204 sigaddset(&sa.sa_mask, SIGWINCH); 205 sigaddset(&sa.sa_mask, SIGWINCH);