From patchwork Tue Jul 18 15:04:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9848685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 65275602C8 for ; Tue, 18 Jul 2017 15:05:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4ED40285BB for ; Tue, 18 Jul 2017 15:05:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4322F285C0; Tue, 18 Jul 2017 15:05:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC18A285C9 for ; Tue, 18 Jul 2017 15:05:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751689AbdGRPFL (ORCPT ); Tue, 18 Jul 2017 11:05:11 -0400 Received: from mga02.intel.com ([134.134.136.20]:57267 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584AbdGRPFK (ORCPT ); Tue, 18 Jul 2017 11:05:10 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2017 08:04:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,378,1496127600"; d="scan'208";a="1173949936" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 18 Jul 2017 08:04:27 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 31489248; Tue, 18 Jul 2017 18:04:23 +0300 (EEST) From: Andy Shevchenko To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Hanjun Guo , linux-acpi@vger.kernel.org, Geert Uytterhoeven Cc: Andy Shevchenko Subject: [PATCH v3 5/5] ACPI / boot: Don't handle SCI on HW reduced platforms Date: Tue, 18 Jul 2017 18:04:20 +0300 Message-Id: <20170718150420.61600-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170718150420.61600-1-andriy.shevchenko@linux.intel.com> References: <20170718150420.61600-1-andriy.shevchenko@linux.intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As per note in 5.2.9 Fixed ACPI Description Table (FADT) chapter of ACPI specification OSPM will ignore fields related to the ACPI HW register interface, one of which is SCI_INT. Follow the spec and ignore any configuration done for interrupt line defined by SCI_INT if FADT specifies HW reduced platform. Signed-off-by: Andy Shevchenko --- arch/x86/kernel/acpi/boot.c | 4 ++-- drivers/acpi/bus.c | 2 +- drivers/acpi/osl.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 71c0feae60a4..c767efa53ee0 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -489,7 +489,7 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header, acpi_table_print_madt_entry(header); - if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) { + if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt && !acpi_gbl_reduced_hardware) { acpi_sci_ioapic_setup(intsrc->source_irq, intsrc->inti_flags & ACPI_MADT_POLARITY_MASK, (intsrc->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2, @@ -1184,7 +1184,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) * If BIOS did not supply an INT_SRC_OVR for the SCI * pretend we got one so we can set the SCI flags. */ - if (!acpi_sci_override_gsi) + if (!acpi_sci_override_gsi && !acpi_gbl_reduced_hardware) acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0, acpi_gbl_FADT.sci_interrupt); diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index af74b420ec83..1f3dde3bc8f8 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1035,7 +1035,7 @@ void __init acpi_early_init(void) } #ifdef CONFIG_X86 - if (!acpi_ioapic) { + if (!acpi_ioapic && !acpi_gbl_reduced_hardware) { /* compatible (0) means level (3) */ if (!(acpi_sci_flags & ACPI_MADT_TRIGGER_MASK)) { acpi_sci_flags &= ~ACPI_MADT_TRIGGER_MASK; diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index db78d353bab1..4d84118a000b 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -553,7 +553,7 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler, * ACPI interrupts different from the SCI in our copy of the FADT are * not supported. */ - if (gsi != acpi_gbl_FADT.sci_interrupt) + if (gsi != acpi_gbl_FADT.sci_interrupt || acpi_gbl_reduced_hardware) return AE_BAD_PARAMETER; if (acpi_irq_handler)