Received: by 10.223.176.5 with SMTP id f5csp3400704wra; Mon, 29 Jan 2018 12:38:30 -0800 (PST) X-Google-Smtp-Source: AH8x224OjSo/jv6SXiBc7qnp1+bEdWcy7r2E204gks4o2RTyi4bWtjX/4C0hjfoLPqCKRxIlzJfr X-Received: by 10.99.125.78 with SMTP id m14mr22608528pgn.383.1517258310805; Mon, 29 Jan 2018 12:38:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517258310; cv=none; d=google.com; s=arc-20160816; b=PAatk6U/n6IDN/GhHNFedD0zIEwSWPMSaHKP/Ke29rybWhMlpfYrK0ANZyTrPH7SCx KGa2etX1fOme7NsoX6ouXedReckWzMrLNn0cxGmZqdtm1SLZNs0MfBbpZrIkV00p3rqh Or99QcrFWmXYzfv25Wn7Qr6Y83v7ccY/NYa8Ua8f8XkEasJR7ShSUM1felSLLjIXkGfK WPMiYlXcqMLMbzsyTAALQk1Yr7fI+fNqCqUgab27Dvh6WnyjlzR0O0Y54j75UTuAtwqA xH4tKPDKuKfmN1nZFSjPcIwFL6h8ovOX1HSXwhoDNl2X9QdbCWVoiekATTqhMDTpGLU8 lJ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=eHWOfA6gGsl3BD5g/WLY4GGJHUOylm8A7rmFDKeEx7U=; b=IGC4fiC9xXGgOT9DtRHwwNdW6us9WlYGvbhuSnTlgOh5CZt0U5kZZR2HBye+eLaB8x OrnafNyvXp33wO69VhaT7echtwSuMjnjIkrDdYyS45lGDFkK2iOeixaXx8VSlCypX+VA SYvZUieLZB4zlDiq8aB6Ucq2Y1QXOdtiA3NeVyFUfc4cK8RTGyukssul+gNiP3JUFa6/ GPKAZSppC05ToEZ7zH/1hAGoew8N3QJVJR7bxT3gYPxR0jnOeoyf2miN4EbKwVyyYiSO H9yK+uUJ2C8PKV419Z/SS7+4Ax//GxJTH7udQVv1c62zHxe7Yc5LBE4GgdFB13f4kVC9 5Cug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24-v6si9062019plj.50.2018.01.29.12.38.16; Mon, 29 Jan 2018 12:38:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754135AbeA2UN3 (ORCPT + 99 others); Mon, 29 Jan 2018 15:13:29 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37618 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932132AbeA2UN1 (ORCPT ); Mon, 29 Jan 2018 15:13:27 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F0F952EF8; Mon, 29 Jan 2018 13:01:32 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roland Dreier , "Rafael J. Wysocki" , Joerg Roedel Subject: [PATCH 4.4 27/74] ACPI / processor: Avoid reserving IO regions too early Date: Mon, 29 Jan 2018 13:56:32 +0100 Message-Id: <20180129123848.846157169@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123847.507563674@linuxfoundation.org> References: <20180129123847.507563674@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rafael J. Wysocki commit 86314751c7945fa0c67f459beeda2e7c610ca429 upstream. Roland Dreier reports that one of his systems cannot boot because of the changes made by commit ac212b6980d8 (ACPI / processor: Use common hotplug infrastructure). The problematic part of it is the request_region() call in acpi_processor_get_info() that used to run at module init time before the above commit and now it runs much earlier. Unfortunately, the region(s) reserved by it fall into a range the PCI subsystem attempts to reserve for AHCI IO BARs. As a result, the PCI reservation fails and AHCI doesn't work, while previously the PCI reservation would be made before acpi_processor_get_info() and it would succeed. That request_region() call, however, was overlooked by commit ac212b6980d8, as it is not necessary for the enumeration of the processors. It only is needed when the ACPI processor driver actually attempts to handle them which doesn't happen before loading the ACPI processor driver module. Therefore that call should have been moved from acpi_processor_get_info() into that module. Address the problem by moving the request_region() call in question out of acpi_processor_get_info() and use the observation that the region reserved by it is only needed if the FADT-based CPU throttling method is going to be used, which means that it should be sufficient to invoke it from acpi_processor_get_throttling_fadt(). Fixes: ac212b6980d8 (ACPI / processor: Use common hotplug infrastructure) Reported-by: Roland Dreier Tested-by: Roland Dreier Signed-off-by: Rafael J. Wysocki Acked-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/acpi_processor.c | 9 --------- drivers/acpi/processor_throttling.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -331,15 +331,6 @@ static int acpi_processor_get_info(struc pr->throttling.duty_width = acpi_gbl_FADT.duty_width; pr->pblk = object.processor.pblk_address; - - /* - * We don't care about error returns - we just try to mark - * these reserved so that nobody else is confused into thinking - * that this region might be unused.. - * - * (In particular, allocating the IO range for Cardbus) - */ - request_region(pr->throttling.address, 6, "ACPI CPU throttle"); } /* --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -676,6 +676,15 @@ static int acpi_processor_get_throttling if (!pr->flags.throttling) return -ENODEV; + /* + * We don't care about error returns - we just try to mark + * these reserved so that nobody else is confused into thinking + * that this region might be unused.. + * + * (In particular, allocating the IO range for Cardbus) + */ + request_region(pr->throttling.address, 6, "ACPI CPU throttle"); + pr->throttling.state = 0; duty_mask = pr->throttling.state_count - 1;