Commit 2817716a authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Andi Kleen

[PATCH] i386: Fix pack_descriptor()

Fix pack_descriptor:
 1. flags are bits 20-23 in the high word
 2. limit's 4 msb are bits 16-19 in the high word

These haven't mattered so far, because all users have had small limits
and a flags setting of 0.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>

===================================================================
parent de09bddb
...@@ -46,7 +46,7 @@ static inline void pack_descriptor(__u32 *a, __u32 *b, ...@@ -46,7 +46,7 @@ static inline void pack_descriptor(__u32 *a, __u32 *b,
{ {
*a = ((base & 0xffff) << 16) | (limit & 0xffff); *a = ((base & 0xffff) << 16) | (limit & 0xffff);
*b = (base & 0xff000000) | ((base & 0xff0000) >> 16) | *b = (base & 0xff000000) | ((base & 0xff0000) >> 16) |
((type & 0xff) << 8) | ((flags & 0xf) << 12); (limit & 0x000f0000) | ((type & 0xff) << 8) | ((flags & 0xf) << 20);
} }
static inline void pack_gate(__u32 *a, __u32 *b, static inline void pack_gate(__u32 *a, __u32 *b,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment