Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e1a79c400a86f2f6a6735480e31f6ee159e76fa2
Commit:     e1a79c400a86f2f6a6735480e31f6ee159e76fa2
Parent:     57598fd7b31f6437874308a79ca23e51c74da59b
Author:     Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Thu May 10 22:22:31 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri May 11 08:29:33 2007 -0700

    uml: use UM_THREAD_SIZE in userspace code
    
    Now that we have UM_THREAD_SIZE, we can replace the calculations in
    user-space code (an earlier patch took care of the kernel side of the
    house).
    
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Cc: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/kernel/init_task.c      |    3 +--
 arch/um/os-Linux/skas/process.c |    7 +++----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index cda91aa..4506c7f 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -44,8 +44,7 @@ __attribute__((__section__(".data.init_task"))) =
 
 void unprotect_stack(unsigned long stack)
 {
-       os_protect_memory((void *) stack, (1 << CONFIG_KERNEL_STACK_ORDER) * 
PAGE_SIZE,
-                      1, 1, 0);
+       os_protect_memory((void *) stack, THREAD_SIZE, 1, 1, 0);
 }
 
 /*
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 6a0e466..3492886 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -490,8 +490,8 @@ void map_stub_pages(int fd, unsigned long code,
 void new_thread(void *stack, jmp_buf *buf, void (*handler)(void))
 {
        (*buf)[0].JB_IP = (unsigned long) handler;
-       (*buf)[0].JB_SP = (unsigned long) stack +
-               (PAGE_SIZE << UML_CONFIG_KERNEL_STACK_ORDER) - sizeof(void *);
+       (*buf)[0].JB_SP = (unsigned long) stack + UM_THREAD_SIZE -
+               sizeof(void *);
 }
 
 #define INIT_JMP_NEW_THREAD 0
@@ -533,8 +533,7 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf)
        case INIT_JMP_NEW_THREAD:
                (*switch_buf)[0].JB_IP = (unsigned long) new_thread_handler;
                (*switch_buf)[0].JB_SP = (unsigned long) stack +
-                       (PAGE_SIZE << UML_CONFIG_KERNEL_STACK_ORDER) -
-                       sizeof(void *);
+                       UM_THREAD_SIZE - sizeof(void *);
                break;
        case INIT_JMP_CALLBACK:
                (*cb_proc)(cb_arg);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to