diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2006-12-06 20:14:08 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-06 20:14:08 -0500 |
commit | 13623d79309dd82e1964458fa017979d16f33fa8 (patch) | |
tree | b994f0ba2cd7aec284e4132cf00acc0fecaa887e /include/asm-i386/apic.h | |
parent | 6020c8f315709a508b027ef6749e85b125190947 (diff) |
[PATCH] paravirt: Add APIC accessors to paravirt-ops.
Add APIC accessors to paravirt-ops. Unfortunately, we need two write
functions, as some older broken hardware requires workarounds for
Pentium APIC errata - this is the purpose of apic_write_atomic.
AK: replaced __inline with inline
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'include/asm-i386/apic.h')
-rw-r--r-- | include/asm-i386/apic.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index b9529578fc37..41a44319905f 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -37,18 +37,27 @@ extern void generic_apic_probe(void); | |||
37 | /* | 37 | /* |
38 | * Basic functions accessing APICs. | 38 | * Basic functions accessing APICs. |
39 | */ | 39 | */ |
40 | #ifdef CONFIG_PARAVIRT | ||
41 | #include <asm/paravirt.h> | ||
42 | #else | ||
43 | #define apic_write native_apic_write | ||
44 | #define apic_write_atomic native_apic_write_atomic | ||
45 | #define apic_read native_apic_read | ||
46 | #endif | ||
40 | 47 | ||
41 | static __inline void apic_write(unsigned long reg, unsigned long v) | 48 | static __inline fastcall void native_apic_write(unsigned long reg, |
49 | unsigned long v) | ||
42 | { | 50 | { |
43 | *((volatile unsigned long *)(APIC_BASE+reg)) = v; | 51 | *((volatile unsigned long *)(APIC_BASE+reg)) = v; |
44 | } | 52 | } |
45 | 53 | ||
46 | static __inline void apic_write_atomic(unsigned long reg, unsigned long v) | 54 | static __inline fastcall void native_apic_write_atomic(unsigned long reg, |
55 | unsigned long v) | ||
47 | { | 56 | { |
48 | xchg((volatile unsigned long *)(APIC_BASE+reg), v); | 57 | xchg((volatile unsigned long *)(APIC_BASE+reg), v); |
49 | } | 58 | } |
50 | 59 | ||
51 | static __inline unsigned long apic_read(unsigned long reg) | 60 | static __inline fastcall unsigned long native_apic_read(unsigned long reg) |
52 | { | 61 | { |
53 | return *((volatile unsigned long *)(APIC_BASE+reg)); | 62 | return *((volatile unsigned long *)(APIC_BASE+reg)); |
54 | } | 63 | } |