From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) (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 CE6C11C37B3 for ; Tue, 6 Aug 2024 11:48:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722944896; cv=none; b=FIzmZK17ZWCBo7hf2ckwjwt/DXbF9ipaOzmG9t2y6jm9CFg6loPn6MeME5SWPT8yqGmHPjEpOuRVP33EpJfavnIaunmw1//kBK6qBX8/kHgeLYmQM2mhrZmurQDxnnwovIJldE1YmaLrpTzb57OTyArzWCoattso/zx8DvqxinI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722944896; c=relaxed/simple; bh=KJ96BgkJZQbvnEnqdDFr5FIIureinTKxCE4K6X/Qgf0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I7hyMPxysfvhOiZMvy2ABuGFEswfErNs/NPmOmuCTA6u5vOD9keneiOuVXUuSZXIh2vSqdmTE6dc0YpZKzITauHaqwYngqGC20LOxduCcz328h3lPX6BmFWbcvilgdL8U1rnVveoMtXKKiZz0iOP5sc0ove98wdwxu05UBTAtd0= 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=QYAnI33n; arc=none smtp.client-ip=209.85.166.173 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QYAnI33n" Received: by mail-il1-f173.google.com with SMTP id e9e14a558f8ab-39b3a4d2577so1622115ab.3 for ; Tue, 06 Aug 2024 04:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722944894; x=1723549694; 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=YnKDLZastVXUhXCKZl6BxKY06diUTWNA7Rw0yyQiGS8=; b=QYAnI33nWuCXNFGLkdwzrwxE/ldAkeiSlt9GnomrS50hC3wgbGEj0L1Yb2SsY+Kv6G Cu4dNnqftfWfo4OQ7uMu2puh/2aJ8Ul7RVtwFOh4WqXXn8itUsvoPKOP9pmv5Ci0bgMy qQ9Tp4bvLJ9t2SzTTXGdTI+vKZVkIOq+e3Qw7SLqPUI+SCTS35P9xtgbLXyXBVBsnBer admISBSAESVom2xB+kW40f8A2F6CbcgIm0331aWUuGSKazzmzl+kDulopv5widVlHrzX larTb4YRrNtNywKcVgwTcJWSpqeoe0ZOP/5oqlc9Jqs3muKpC2I38Lf/HzjGNuPenvdH WsxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722944894; x=1723549694; 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=YnKDLZastVXUhXCKZl6BxKY06diUTWNA7Rw0yyQiGS8=; b=BwAso/R2+5cttPFI/yg+BX2ZIkr9MT6LCzeAceP34ATrtFINtYwKHOgCxNTPWZxe/Q h3+xxZc4U8u/LIthV9Utsq0EALEGc0YyOK7zM4KoSH2Yhvaq11DFJ6sMiXQN/uL0/Zbm ATnrmWZObIBQEP13Z0VmPrgM5e2QozAzYduf5aSQ3jyietqfFVGuiJ/KuX/pdB2NTMb/ zdPXT4yZNDl0PzgPTGpzb41SH/XL/QvFwgVDDpxRnd7rbuADCJwp2zEFvwjpk37OuAIC AxKh16HmS8Qz/WpgCAStTIktVI5dUbfI3lsN+9ChI6MYbOprZWmUo/Ir9c7asOIQvMyF soGA== X-Forwarded-Encrypted: i=1; AJvYcCXs+qUF1S87pyPm96nu2VkgSg0ghP4aHCE62u5lX6H+JGy3xtBK+0IzWNQWwrPq4VbgRLxb4W3Itw2at94d+UQ7hEVi/CExCpzW6Rjs X-Gm-Message-State: AOJu0YyklR+GRZ8HWPrwc00Jv2H9zBgGPCQlZ4SCi3vqXE3Z13a6DFb2 SF31lpYSwFXcC/0qmH3HZLPluyHpQc4NYQP5SOP+b0zZf6flD/Oefd6z40MswQnTHcwKxeuZlJ0 = X-Google-Smtp-Source: AGHT+IHDx5ouRyGybYmKI+rGA3bANIvnR3BlipR1pbrh2anF4Gl61iD5cVGF8vIXPCnZL8KlLVtx2g== X-Received: by 2002:a05:6e02:54a:b0:39b:35c3:d5b8 with SMTP id e9e14a558f8ab-39b35c3d5e0mr100545275ab.22.1722944893872; Tue, 06 Aug 2024 04:48:13 -0700 (PDT) Received: from thinkpad ([120.56.197.55]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7b763b342e3sm5792785a12.56.2024.08.06.04.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 04:48:13 -0700 (PDT) Date: Tue, 6 Aug 2024 17:18:08 +0530 From: Manivannan Sadhasivam To: Lukas Wunner Cc: "Rafael J. Wysocki" , Bjorn Helgaas , Len Brown , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, mika.westerberg@linux.intel.com, Hsin-Yi Wang Subject: Re: [PATCH v5 1/4] PCI/portdrv: Make use of pci_dev::bridge_d3 for checking the D3 possibility Message-ID: <20240806114808.GA2968@thinkpad> References: <20240802-pci-bridge-d3-v5-0-2426dd9e8e27@linaro.org> <20240802-pci-bridge-d3-v5-1-2426dd9e8e27@linaro.org> <20240805132442.GA7274@thinkpad> 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: On Tue, Aug 06, 2024 at 08:46:48AM +0200, Lukas Wunner wrote: > On Mon, Aug 05, 2024 at 06:54:42PM +0530, Manivannan Sadhasivam wrote: > > So what is wrong in using pci_dev::bridge_d3? > > The bridge_d3 flag may change at runtime, e.g. when writing to the > d3cold_allowed attribute in sysfs. > > If e.g. bridge_d3 is set when pcie_portdrv_probe() runs but no longer > set when pcie_portdrv_remove() runs, there would be a runtime PM ref > imbalance. (Ref would be dropped on probe, but not reacquired on remove.) > Ah, so it is the other way around. Thanks for clearing it up! - Mani -- மணிவண்ணன் சதாசிவம்