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/paravirt.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/paravirt.h')
-rw-r--r-- | include/asm-i386/paravirt.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index dd707d8c8270..e2c803fadb14 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -115,6 +115,12 @@ struct paravirt_ops | |||
115 | void (fastcall *io_delay)(void); | 115 | void (fastcall *io_delay)(void); |
116 | void (*const_udelay)(unsigned long loops); | 116 | void (*const_udelay)(unsigned long loops); |
117 | 117 | ||
118 | #ifdef CONFIG_X86_LOCAL_APIC | ||
119 | void (fastcall *apic_write)(unsigned long reg, unsigned long v); | ||
120 | void (fastcall *apic_write_atomic)(unsigned long reg, unsigned long v); | ||
121 | unsigned long (fastcall *apic_read)(unsigned long reg); | ||
122 | #endif | ||
123 | |||
118 | /* These two are jmp to, not actually called. */ | 124 | /* These two are jmp to, not actually called. */ |
119 | void (fastcall *irq_enable_sysexit)(void); | 125 | void (fastcall *irq_enable_sysexit)(void); |
120 | void (fastcall *iret)(void); | 126 | void (fastcall *iret)(void); |
@@ -270,6 +276,27 @@ static inline void slow_down_io(void) { | |||
270 | #endif | 276 | #endif |
271 | } | 277 | } |
272 | 278 | ||
279 | #ifdef CONFIG_X86_LOCAL_APIC | ||
280 | /* | ||
281 | * Basic functions accessing APICs. | ||
282 | */ | ||
283 | static inline void apic_write(unsigned long reg, unsigned long v) | ||
284 | { | ||
285 | paravirt_ops.apic_write(reg,v); | ||
286 | } | ||
287 | |||
288 | static inline void apic_write_atomic(unsigned long reg, unsigned long v) | ||
289 | { | ||
290 | paravirt_ops.apic_write_atomic(reg,v); | ||
291 | } | ||
292 | |||
293 | static inline unsigned long apic_read(unsigned long reg) | ||
294 | { | ||
295 | return paravirt_ops.apic_read(reg); | ||
296 | } | ||
297 | #endif | ||
298 | |||
299 | |||
273 | /* These all sit in the .parainstructions section to tell us what to patch. */ | 300 | /* These all sit in the .parainstructions section to tell us what to patch. */ |
274 | struct paravirt_patch { | 301 | struct paravirt_patch { |
275 | u8 *instr; /* original instructions */ | 302 | u8 *instr; /* original instructions */ |