Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5548242rdb; Wed, 13 Dec 2023 11:49:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2fWvVtpt1sg3B5ZBrL2K7triTBxw4aPvKUSR3mx38hDSNrwWhanMYv9Y0qfdXJLIXI7Ub X-Received: by 2002:a05:6870:9f14:b0:1fb:75a:de6f with SMTP id xl20-20020a0568709f1400b001fb075ade6fmr11158001oab.93.1702496950007; Wed, 13 Dec 2023 11:49:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702496949; cv=none; d=google.com; s=arc-20160816; b=wLlX/+BYZHjtibK/yeDdSiUnufO2Jb8ucu0/xRelK7hxDcmaKtTw/v1ugXpQg/tGHW FGyxKVzTbNnPDKvHEV54JhR2dcQsd19LO2mgESGb7Wb5ZgaL6dRfKCqyKebm/5X9FlRk FaEJ55DXOH9ZBVfMNTHm8Yzx5npA3GMMBBelMBrZ9YJlNEd+oWwYarKXGKPxGEJW6UhU 8ARWf00epuz86+S8qbECbsm3BH5K8KdXS2vZk9/ykTsR4EVumghEdnIs8ZlSKuR6R3ST l8LR6atR77znbmexnQk4fO2fNgii9skq/kK9xYGz9U3deyQL+wkKEM1PRldpb6as40s9 8YCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :cc:to:reply-to:from:subject:message-id:dkim-signature; bh=aA4k2O4QxXBzZN4A6Xdv+7/OCMnepuyXKc9VbGVRZF4=; fh=6d7+wOiPGNLJmjqYRNa1gK3Ccn41tNfyceueM6G0VPM=; b=C6hex74t6OMDi5HmtOuG+lFIOcyyEqnCMjO8sstTstTlbgPHvtNnLfE5Q933vNOOol oarWaL7B30jynCiLzgnjiRm9MpvxanXMtayoOghhG4kxjUtn1Ig5DYgPahzH0ZrkWBmN /oEWM2ktE/F7URDNqQR7r3qUPSnlzEIK5EwhmymjlxENNXYQ9Q12hAFL6gbJcTCP6RrN QATC/qxrNoXWIgzdTZxgOJ8jiXzA3w9t0b48M5Vk2tfAMAbc+OMQVsrtahRQqYH5UYi7 FTvEErLVNTmeUd0UvVaHwDrsYDT8Ak2p+eCMp2k1sqWa5cca/sefzueOgYG04wX90tDW ZkzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UYs4BEp1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id b11-20020a6567cb000000b005c605cdc2b5si9771913pgs.186.2023.12.13.11.49.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 11:49:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UYs4BEp1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3F2A680BD513; Wed, 13 Dec 2023 11:49:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378858AbjLMTsh (ORCPT + 99 others); Wed, 13 Dec 2023 14:48:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233658AbjLMTsh (ORCPT ); Wed, 13 Dec 2023 14:48:37 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BA429C; Wed, 13 Dec 2023 11:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702496923; x=1734032923; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=aA4k2O4QxXBzZN4A6Xdv+7/OCMnepuyXKc9VbGVRZF4=; b=UYs4BEp19kcR+yRy4vlWPCepMONrNnvgdWQxqvAroSEIsnlpwUNM7yjB fK8QwVvVbNnToOWmAxThBEBYZzBUcsNuE5fkW4teXDbDStqlKgbu4GzT0 mqDF+vXKGFMUSwtLUXx33CkkgB1oBKXJ7MNJzuQv/7xADOYqbHssuxAwW 3hE8T7xLHCM4woBfHZcYf7nn4dDughXWE2o6tbDjYhtpZ8JXOfcR/YiGr L9pBhuoY0TqQg3L1MJNcCkV6zcDdirnz8LsS/BwF57Z7kHxdnq9kt4cRB ZV588yHRZb1+6NM7fbc7EDlYcTyPJLHTapsjehjYjn0z5oPCl0cl2XcKA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="8412616" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="8412616" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 11:48:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="864730997" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="864730997" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 11:48:42 -0800 Received: from acharris-mobl.amr.corp.intel.com (unknown [10.255.228.183]) by linux.intel.com (Postfix) with ESMTP id DFF9B580DA9; Wed, 13 Dec 2023 11:48:41 -0800 (PST) Message-ID: <970144d9b5c3d36dbd0d50f01c1c4355cd42de89.camel@linux.intel.com> Subject: Re: [PATCH v2 1/6] PCI/ASPM: Add locked helper for enabling link state From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: Bjorn Helgaas , Kai-Heng Feng Cc: Johan Hovold , Lorenzo Pieralisi , Krzysztof =?UTF-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Andy Gross , Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , Rob Herring , Nirmal Patel , Jonathan Derrick , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Manivannan Sadhasivam Date: Wed, 13 Dec 2023 11:48:41 -0800 In-Reply-To: <20231212212707.GA1021099@bhelgaas> References: <20231212212707.GA1021099@bhelgaas> Organization: David E. Box Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 11:49:07 -0800 (PST) On Tue, 2023-12-12 at 15:27 -0600, Bjorn Helgaas wrote: > On Tue, Dec 12, 2023 at 11:48:27AM +0800, Kai-Heng Feng wrote: > > On Fri, Dec 8, 2023 at 4:47=E2=80=AFAM Bjorn Helgaas wrote: > > ... >=20 > > > I hope we can obsolete this whole idea someday.=C2=A0 Using pci_walk_= bus() > > > in qcom and vmd to enable ASPM is an ugly hack to work around this > > > weird idea that "the OS isn't allowed to enable more ASPM states than > > > the BIOS did because the BIOS might have left ASPM disabled because i= t > > > knows about hardware issues."=C2=A0 More history at > > > https://lore.kernel.org/linux-pci/20230615070421.1704133-1-kai.heng.f= eng@canonical.com/T/#u > > >=20 > > > I think we need to get to a point where Linux enables all supported > > > ASPM features by default.=C2=A0 If we really think x86 BIOS assumes a= n > > > implicit contract that the OS will never enable ASPM more > > > aggressively, we might need some kind of arch quirk for that. > >=20 > > The reality is that PC ODM toggles ASPM to workaround hardware > > defects, assuming that OS will honor what's set by the BIOS. > > If ASPM gets enabled for all devices, many devices will break. >=20 > That's why I mentioned some kind of arch quirk.=C2=A0 Maybe we're forced = to > do that for x86, for instance.=C2=A0 But even that is a stop-gap. >=20 > The idea that the BIOS ASPM config is some kind of handoff protocol is > really unsupportable. To be clear, you are not talking about a situation where ACPI_FADT_NO_ASPM = or _OSC PCIe disallow OS ASPM control, right? Everyone agrees that this should= be honored? The question is what to do by default when the OS is not restricte= d by these mechanisms? Reading the mentioned thread, I too think that using the BIOS config as the default would be the safest option, but only to avoid breaking systems, not because of an implied contract between the BIOS and OS. However, enabling a= ll capable ASPM features is the ideal option. If the OS isn't limited by ACPI_FADT_NO_ASPM or _OSC PCIe, then ASPM enabling is fully under its contr= ol. If this doesn't work for some devices then they are broken and need a quirk= . David