From: Joe Damato <ice799@gmail.com>
To: linux-x86_64@vger.kernel.org, linux-newbie@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Joe Damato <ice799@gmail.com>
Subject: [PATCH 05/12] x86: Refactor pack_gate for gate_desc
Date: Fri, 24 Oct 2008 20:15:25 -0700 [thread overview]
Message-ID: <a4c806abcf7a46c78aaff4e338fdbc1a06a56c88.1224903712.git.ice799@gmail.com> (raw)
In-Reply-To: <a9cabc5cabdb5a10631e2a6dc330c54826f2b210.1224903712.git.ice799@gmail.com>
In-Reply-To: <52f8491fb5d55c0171840b01638ea6db0a98f3be.1224903712.git.ice799@gmail.com>
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
next prev parent reply other threads:[~2008-10-25 3:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 3:15 [PATCH 00/12] x86: Cleanup idt, gdt/ldt/tss structs Joe Damato
2008-10-25 3:15 ` [PATCH 01/12] x86: Cleanup x86 descriptors, remove a/b fields from structs Joe Damato
2008-10-25 3:15 ` [PATCH 02/12] x86: Use new gate_struct for gate_desc Joe Damato
2008-10-25 3:15 ` [PATCH 03/12] x86: Cleanup usage of struct desc_struct Joe Damato
2008-10-25 3:15 ` [PATCH 04/12] x86: Add macros for gate_desc Joe Damato
2008-10-25 3:15 ` Joe Damato [this message]
2008-10-25 3:15 ` [PATCH 06/12] x86: Refactor pack_descriptor Joe Damato
2008-10-25 3:15 ` [PATCH 07/12] x86: Add a static initializer for IDTs Joe Damato
2008-10-25 3:15 ` [PATCH 08/12] x86: Use static intializer for IDT entries Joe Damato
2008-10-25 3:15 ` [PATCH 09/12] x86: Add static initiazlier for descriptors Joe Damato
2008-10-25 3:15 ` [PATCH 10/12] x86: Use static initializers " Joe Damato
2008-10-25 3:15 ` [PATCH 11/12] x86: Use macros for getting/setting descriptors Joe Damato
2008-10-25 3:15 ` [PATCH 12/12] x86: Use struct fields instead of bitmasks Joe Damato
2008-10-29 12:56 ` Jeremy Fitzhardinge
2008-10-29 12:58 ` [PATCH 09/12] x86: Add static initiazlier for descriptors Jeremy Fitzhardinge
2008-10-29 12:54 ` [PATCH 04/12] x86: Add macros for gate_desc Jeremy Fitzhardinge
2008-10-29 12:52 ` [PATCH 03/12] x86: Cleanup usage of struct desc_struct Jeremy Fitzhardinge
2008-10-29 12:53 ` [PATCH 02/12] x86: Use new gate_struct for gate_desc Jeremy Fitzhardinge
2008-10-25 5:40 ` [PATCH 00/12] x86: Cleanup idt, gdt/ldt/tss structs Willy Tarreau
2008-10-27 10:57 ` Ingo Molnar
2008-10-25 9:39 ` walter harms
2008-10-27 10:55 ` Ingo Molnar
2008-10-27 14:34 ` H. Peter Anvin
2008-10-27 21:15 ` Joe Damato
2008-10-27 23:02 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4c806abcf7a46c78aaff4e338fdbc1a06a56c88.1224903712.git.ice799@gmail.com \
--to=ice799@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
--cc=linux-x86_64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®