X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=arch%2Fx86%2Fum%2Fshared%2Fsysdep%2Fstub_32.h;h=4c6c2be0c899775b6480deb641ac01faf18d94f9;hb=c605c39677b9842b0566013e0cf30bc13e90bdbc;hp=b95db9daf0e821993677bb098c111e561269ed9d;hpb=c99c4d0ca57c978dcc2a2f41ab8449684ea154cc;p=linux-2.6-microblaze.git diff --git a/arch/x86/um/shared/sysdep/stub_32.h b/arch/x86/um/shared/sysdep/stub_32.h index b95db9daf0e8..4c6c2be0c899 100644 --- a/arch/x86/um/shared/sysdep/stub_32.h +++ b/arch/x86/um/shared/sysdep/stub_32.h @@ -101,4 +101,16 @@ static inline void remap_stack_and_trap(void) "memory"); } +static __always_inline void *get_stub_page(void) +{ + unsigned long ret; + + asm volatile ( + "movl %%esp,%0 ;" + "andl %1,%0" + : "=a" (ret) + : "g" (~(UM_KERN_PAGE_SIZE - 1))); + + return (void *)ret; +} #endif