Steven Rostedt
2007-Apr-18 13:02 UTC
[RFC/PATCH PV_OPS X86_64 04/17] pavarvirt_ops - apci header updates
plain text document attachment (xx-paravirt-apic-header.patch) This patch updates the apic header file for switching apic_read and write for use with paravirt ops. Signed-off-by: Steven Rostedt srostedt@redhat.com Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Index: clean-start/include/asm-x86_64/apic.h ==================================================================--- clean-start.orig/include/asm-x86_64/apic.h +++ clean-start/include/asm-x86_64/apic.h @@ -37,16 +37,24 @@ struct pt_regs; * Basic functions accessing APICs. */ -static __inline void apic_write(unsigned long reg, unsigned int v) +static __inline void native_apic_write(unsigned long reg, unsigned int v) { *((volatile unsigned int *)(APIC_BASE+reg)) = v; } -static __inline unsigned int apic_read(unsigned long reg) +static __inline unsigned int native_apic_read(unsigned long reg) { return *((volatile unsigned int *)(APIC_BASE+reg)); } +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else +#define apic_write native_apic_write +#define apic_read native_apic_read + +#endif /* CONFIG_PARAVIRT */ + static __inline__ void apic_wait_icr_idle(void) { while (apic_read( APIC_ICR ) & APIC_ICR_BUSY) --