projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cadd516
)
x86: get_desc_base
author
Roland McGrath
<
[email protected]
>
Wed, 30 Jan 2008 12:30:44 +0000
(13:30 +0100)
committer
Ingo Molnar
<
[email protected]
>
Wed, 30 Jan 2008 12:30:44 +0000
(13:30 +0100)
This defines the get_desc_base function in asm-x86/desc_64.h to match the
one in desc_32.h. If these two files ever get merged together, this
function could be the same in both.
Signed-off-by: Roland McGrath <
[email protected]
>
Cc: Andrew Morton <
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
Signed-off-by: Ingo Molnar <
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
include/asm-x86/desc_64.h
patch
|
blob
|
history
diff --git
a/include/asm-x86/desc_64.h
b/include/asm-x86/desc_64.h
index 7d48df72aef2e7349c470b5ba83d4282e13557c3..230ac6e50a0f180502e53b8327d2ce5eb896c882 100644
(file)
--- a/
include/asm-x86/desc_64.h
+++ b/
include/asm-x86/desc_64.h
@@
-215,6
+215,16
@@
static inline void load_LDT(mm_context_t *pc)
extern struct desc_ptr idt_descr;
+static inline unsigned long get_desc_base(const void *ptr)
+{
+ const u32 *desc = ptr;
+ unsigned long base;
+ base = ((desc[0] >> 16) & 0x0000ffff) |
+ ((desc[1] << 16) & 0x00ff0000) |
+ (desc[1] & 0xff000000);
+ return base;
+}
+
#endif /* !__ASSEMBLY__ */
#endif