[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-5fcee53ce705d49c766f8a302c7e93bdfc33c124@git.kernel.org>
Date: Thu, 15 Jan 2015 05:02:05 -0800
From: tip-bot for Jiang Liu <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: d.hatayama@...fujitsu.com, hpa@...ux.intel.com, bp@...en8.de,
benh@...nel.crashing.org, rientjes@...gle.com, oren@...lemp.com,
mingo@...nel.org, joro@...tes.org, jiang.liu@...ux.intel.com,
yinghai@...nel.org, JBeulich@...e.com, richard@....at,
linux-kernel@...r.kernel.org, tglx@...utronix.de, hpa@...or.com,
tony.luck@...el.com
Subject: [tip:x86/apic] x86/apic:
Only disable CPU x2apic mode when necessary
Commit-ID: 5fcee53ce705d49c766f8a302c7e93bdfc33c124
Gitweb: http://git.kernel.org/tip/5fcee53ce705d49c766f8a302c7e93bdfc33c124
Author: Jiang Liu <jiang.liu@...ux.intel.com>
AuthorDate: Wed, 7 Jan 2015 15:31:38 +0800
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 15 Jan 2015 11:24:23 +0100
x86/apic: Only disable CPU x2apic mode when necessary
When interrupt remapping hardware is not in X2APIC, CPU X2APIC mode
will be disabled if:
1) Maximum CPU APIC ID is bigger than 255
2) hypervisior doesn't support x2apic mode.
But we should only check whether hypervisor supports X2APIC mode when
hypervisor(CONFIG_HYPERVISOR_GUEST) is enabled, otherwise X2APIC will
always be disabled when CONFIG_HYPERVISOR_GUEST is disabled and IR
doesn't work in X2APIC mode.
Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
Tested-by: Joerg Roedel <joro@...tes.org>
Cc: Tony Luck <tony.luck@...el.com>
Cc: iommu@...ts.linux-foundation.org
Cc: H. Peter Anvin <hpa@...ux.intel.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Yinghai Lu <yinghai@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: David Rientjes <rientjes@...gle.com>
Cc: HATAYAMA Daisuke <d.hatayama@...fujitsu.com>
Cc: Jan Beulich <JBeulich@...e.com>
Cc: Richard Weinberger <richard@....at>
Cc: Oren Twaig <oren@...lemp.com>
Link: http://lkml.kernel.org/r/1420615903-28253-12-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
arch/x86/kernel/apic/apic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 04aec6b..2f16116 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1601,7 +1601,8 @@ static __init void try_to_enable_x2apic(int ir_stat)
* under KVM
*/
if (max_physical_apicid > 255 ||
- !hypervisor_x2apic_available()) {
+ (IS_ENABLED(CONFIG_HYPERVISOR_GUEST) &&
+ !hypervisor_x2apic_available())) {
pr_info("IRQ remapping doesn't support X2APIC mode, disable x2apic.\n");
if (x2apic_preenabled)
disable_x2apic();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists