From: Brian Gerst <bgerst@didntduck.org>
To: Frederik Deweerdt <deweerdt@free.fr>
Cc: Glauber de Oliveira Costa <gcosta@redhat.com>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
ak@suse.de
Subject: Re: [PATCH] Use descriptor's functions instead of inline assembly
Date: Fri, 20 Jul 2007 19:05:00 -0400 [thread overview]
Message-ID: <46A13F9C.6020107@didntduck.org> (raw)
In-Reply-To: <20070720142319.GA23448@slug>
Frederik Deweerdt wrote:
> On Fri, Jul 20, 2007 at 10:56:01AM -0300, Glauber de Oliveira Costa wrote:
>> This patch provides a new set of functions for managing the descriptor
>> tables that can be used instead of putting the raw assembly in .c files.
>>
>> Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
>>
>> - asm volatile ("str %0" : "=m" (ctxt->tr));
>> + store_gdt((struct desc_ptr *)&ctxt->gdt_limit);
>> + store_idt((struct desc_ptr *)&ctxt->idt_limit);
>> + ctxt->tr = store_tr();
>>
> Would'nt a store_tr(&ctxt->tr) be more homogeneous here?
Not really. The task register is a segment number (a simple integer),
while the sidt/sgdt instructions write the cached descriptor to memory.
--
Brian Gerst
next prev parent reply other threads:[~2007-07-20 23:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 13:56 [PATCH] Use descriptor's functions instead of inline assembly Glauber de Oliveira Costa
2007-07-20 14:23 ` Frederik Deweerdt
2007-07-20 15:14 ` Glauber de Oliveira Costa
2007-07-20 23:05 ` Brian Gerst [this message]
2007-07-21 16:03 ` Jan Engelhardt
-- strict thread matches above, loose matches on Subject: below --
2007-07-20 18:14 Glauber de Oliveira Costa
2007-07-21 3:38 ` Chris Wright
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=46A13F9C.6020107@didntduck.org \
--to=bgerst@didntduck.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=deweerdt@free.fr \
--cc=gcosta@redhat.com \
--cc=linux-kernel@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