Skip to content

Commit 0fa0757

Browse files
KAGA-KOKOhansendc
authored andcommitted
x86/apic: Wrap apic->native_eoi() into a helper
Prepare for converting the hotpath APIC callbacks to static calls. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Michael Kelley <[email protected]> Tested-by: Sohil Mehta <[email protected]> Tested-by: Juergen Gross <[email protected]> # Xen PV (dom0 and unpriv. guest)
1 parent 670c04a commit 0fa0757

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

arch/x86/include/asm/apic.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ static inline void apic_eoi(void)
359359
apic->eoi();
360360
}
361361

362+
static inline void apic_native_eoi(void)
363+
{
364+
apic->native_eoi();
365+
}
366+
362367
static inline u64 apic_icr_read(void)
363368
{
364369
return apic->icr_read();
@@ -397,6 +402,7 @@ static inline void apic_icr_write(u32 low, u32 high) { }
397402
static inline void apic_wait_icr_idle(void) { }
398403
static inline u32 safe_apic_wait_icr_idle(void) { return 0; }
399404
static inline void apic_set_eoi_cb(void (*eoi)(void)) {}
405+
static inline void apic_native_eoi(void) { WARN_ON_ONCE(1); }
400406

401407
#endif /* CONFIG_X86_LOCAL_APIC */
402408

arch/x86/kernel/kvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static notrace void kvm_guest_apic_eoi_write(void)
343343
*/
344344
if (__test_and_clear_bit(KVM_PV_EOI_BIT, this_cpu_ptr(&kvm_apic_eoi)))
345345
return;
346-
apic->native_eoi();
346+
apic_native_eoi();
347347
}
348348

349349
static void kvm_guest_cpu_init(void)

0 commit comments

Comments
 (0)