projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
um: fix stub location calculation
[linux-2.6-microblaze.git]
/
arch
/
x86
/
um
/
shared
/
sysdep
/
stub_64.h
diff --git
a/arch/x86/um/shared/sysdep/stub_64.h
b/arch/x86/um/shared/sysdep/stub_64.h
index
6e2626b
..
e9c4b2b
100644
(file)
--- a/
arch/x86/um/shared/sysdep/stub_64.h
+++ b/
arch/x86/um/shared/sysdep/stub_64.h
@@
-108,4
+108,16
@@
static inline void remap_stack_and_trap(void)
__syscall_clobber, "r10", "r8", "r9");
}
__syscall_clobber, "r10", "r8", "r9");
}
+static __always_inline void *get_stub_page(void)
+{
+ unsigned long ret;
+
+ asm volatile (
+ "movq %%rsp,%0 ;"
+ "andq %1,%0"
+ : "=a" (ret)
+ : "g" (~(UM_KERN_PAGE_SIZE - 1)));
+
+ return (void *)ret;
+}
#endif
#endif