From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x225MP5V3ddJbKZS08TqIQpX+M0KAic0rmnXsbURU4+brzGfTrtnR78xfoEAJ1J8EkcbRXgTg ARC-Seal: i=1; a=rsa-sha256; t=1517256808; cv=none; d=google.com; s=arc-20160816; b=h5SifYd/s3cXP2PpQwr9+QUOPpezbWrmoJRaQNeeFG3IIlbkrds9Fs7D32nXpYk3y9 wpAkJfdRvpYjwaHgDZySHUTPTQE0htqHU3YFOzjqBQZvYtqkHzI+iy+n4Npb7xSP15L8 yek6qa79Z1xgcIBxv5pOpyJYAy72I5yYl+oeiPnBPIwDGsp85DvA4zU5NaxyRPr0yVUc eNP1evG5TDKqypSqsN6PfYqO9w7tVEbuvFkJuthIIVcG4ljpKvvPFiPgTicqfmtJ0ykS G2zcb/rq5n5RBYpIBY34Vki02Nd2cS4iqsxVVkAgOW2KsUezkVFipVGqRccKqVgM7wwU il+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=eHWOfA6gGsl3BD5g/WLY4GGJHUOylm8A7rmFDKeEx7U=; b=w4EKPNWlV5O6R6Nz+Q43b8JbedQAec21ulQ1IwGnJ1zrn7bkcBRtsbDkyzuqJebD4F VB4iSEujo2IjG0W5PmdIkYTTgiMnhFgyHvMtUas3ArP0RZxV5oXxNz/EjLtx/7boZ7wp ULxMD74RFGTwaFNoFnDX8PHraK3NOq1+mbx5qWwUTDetrHpW0xpwLn2QEoxDHp2YTcM/ 2jTDkuc70G8xwqqo3naC0xwAgzaNAUFNdsU6CpzkjIoAalvWfyBz+K2LLiOxlV+LrheV LjrMlMB5EcgTvQFP0E+y3Be31fze1jV/4OXHGDm9N7UxMYOF4gRRBNeoRqKMFoBcQSvH f45Q== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590959075486814848?= X-GMAIL-MSGID: =?utf-8?q?1590959075486814848?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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;