[PATCH] use "normalized" syntax for lgdt/lidt

From: Randy.Dunlap
Date: Mon Sep 22 2003 - 14:21:59 EST



Hi,
Generates same code, but uses asm syntax that matches other
locations in arch/i386/.

Please apply.

--
~Randy


patch_name: lxdt_norm.patch
patch_version: 2003-09-22.12:21:55
author: Randy.Dunlap <rddunlap@xxxxxxxx>
description: use common (normalized) asm syntax for lidt/lgdt,
specifying that the operand is an input value
instead of output;
product: Linux
product_versions: 2.6.0-922
diffstat: =
arch/i386/kernel/cpu/common.c | 4 ++--
arch/i386/kernel/traps.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff -Naurp ./arch/i386/kernel/cpu/common.c~lxdt ./arch/i386/kernel/cpu/common.c
--- ./arch/i386/kernel/cpu/common.c~lxdt 2003-09-22 08:45:09.000000000 -0700
+++ ./arch/i386/kernel/cpu/common.c 2003-09-22 12:05:57.000000000 -0700
@@ -493,8 +493,8 @@ void __init cpu_init (void)
*/
memcpy(thread->tls_array, cpu_gdt_table[cpu], GDT_ENTRY_TLS_ENTRIES * 8);

- __asm__ __volatile__("lgdt %0": "=m" (cpu_gdt_descr[cpu]));
- __asm__ __volatile__("lidt %0": "=m" (idt_descr));
+ __asm__ __volatile__("lgdt %0" : : "m" (cpu_gdt_descr[cpu]));
+ __asm__ __volatile__("lidt %0" : : "m" (idt_descr));

/*
* Delete NT
diff -Naurp ./arch/i386/kernel/traps.c~lxdt ./arch/i386/kernel/traps.c
--- ./arch/i386/kernel/traps.c~lxdt 2003-09-22 08:45:12.000000000 -0700
+++ ./arch/i386/kernel/traps.c 2003-09-22 12:04:17.000000000 -0700
@@ -783,7 +783,7 @@ void __init trap_init_f00f_bug(void)
* it uses the read-only mapped virtual address.
*/
idt_descr.address = fix_to_virt(FIX_F00F_IDT);
- __asm__ __volatile__("lidt %0": "=m" (idt_descr));
+ __asm__ __volatile__("lidt %0" : : "m" (idt_descr));
}
#endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/