diff options
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 */ |