]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/x86/include/asm/apic.h
x86/apic: Avoid open coded x2apic detection
authorThomas Gleixner <tglx@linutronix.de>
Thu, 15 Jan 2015 21:22:09 +0000 (21:22 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 22 Jan 2015 14:10:54 +0000 (15:10 +0100)
commit8d80696060eedf49c080c0f2cf39a20ae7e787f9
tree1b6282a1fc1305aec1ccba89515078b32914eb24
parente901176046e6729e002839d7296f27f17599ccb8
x86/apic: Avoid open coded x2apic detection

enable_IR_x2apic() grew a open coded x2apic detection. Implement a
proper helper function which shares the code with the already existing
x2apic_enabled().

Made it use rdmsrl_safe as suggested by Boris.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/20150115211702.285038186@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/apic.h
arch/x86/kernel/apic/apic.c