asm (lidt) question

From: Randy.Dunlap (rddunlap@osdl.org)
Date: Thu Jul 17 2003 - 17:28:19 EST


In arch/i386/kernel, inline asm for loading IDT (lidt) is used a few
times, but with slightly different constraints and output/input
definitions. Are these OK, equivalent, or what?

[rddunlap@dragon kernel]$ findc lidt
./cpu/common.c:484: __asm__ __volatile__("lidt %0": "=m" (idt_descr));
./traps.c:783: __asm__ __volatile__("lidt %0": "=m" (idt_descr));

vs.

./reboot.c:186: __asm__ __volatile__ ("lidt %0" : : "m" (real_mode_idt));
./reboot.c:261: __asm__ __volatile__("lidt %0": :"m" (no_idt));
./suspend.c:95: asm volatile ("lidt %0" :: "m" (saved_context.idt_limit));

Thanks,

--
~Randy  [yes, i've looked at the inline asm docs]
For Linux-2.6:
http://www.codemonkey.org.uk/post-halloween-2.5.txt
  or http://lwn.net/Articles/39901/
http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
-
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/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:31 EST