lkml.org 
[lkml]   [2007]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Use descriptor's functions instead of inline assembly
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" 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.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-21 01:09    [W:0.077 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site