Messages in this thread Patch in this message | | | From | Joe Damato <> | Subject | [PATCH 05/12] x86: Refactor pack_gate for gate_desc | Date | Fri, 24 Oct 2008 20:15:25 -0700 |
| |
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
| |