]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] i386: inline asm cleanup
authorZachary Amsden <zach@vmware.com>
Sat, 3 Sep 2005 22:56:36 +0000 (15:56 -0700)
committerLinus Torvalds <torvalds@evo.osdl.org>
Mon, 5 Sep 2005 07:06:11 +0000 (00:06 -0700)
commit4bb0d3ec3e5b1e9e2399cdc641b3b6521ac9cdaa
tree5e8d7646f5c6a2cec990b6d591f230d496b20664
parent2a0694d15d55d0deed928786a6393d5e45e37d76
[PATCH] i386: inline asm cleanup

i386 Inline asm cleanup.  Use cr/dr accessor functions.

Also, a potential bugfix.  Also, some CR accessors really should be volatile.
Reads from CR0 (numeric state may change in an exception handler), writes to
CR4 (flipping CR4.TSD) and reads from CR2 (page fault) prevent instruction
re-ordering.  I did not add memory clobber to CR3 / CR4 / CR0 updates, as it
was not there to begin with, and in no case should kernel memory be clobbered,
except when doing a TLB flush, which already has memory clobber.

I noticed that page invalidation does not have a memory clobber.  I can't find
a bug as a result, but there is definitely a potential for a bug here:

#define __flush_tlb_single(addr) \
__asm__ __volatile__("invlpg %0": :"m" (*(char *) addr))

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
15 files changed:
arch/i386/kernel/cpu/common.c
arch/i386/kernel/cpu/cpufreq/longhaul.c
arch/i386/kernel/cpu/cyrix.c
arch/i386/kernel/efi.c
arch/i386/kernel/machine_kexec.c
arch/i386/kernel/process.c
arch/i386/kernel/smp.c
arch/i386/mm/fault.c
arch/i386/mm/pageattr.c
arch/i386/power/cpu.c
include/asm-i386/agp.h
include/asm-i386/bugs.h
include/asm-i386/processor.h
include/asm-i386/system.h
include/asm-i386/xor.h