summaryrefslogtreecommitdiff
path: root/include/asm-i386/bugs.h
diff options
context:
space:
mode:
authorZachary Amsden <zach@vmware.com>2005-09-03 22:56:36 (GMT)
committerLinus Torvalds <torvalds@evo.osdl.org>2005-09-05 07:06:11 (GMT)
commit4bb0d3ec3e5b1e9e2399cdc641b3b6521ac9cdaa (patch)
tree5e8d7646f5c6a2cec990b6d591f230d496b20664 /include/asm-i386/bugs.h
parent2a0694d15d55d0deed928786a6393d5e45e37d76 (diff)
downloadlinux-fsl-qoriq-4bb0d3ec3e5b1e9e2399cdc641b3b6521ac9cdaa.tar.xz
[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>
Diffstat (limited to 'include/asm-i386/bugs.h')
-rw-r--r--include/asm-i386/bugs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h
index 6789fc2..ea54540 100644
--- a/include/asm-i386/bugs.h
+++ b/include/asm-i386/bugs.h
@@ -118,7 +118,10 @@ static void __init check_hlt(void)
printk("disabled\n");
return;
}
- __asm__ __volatile__("hlt ; hlt ; hlt ; hlt");
+ halt();
+ halt();
+ halt();
+ halt();
printk("OK.\n");
}