Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756740AbbKRTAi (ORCPT ); Wed, 18 Nov 2015 14:00:38 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:59454 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755611AbbKRTAg (ORCPT ); Wed, 18 Nov 2015 14:00:36 -0500 Subject: Re: [PATCH] pci: completely disable aspm if it's unsupported To: Bjorn Helgaas References: <1447856703-2566-1-git-send-email-jbacik@fb.com> <20151118184038.GA4462@localhost> CC: , , , , , , Matthew Garrett From: Josef Bacik Message-ID: <564CCAC2.5050600@fb.com> Date: Wed, 18 Nov 2015 14:00:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20151118184038.GA4462@localhost> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-11-18_13:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2371 Lines: 54 On 11/18/2015 01:40 PM, Bjorn Helgaas wrote: > [+cc Matthew] > > Hi Josef, > > On Wed, Nov 18, 2015 at 09:25:03AM -0500, Josef Bacik wrote: >> We have some hardware that takes about 30 seconds to setup common clocks for >> ASPM, but our bios'es don't actually allow ASPM. It seems we had this thing in >> place where we would disable ASPM after the pci bus probe so that we would make >> sure that pre pcie 1.1 devices would be properly skipped during initialization. >> This is because the mechanism to disable ASPM doesn't actually disable the >> setting up of the link state stuff, it just keeps us from changing the link >> state after the fact. So instead make it so that when we call pcie_no_aspm() >> that we disable ASPM completley, that is we skip setting up the link state and >> everything. This way we avoid the costly setup for a feature we cannot support >> in the first place and we also make sure we are safe from future tampering with >> the ASPM link state. Thanks, > > Can you clarify what your BIOS does? I assume it's an x86 ACPI BIOS. > Does it enable ASPM before handing off to the OS? Does it set the > ACPI_FADT_NO_ASPM bit? (ACPI spec 5.0, sec 5.2.9.3) > > You're changing the _OSC failure path. Why does _OSC fail? I know > there is some sort of unresolved problem there > (https://bugzilla.kernel.org/show_bug.cgi?id=94661); maybe you're > tripping over that? > This is what I see in dmesg [ 8.647398] acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI] [ 8.647716] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM So seems like the same bug? > It seems like you're proposing to reverse what Matthew just did with > 387d37577fdd ("PCI: Don't clear ASPM bits when the FADT declares it's > unsupported"). > It looks to me I'm doing what Matthew set out to do, only with a bigger hammer ;). His patch still allowed the initialization of the ASPM stuff, like setting up the clocks and such, but then made it so we couldn't change the ASPM state at all. My patch goes the step further of not even doing the initialization stuff. Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/