diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-05-02 17:27:10 (GMT) |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 17:27:10 (GMT) |
commit | 90a0a06aa81692028864c21f981905fda46b1208 (patch) | |
tree | 516528b328d5288ee057d1eff5491e2ba1b49af1 /include/asm-i386/io.h | |
parent | 52de74dd3994e165ef1b35c33d54655a6400e30c (diff) | |
download | linux-90a0a06aa81692028864c21f981905fda46b1208.tar.xz |
[PATCH] i386: rationalize paravirt wrappers
paravirt.c used to implement native versions of all low-level
functions. Far cleaner is to have the native versions exposed in the
headers and as inline native_XXX, and if !CONFIG_PARAVIRT, then simply
#define XXX native_XXX.
There are several nice side effects:
1) write_dt_entry() now takes the correct "struct Xgt_desc_struct *"
not "void *".
2) load_TLS is reintroduced to the for loop, not manually unrolled
with a #error in case the bounds ever change.
3) Macros become inlines, with type checking.
4) Access to the native versions is trivial for KVM, lguest, Xen and
others who might want it.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/asm-i386/io.h')
-rw-r--r-- | include/asm-i386/io.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 59fe616..e797586 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h @@ -250,19 +250,22 @@ static inline void flush_write_buffers(void) #endif /* __KERNEL__ */ +static inline void native_io_delay(void) +{ + asm volatile("outb %%al,$0x80" : : : "memory"); +} + #if defined(CONFIG_PARAVIRT) #include <asm/paravirt.h> #else -#define __SLOW_DOWN_IO "outb %%al,$0x80;" - static inline void slow_down_io(void) { - __asm__ __volatile__( - __SLOW_DOWN_IO + native_io_delay(); #ifdef REALLY_SLOW_IO - __SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO + native_io_delay(); + native_io_delay(); + native_io_delay(); #endif - : : ); } #endif |