Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2104335rbb; Tue, 27 Feb 2024 10:41:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW98yNorRozG9av7XI/aoVTbydRvKzGer0T0T2bTJGfdWJMAx8KH6m6KdFE6tD1CVD/vQLIm7XzoDXrjjt6qHzwS8JmxkOLiEYrlGFV5Q== X-Google-Smtp-Source: AGHT+IGhJVkFlg6ZPB7BPQA4bN4tqID+wwxryDBBccMKQ59JhwRVDGeXdQpCAtHLDUkVpxhEcK25 X-Received: by 2002:a05:6808:1204:b0:3c1:786e:85ce with SMTP id a4-20020a056808120400b003c1786e85cemr3125975oil.56.1709059286853; Tue, 27 Feb 2024 10:41:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709059286; cv=pass; d=google.com; s=arc-20160816; b=Bt3OPnTd0PeeJanixhcJbPR7M0WmjjVbPBSte+Q6HMoRhcTPvMihIJMAqNtSuW4R8t BcIKxAytakWiy+IXqv08skM+14nRFpYfV1Zto19WJ5ESleZkUem2aC96o4PtEb9X8rMH pomctSrrWEqgMGnLqPhpvdkZQ6BaADs+aUdy4ued9Um5cJz3gwLATwzuAWEFIvGIasaX XbHE7pAFdETi5HoLqJdNGQIrTxkE/EUTfqqNieU4GKXrdSz/5eEnSSzwBhElVR0i6qG0 5kyBHJGUWudcJZcxREkOPMnh3Kvi+MHtwLBcodXq4EIOA1oe4anXW0xLRUHBrCG2Z5Ju HghA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SsuS6sOVug3YrAmxtUqH/1NuaIV6/SsNBHUd/9g2JPc=; fh=Lk8kg7nQKr0xMYXhVJo6UV17f2QL6VbCu7GSRMM8mx4=; b=DMK/z/cb8XIu74iU9rAIkCJN2f7VwFxj3M1Mph+XxD9HGxgghdwbFbfPr1Mfgfu0F/ 6JU7KVQIGPrMsK5zWGZJ7nw8J05nx6dVSfmCR9S/M2T3Rm4EnSRJ5Ogqlq1+wWiGgcbf 7uRsAPjXpmCZqZ4B4kgX55jhSarSIrR3Ol2L7eNh+piKva6aVtP1GEenBHJsSZoHzmp2 3dBLv6PkSi4164CLoM7uHqF1XrlWc5j5exWzOpZDOSTwEFkAQzhDYQ1zmEvO4e4uhOIA y81Yo6dt2pA+6ihjgH8cPMcoJUWaO/hHOkbeYNnryOhQub7vkDl+Hp4NlqIGQ1NvJ0vf z7Wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pa9Mfe3T; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-83851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d2-20020a05622a15c200b0042e8c83afe0si4356209qty.389.2024.02.27.10.41.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:41:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pa9Mfe3T; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-83851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D9AE31C2443A for ; Tue, 27 Feb 2024 18:40:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6116D481A8; Tue, 27 Feb 2024 18:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Pa9Mfe3T" Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 082A03E48E for ; Tue, 27 Feb 2024 18:40:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059226; cv=none; b=W4qt3RtkoGDW9rvnIPXSd1VBEKpEBmSJCm26nJVSzCZu9ON/SyoFbe6itarl/dfg6tAUO2U7uA8v0xD54b1EARb3K6p0KLvzB71/WjtH3S9gRYDWz9yIfiuNt9Nqb5Z1vsDPKkvK5HzWMprS5uzCPF85F8EDGuZpD3+h5uug3ls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059226; c=relaxed/simple; bh=ViTSaMCoFmUnUvNaRtzDSioopiJ0Msh1q2S12nrTU9k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C+G83Rpr/x4951DNcpeYFhKw62O+BXGWg2MTmYqlS1n6u92+xDJVYXPpA9Oy1s3P7fLFTBBO0O+C80Yg/SqWezYmTQvygorBQPIzrWt7cVxmzhFWYWMKy5RXh67YCybSdgamMR5kxp1d/uwh1uD8yfepQjK5FGWXfr92WoLv22w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Pa9Mfe3T; arc=none smtp.client-ip=209.85.166.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-36517cfd690so12906415ab.2 for ; Tue, 27 Feb 2024 10:40:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709059224; x=1709664024; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=SsuS6sOVug3YrAmxtUqH/1NuaIV6/SsNBHUd/9g2JPc=; b=Pa9Mfe3TsC4mP/Pgeg7sN2zLEYA/uFPKLEn7+v9GtwI7AfMCY+WDUC70Mu4bjS/o2i rjdgWgk4zJ0wCMOWPofOBrWkx57DxNpQAlI7MCmR1HK6P0WaDWAMZz0QEq48FbCnVA7k 2rKexDnVjiZJQc4umKcyCVetCdtdYdOysdlfhUhKO4OrvzRlozVUuTaz02IPhZMNzRgZ 2MDFPGFdtWLlJid7Lg/OzpFApUqU+CJ3GtCJAfAvTN1NNgt6piGIrUai+2wgkWeBBc1x SrD0lD2Zc5KZngu2ViHV940vNskgtZMlJ3c6GLpN99281Vk6AnxAdgYLixIf0e8Mq7Lh 6SyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709059224; x=1709664024; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SsuS6sOVug3YrAmxtUqH/1NuaIV6/SsNBHUd/9g2JPc=; b=aoFz+/FpQSi1V0Gy//Bnl++E4eTG8UnSMo+CZVmE8DzX2DN00lXH1KJ9LacOChHIcT w0SCjPLhCLfmuxiDEBI+gQblJseL/9xLBNFrnNIDulxF5N1990MboS63zHIjU407nedk iJXxyOBPsIaastd4TCkTcD63m4j5zKvoOuAEYyQX+CZem/BGK4AtSGVl7moTlD0IPIME gKNkh2UipqPo6bO3F3T72A1kPzMdwjtv01QxFkgYXMcACcHbG+phhLvSKjcYki2CSR+5 6UtYk2mDjjJG/E1Q4CcW+mdzQLsWHSXLFy9pZvSZAfholiGUskFw4AHXb/Bgb5FDwpCx G3cA== X-Forwarded-Encrypted: i=1; AJvYcCV5t0IpaLkSD5OlpBflp+brUt98lhPPXedwwbgZbtJExZPUkMpGYtpzrFOU/rpHu4CkFZjrS4s0F9mPK6HVBV7PKy0hYYI8OJUKOh5w X-Gm-Message-State: AOJu0YxQNVoEM1/vbxwCN5LzpX0FL39/yW5nEnrHDyUmz+HIv7Ksd7H9 ZgdmiACWP9G+k+mgraP/Fc6JbYm9XrQLI+2x/lDv4D0ZacqeRqvjMK1MeZ1v3w== X-Received: by 2002:a92:c94d:0:b0:365:1f83:24a3 with SMTP id i13-20020a92c94d000000b003651f8324a3mr11623288ilq.18.1709059224133; Tue, 27 Feb 2024 10:40:24 -0800 (PST) Received: from thinkpad ([117.213.97.177]) by smtp.gmail.com with ESMTPSA id d7-20020a056a0010c700b006e2b23ea858sm6257160pfu.195.2024.02.27.10.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:40:23 -0800 (PST) Date: Wed, 28 Feb 2024 00:10:15 +0530 From: Manivannan Sadhasivam To: Bjorn Helgaas Cc: Bjorn Helgaas , Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Lukas Wunner , 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: <20240227184015.GS2587@thinkpad> References: <20240227170840.GR2587@thinkpad> <20240227173705.GA241732@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240227173705.GA241732@bhelgaas> On Tue, Feb 27, 2024 at 11:37:05AM -0600, Bjorn Helgaas wrote: > On Tue, Feb 27, 2024 at 10:38:40PM +0530, Manivannan Sadhasivam wrote: > > On Tue, Feb 27, 2024 at 10:25:35AM -0600, Bjorn Helgaas wrote: > > > > [...] > > > > > > Ok, I got the issue. TBH, I added the device tree property based on > > > > the existing quirks for the ACPI devices. But none of the DT based > > > > platforms I'm aware of (even the legacy Qcom MSM8996 chipset > > > > released in early 2016) doesn't have any issue with D3hot. But I'm > > > > just nervous to assume it is the case for all the DT based platforms > > > > in the wild. > > > > > > > > But to proceed further, what is your preference? Should we ammend > > > > the DT property to make it explicit that the propery only focuses on > > > > the D3hot capability of the bridge and it works as per the spec > > > > (PMCSR) or bite the bullet and enable D3hot for all the non-ACPI > > > > platforms? > > > > > > > > We can add quirks for the bridges later on if we happen to receive > > > > any bug report. > > > > > > I would assume all devices support D3hot via PMCSR per spec. We can > > > add quirks if we discover something that doesn't. > > > > When you say "all devices", are you referring to bridges in DT > > platforms or the bridges across all platforms? > > This patch is only concerned with DT, so that's what I'm commenting on > here. I don't know how to untangle the question of ACPI systems. > Ok, I just wanted to confirm. > This patch affects platform_pci_bridge_d3(), so just based on the > "platform" in the function name, I would expect it to be concerned > with the D3cold case and whether the platform supports controlling > main power. > > It looks like this patch says "we can put devices in D3cold if DT has > 'supports-d3'". But I don't know how to make sense of that because > that requires (a) platform hardware to control main power and (b) > software that knows how to use that hardware. Wouldn't this require a > little more DT description, like "regulator X controls main power for > this bridge"? And then an OS would only be able to actually use > D3cold if it knows how to *operate* the regulator, and it doesn't seem > like DT could answer that. > Fair point. And for most of the DT based platforms, there is no dedicated power supply for the bridge described in DT. So transitioning the bridge to D3cold is not entirely possible in the OS. Since we concluded that enabling D3hot for all bridges in DT platforms is the way to go, I'll drop supporting the DT property in next version. I'll also remove it from the binding. - Mani -- மணிவண்ணன் சதாசிவம்