From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752583AbdBFRCP (ORCPT ); Mon, 6 Feb 2017 12:02:15 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:48814 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752483AbdBFRBp (ORCPT ); Mon, 6 Feb 2017 12:01:45 -0500 From: Boris Ostrovsky To: JGross@suse.com Cc: roger.pau@citrix.com, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com Subject: [PATCH v3 5/9] xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC for SCI Date: Mon, 6 Feb 2017 12:00:21 -0500 Message-Id: <1486400425-5356-6-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486400425-5356-1-git-send-email-boris.ostrovsky@oracle.com> References: <1486400425-5356-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since we are not using PIC and (at least currently) don't have IOAPIC we want to make sure that acpi_irq_model doesn't stay set to ACPI_IRQ_MODEL_PIC (which is the default value). If we allowed it to stay then acpi_os_install_interrupt_handler() would try (and fail) to request_irq() for PIC. Instead we set the model to ACPI_IRQ_MODEL_PLATFORM which will prevent this from happening. Signed-off-by: Boris Ostrovsky --- Changes in v3: * Moved update of acpi_irq_model to x86_init.oem.arch_setup() (i.e. after ACPI has been initialized so we know whether or not we have IOAPICs). Clarified comit message. * Moved xen_hvm_init_shared_info() into patch 4. arch/x86/xen/enlighten.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index d2144f7..6d406f3 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1672,6 +1672,16 @@ asmlinkage __visible void __init xen_start_kernel(void) } #ifdef CONFIG_XEN_PVH + +static void xen_pvh_arch_setup(void) +{ +#ifdef CONFIG_ACPI + /* Make sure we don't fall back to (default) ACPI_IRQ_MODEL_PIC. */ + if (nr_ioapics == 0) + acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM; +#endif +} + static void __init init_pvh_bootparams(void) { struct xen_memory_map memmap; @@ -1752,6 +1762,8 @@ void __init xen_prepare_pvh(void) wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32)); init_pvh_bootparams(); + + x86_init.oem.arch_setup = xen_pvh_arch_setup; } #endif -- 2.7.4