[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-newbie
Subject: [PATCH 05/12] x86: Refactor pack_gate for gate_desc
From: Joe Damato <ice799 () gmail ! com>
Date: 2008-10-25 3:15:25
Message-ID: a4c806abcf7a46c78aaff4e338fdbc1a06a56c88.1224903712.git.ice799 () gmail ! com
[Download RAW message or body]
Rewrite pack_gate to use the newly add struct fields instead of bitmasks.
Signed-off-by: Joe Damato <ice799@gmail.com>
---
include/asm-x86/desc.h | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index f06adac..6b4f3e6 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -66,9 +66,14 @@ static inline void pack_gate(gate_desc *gate, unsigned char type,
unsigned long base, unsigned dpl, unsigned flags,
unsigned short seg)
{
- gate->a = (seg << 16) | (base & 0xffff);
- gate->b = (base & 0xffff0000) |
- (((0x80 | type | (dpl << 5)) & 0xff) << 8);
+ gate->base0 = base & 0xffff;
+ gate->seg_sel = seg;
+ gate->reserved = 0;
+ gate->type = type;
+ gate->zero = 0;
+ gate->dpl = dpl;
+ gate->p = 1;
+ gate->base1 = (base >> 16) & 0xffff;
}
#endif
--
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic