Commit 82f6c9cd authored by Paolo Bonzini's avatar Paolo Bonzini

Merge branch 'x86/for-kvm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into HEAD

This merges a cleanup of asm/apic.h, which is needed by the KVM patches
to support VT-d posted interrupts.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parents d2922422 e02ae387
...@@ -115,6 +115,59 @@ static inline bool apic_is_x2apic_enabled(void) ...@@ -115,6 +115,59 @@ static inline bool apic_is_x2apic_enabled(void)
return msr & X2APIC_ENABLE; return msr & X2APIC_ENABLE;
} }
extern void enable_IR_x2apic(void);
extern int get_physical_broadcast(void);
extern int lapic_get_maxlvt(void);
extern void clear_local_APIC(void);
extern void disconnect_bsp_APIC(int virt_wire_setup);
extern void disable_local_APIC(void);
extern void lapic_shutdown(void);
extern void sync_Arb_IDs(void);
extern void init_bsp_APIC(void);
extern void setup_local_APIC(void);
extern void init_apic_mappings(void);
void register_lapic_address(unsigned long address);
extern void setup_boot_APIC_clock(void);
extern void setup_secondary_APIC_clock(void);
extern int APIC_init_uniprocessor(void);
#ifdef CONFIG_X86_64
static inline int apic_force_enable(unsigned long addr)
{
return -1;
}
#else
extern int apic_force_enable(unsigned long addr);
#endif
extern int apic_bsp_setup(bool upmode);
extern void apic_ap_setup(void);
/*
* On 32bit this is mach-xxx local
*/
#ifdef CONFIG_X86_64
extern int apic_is_clustered_box(void);
#else
static inline int apic_is_clustered_box(void)
{
return 0;
}
#endif
extern int setup_APIC_eilvt(u8 lvt_off, u8 vector, u8 msg_type, u8 mask);
#else /* !CONFIG_X86_LOCAL_APIC */
static inline void lapic_shutdown(void) { }
#define local_apic_timer_c2_ok 1
static inline void init_apic_mappings(void) { }
static inline void disable_local_APIC(void) { }
# define setup_boot_APIC_clock x86_init_noop
# define setup_secondary_APIC_clock x86_init_noop
#endif /* !CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_X86_X2APIC #ifdef CONFIG_X86_X2APIC
/* /*
* Make previous memory operations globally visible before * Make previous memory operations globally visible before
...@@ -186,67 +239,14 @@ static inline int x2apic_enabled(void) ...@@ -186,67 +239,14 @@ static inline int x2apic_enabled(void)
} }
#define x2apic_supported() (cpu_has_x2apic) #define x2apic_supported() (cpu_has_x2apic)
#else #else /* !CONFIG_X86_X2APIC */
static inline void check_x2apic(void) { } static inline void check_x2apic(void) { }
static inline void x2apic_setup(void) { } static inline void x2apic_setup(void) { }
static inline int x2apic_enabled(void) { return 0; } static inline int x2apic_enabled(void) { return 0; }
#define x2apic_mode (0) #define x2apic_mode (0)
#define x2apic_supported() (0) #define x2apic_supported() (0)
#endif #endif /* !CONFIG_X86_X2APIC */
extern void enable_IR_x2apic(void);
extern int get_physical_broadcast(void);
extern int lapic_get_maxlvt(void);
extern void clear_local_APIC(void);
extern void disconnect_bsp_APIC(int virt_wire_setup);
extern void disable_local_APIC(void);
extern void lapic_shutdown(void);
extern void sync_Arb_IDs(void);
extern void init_bsp_APIC(void);
extern void setup_local_APIC(void);
extern void init_apic_mappings(void);
void register_lapic_address(unsigned long address);
extern void setup_boot_APIC_clock(void);
extern void setup_secondary_APIC_clock(void);
extern int APIC_init_uniprocessor(void);
#ifdef CONFIG_X86_64
static inline int apic_force_enable(unsigned long addr)
{
return -1;
}
#else
extern int apic_force_enable(unsigned long addr);
#endif
extern int apic_bsp_setup(bool upmode);
extern void apic_ap_setup(void);
/*
* On 32bit this is mach-xxx local
*/
#ifdef CONFIG_X86_64
extern int apic_is_clustered_box(void);
#else
static inline int apic_is_clustered_box(void)
{
return 0;
}
#endif
extern int setup_APIC_eilvt(u8 lvt_off, u8 vector, u8 msg_type, u8 mask);
#else /* !CONFIG_X86_LOCAL_APIC */
static inline void lapic_shutdown(void) { }
#define local_apic_timer_c2_ok 1
static inline void init_apic_mappings(void) { }
static inline void disable_local_APIC(void) { }
# define setup_boot_APIC_clock x86_init_noop
# define setup_secondary_APIC_clock x86_init_noop
#endif /* !CONFIG_X86_LOCAL_APIC */
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
#define SET_APIC_ID(x) (apic->set_apic_id(x)) #define SET_APIC_ID(x) (apic->set_apic_id(x))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment