[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a4c806abcf7a46c78aaff4e338fdbc1a06a56c88.1224903712.git.ice799@gmail.com>
Date: Fri, 24 Oct 2008 20:15:25 -0700
From: Joe Damato <ice799@...il.com>
To: linux-x86_64@...r.kernel.org, linux-newbie@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Joe Damato <ice799@...il.com>
Subject: [PATCH 05/12] x86: Refactor pack_gate for gate_desc
Rewrite pack_gate to use the newly add struct fields instead of bitmasks.
Signed-off-by: Joe Damato <ice799@...il.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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists