Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp233420rdb; Thu, 22 Feb 2024 01:51:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXJ1OiO07vq98rRPH6dZD3mEpivNHGOzJuxVtBQMZnOcy9FaYTrxxN/qs3do9+pctJWh3hZVPQ9yfAD5mUuL/5ZcynNW8ncGluPz0rhkg== X-Google-Smtp-Source: AGHT+IExnNCOIk1v15SJlwwnkNHHt4IKdQEeKh6TACzqT63TPGmW2EP9VxmdAJwzcLgWAp/RpI88 X-Received: by 2002:a05:6870:968a:b0:21e:57e6:bdeb with SMTP id o10-20020a056870968a00b0021e57e6bdebmr23066141oaq.13.1708595498578; Thu, 22 Feb 2024 01:51:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708595498; cv=pass; d=google.com; s=arc-20160816; b=GJyynVYVAOxLsSxmrSgxWOKQNYEscZiOgpl8xt5sX12cXzipdLINtw9SxRQiwvRDZn /6pNuHPjhmt7VLo5Ktkc8LRydRgAjE/TqVKbYiyQVG+ga0iTZBOtQXnKQReTf5iBjEZt 1xzZxCfHVPw38mcB7HiNGagOeFdEK/cdMUB2m1v1oW+cgsq/tgHSK4rCiyTwVK6Zt921 GBMyChLxVqKbjRWFU6bVEKsPv8BUF+PR2EVaJ6ZNSdNgdIjAgKRWQVhurS+QZpIMYfNK NC0T7vbidvX2ptB2SDZ0rIFvE+iM9R9q3XU7hIgBxeliun5NVv6n4cqacgbyu6h43MNU EvhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=N5lmOzx0yRi2/XwAqFHC6hGnJh71TahqIgyEdK9kraQ=; fh=dFS8CmY7kQWo9Q93PRmppznJx8PtGxVCstezyVheVjE=; b=vFV+T6QMJNd+6pOGnaqw5LMe9obhvLBZsIxEDoQ/NLZeFCLgyBuMd3WQ/JnKx1kp8k sQTKQIOAdMXjp1VzlPOL/weOkLN4ovfFn3Kw+ZifgYYU3/ddXXa5vDDrLN4mUtPbx5Ht e0nlNheE12LvtDUsDWouIQeqlZ36I/yeQw4RrbmK1KNgqPn6mxclfv4vfQixJdsYbzZM p2+uWSLZqDrEXY2DNqxpiZhR5zsudVx+jV40TXudOLgvcIKVx/jEXoO2G4IKwQjcGkOH kgmpNQF0FzxUuxjPF3SF1UV466QyU4Mov14klRqAe8UD1JdzKmRRJA59vLjO3D9NFEpg 0fEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-76244-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76244-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q125-20020a634383000000b005dd3d02be18si9895070pga.120.2024.02.22.01.51.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 01:51:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76244-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-76244-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76244-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A321AB210E1 for ; Thu, 22 Feb 2024 09:42:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D501C383B6; Thu, 22 Feb 2024 09:41:04 +0000 (UTC) Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 277EB38F88; Thu, 22 Feb 2024 09:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=176.9.242.62 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708594864; cv=none; b=igT+ptz4Szek3FSkHL3ngfu2lot0aEIrYt7Dokmz/mVYC/jCgCwcTDynINjbSrGlE0tVhhKiCzBAY+oPjBLsD+8Os2Zo9DG63EEuG/KI4eSOtlQmmGRm4V7jsFocJdKiD+lBahXRtHT8T3iKkotdnk9ULaflxc14qJbj6YsKj5s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708594864; c=relaxed/simple; bh=izL9Oq4UHurOw7CRpcyqlGslqY6aPINI+2U4okB5bTM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VC726LSgCorZvBJ2nw/nOuMqBvPyBoCQzTS1WCv3P17tnZ/+qnPks/w4bSdbtagWwq0/3QwQY3W/zakON9AfGt8W/CLtOcxc0yah5ZVBnutP2sJNaxTIHu7E+UYq8Ri28G1Pk8AdT5SG18toyzjQ5c/ydVG45nHcfzS4tJ/BO40= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=none smtp.mailfrom=h08.hostsharing.net; arc=none smtp.client-ip=176.9.242.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 55813100DE9CD; Thu, 22 Feb 2024 10:40:52 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 2F84A3210D; Thu, 22 Feb 2024 10:40:52 +0100 (CET) Date: Thu, 22 Feb 2024 10:40:52 +0100 From: Lukas Wunner To: Bjorn Helgaas Cc: Manivannan Sadhasivam , Bjorn Helgaas , Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , Krzysztof Wilczy??ski , Rob Herring , Mika Westerberg , quic_krichai@quicinc.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v3] PCI: Add D3 support for PCI bridges in DT based platforms Message-ID: <20240222094052.GA25101@wunner.de> References: <20240221051958.GA11693@thinkpad> <20240221182000.GA1533634@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240221182000.GA1533634@bhelgaas> User-Agent: Mutt/1.10.1 (2018-07-13) On Wed, Feb 21, 2024 at 12:20:00PM -0600, Bjorn Helgaas wrote: > 1) D3hot doesn't work per spec. This sounds like a hardware > defect in the device that should be a quirk based on > Vendor/Device ID, not something in DT. I don't actually know if > this is common, although there are several existing quirks that > mention issues with D3. My recollection is that putting Root Ports into D3hot on older x86 systems would raise MCEs, which is why pci_bridge_d3_possible() only allows D3hot in cases which are known to work (e.g. Thunderbolt controllers, machines with a recent BIOS). It was a conservative policy chosen to avoid regressions. I don't know if similar issues exist on non-ACPI systems. If they don't exist, platform_pci_bridge_d3() could just return true for all devicetree-based systems. Might be worth testing if any systems can be found which exhibit issues with such a policy. That would obviate the need to specify "supports-d3" in the devicetree. Quite the opposite, ports which are known not to work could be blacklisted. Of course if it turns out that's the majority then whitelisting via "supports-d3" is a better option. > 2) The platform doesn't support putting the bridge in D3cold and > back to D0. I don't understand this either because I assumed DT > would describe *hardware*, and "supports-d3" might imply the > presence of hardware power control, but doesn't tell us how to > operate it, and it must be up to a native driver to know how to > do it. I think we're putting devices into D3hot first before cutting power (i.e. putting them into D3cold), so knowing that D3hot is safe is basically a prerequisite for D3cold. Thanks, Lukas