diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2006-09-26 10:52:40 +0200 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 10:52:40 +0200 |
commit | 2817716ace8c397685bd702223cc5a8a42c7e997 (patch) | |
tree | 901fecc20019b1a8dd294bd70a155b8bd4cd6814 | |
parent | de09bddb9d6f96785be470c832b881e6d72d589f (diff) | |
download | blackbird-op-linux-2817716ace8c397685bd702223cc5a8a42c7e997.tar.gz blackbird-op-linux-2817716ace8c397685bd702223cc5a8a42c7e997.zip |
[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: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
===================================================================
-rw-r--r-- | include/asm-i386/desc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 5db9e96e8dc1..5874ef119ffd 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h @@ -46,7 +46,7 @@ static inline void pack_descriptor(__u32 *a, __u32 *b, { *a = ((base & 0xffff) << 16) | (limit & 0xffff); *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, |