Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp232855rdh; Tue, 13 Feb 2024 15:30:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+Q6LC7ld1/IkFWJHEtMBpDOSJkW60unyzUbjTZY0erdwfF6U7HMmGq68wit7bFkF3xHRctz9MCtTBcLvUsge7WrdcQTKum1UzEn7yqw== X-Google-Smtp-Source: AGHT+IH9FtBsrCkeapMc3uJ0S+/kKBHzH0PH007JDQjdgQ1QYH7bAUacZWH6ahS1Z1MGmjk9FOfI X-Received: by 2002:a05:6830:14d4:b0:6e2:f4a8:799 with SMTP id t20-20020a05683014d400b006e2f4a80799mr1393468otq.16.1707867055465; Tue, 13 Feb 2024 15:30:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707867055; cv=pass; d=google.com; s=arc-20160816; b=0WbQmawo5gkrop8XtALqrlhkTBqOMzXRESfsw4WdZQtq+1U8flr/PJxbgAocF8v5gx iu0wDgihC5TrCeNCNSTeG6lwXzSm1kkSGfz71p1+9NVjZob1IPLhRu+mqaOU41a8C9zr 2t1IGW6JQLt3XcXPy6ZUmXRvM8vpZsSEn1KqtjAbsTPT737zPewd+ToirW8yi41vL1xq 8SL5P/JR3qOnoASxHhf3DTPo/Zb8TjIaifsMl9dpcXmeey9KRlrr6iLHouzp62PFHwmc QLd48hBzwm3mwMMx8jbnQ4QUpu25m3+LgjA3r/bAIEmPwgbSSCnqTNgxhkdRSF4lGupZ c42g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=KUZSxNr3xB4zN0904cbczi0hkdWBqZu7Pp/ST+wPnRw=; fh=qFJEe8zfxkB5oTZSVirnxJgz2p8I+18+kO3V1/gBPBU=; b=BeWaqa0lPMuybiBvZO4QUGGlkM54FTbVRFG555vvwRJWC5rEsRxkI/x8CanBCf1GrS a7UlQA9RuPlF90lXWWt1k32TkdAQZ2Cmolc/Cq0rY2ZsRKyZ/Ode8Js/Z79fASW0XYal EFigopvf4uzGABFZOer6JXnt+aJQ7jwVaJZAJeEtu8LLcd1i5eXaFq0UFm1EoZB+nz/Y rdTJjBueZK2HNHxzrEd0Se1FBiNEwSU2S26VqMGcZz9uQhBfWBgimCARIO7x929v31Il LY7cIOJH4hJYNiXCjDy/myZ+kBqpD4lnYxZtg7AnWkvxbJznxWiFh/ki2/btV7SXQ1Xd 6uyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=pCbF0zTK; arc=pass (i=1 spf=pass spfdomain=canb.auug.org.au dkim=pass dkdomain=canb.auug.org.au dmarc=pass fromdomain=canb.auug.org.au); spf=pass (google.com: domain of linux-kernel+bounces-64543-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64543-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au X-Forwarded-Encrypted: i=2; AJvYcCV1Hap0MlgOGofVm/7cLL9UZHpSPj1EXl3SVonB4nc+kEumFsSkjXhQJR7oJNiucFMCbAE5WPaoW+JVEro6v5NS3ZdlIoxbgtZKsOdAWw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id pi1-20020a05620a378100b007855ed2167csi9381328qkn.26.2024.02.13.15.30.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 15:30:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64543-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=pCbF0zTK; arc=pass (i=1 spf=pass spfdomain=canb.auug.org.au dkim=pass dkdomain=canb.auug.org.au dmarc=pass fromdomain=canb.auug.org.au); spf=pass (google.com: domain of linux-kernel+bounces-64543-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64543-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au 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 B418D1C25D21 for ; Tue, 13 Feb 2024 23:30:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0197563111; Tue, 13 Feb 2024 23:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="pCbF0zTK" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 326C562A02; Tue, 13 Feb 2024 23:30:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707867025; cv=none; b=Zl6AmSeRwiXEWw9xLKUr4h5OVHyJnSFLnqxyqIT8nLO6BNDOb26GK1PiwLyUgrpLsEhgahG9PlrOA9l1jFHOuce0cyeEwD1bGLzShjY+DAcMgughYNLgUtRIEaSXIQu2YRvk42Ase2n3lm/Ix7FqS42TrXYdNpWqNHvbZPWmDE0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707867025; c=relaxed/simple; bh=tBCl0jWLRkN/MadVKH56rgtBZN2CTSGsYrQR/Y5aZA8=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=Tq0A+0wOIFzzJTWZFXeG0HG0Jok5uNtPbvct3gMDGiwS79kjy9oMsfTnXTEGSmeKkdcXaghd6DtB12UTtWrT03P/a6LIThf0THc+jLDxSDmzWploioTnnOEFpyEX20S9KRHhs2xCwSJSLYme0TBPZG6EczcHKdUr/WgXwLY3UXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au; spf=pass smtp.mailfrom=canb.auug.org.au; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b=pCbF0zTK; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canb.auug.org.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1707867012; bh=KUZSxNr3xB4zN0904cbczi0hkdWBqZu7Pp/ST+wPnRw=; h=Date:From:To:Cc:Subject:From; b=pCbF0zTKq3BOWUaFMJfoFD4F7IGO0XytcU9m3dSSHRz/wZd71mY52f1KUvQACQFal 7pnG2xhptNVVBk+m2030LRTzKHspZL5jBmLYcce7d2xk++wSvLTMKe2fK9/bh1gebI YdbSvxjrRNh8R0dDGndNF4g24xESjQ+luwcpRTpmF7ak8NHKV6eMY5oFCnkeRHt8hI lJChcqalG5FZk4l1mkKXpyK9WeOkXo9Z4Mkvga4h163Q5Fz2bHWzzOTOzC/Fhn7aq7 exXG5ROBfm7a6mI0vqtLBs4V/Gi+74CMv3LXwxQQ9pbHW1BFcQD/AkpGNQP1pqyFe7 r/8kU4So73dlA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (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) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4TZHcM1GQlz4wc4; Wed, 14 Feb 2024 10:30:10 +1100 (AEDT) Date: Wed, 14 Feb 2024 10:30:08 +1100 From: Stephen Rothwell To: "Rafael J. Wysocki" , Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= Cc: Alex Williamson , Linux Kernel Mailing List , Linux Next Mailing List , "Rafael J. Wysocki" , Sakari Ailus Subject: linux-next: manual merge of the pm tree with the pci-current tree Message-ID: <20240214103008.0bb12069@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/CjylUucKiAPUPy98I.Dpp4t"; protocol="application/pgp-signature"; micalg=pgp-sha256 --Sig_/CjylUucKiAPUPy98I.Dpp4t Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all, Today's linux-next merge of the pm tree got a conflict in: drivers/pci/pci.c between commit: 41044d536068 ("PCI: Fix active state requirement in PME polling") from the pci-current tree and commit: c0ef3df8dbae ("PM: runtime: Simplify pm_runtime_get_if_active() usage") from the pm tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. --=20 Cheers, Stephen Rothwell diff --cc drivers/pci/pci.c index a532bf597e57,cb51c4079013..000000000000 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@@ -2361,36 -2522,29 +2361,36 @@@ static void pci_pme_list_scan(struct wo if (pdev->pme_poll) { struct pci_dev *bridge =3D pdev->bus->self; struct device *dev =3D &pdev->dev; - int pm_status; + struct device *bdev =3D bridge ? &bridge->dev : NULL; + int bref =3D 0; =20 /* - * If bridge is in low power state, the - * configuration space of subordinate devices - * may be not accessible + * If we have a bridge, it should be in an active/D0 + * state or the configuration space of subordinate + * devices may not be accessible or stable over the + * course of the call. */ - if (bridge && bridge->current_state !=3D PCI_D0) - continue; + if (bdev) { - bref =3D pm_runtime_get_if_active(bdev, true); ++ bref =3D pm_runtime_get_if_active(bdev); + if (!bref) + continue; + + if (bridge->current_state !=3D PCI_D0) + goto put_bridge; + } =20 /* - * If the device is in a low power state it - * should not be polled either. + * The device itself should be suspended but config + * space must be accessible, therefore it cannot be in + * D3cold. */ - pm_status =3D pm_runtime_get_if_active(dev); - if (!pm_status) - continue; - - if (pdev->current_state !=3D PCI_D3cold) + if (pm_runtime_suspended(dev) && + pdev->current_state !=3D PCI_D3cold) pci_pme_wakeup(pdev, NULL); =20 - if (pm_status > 0) - pm_runtime_put(dev); +put_bridge: + if (bref > 0) + pm_runtime_put(bdev); } else { list_del(&pme_dev->list); kfree(pme_dev); --Sig_/CjylUucKiAPUPy98I.Dpp4t Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAmXL+4AACgkQAVBC80lX 0GxorAf9EfEqMCVJVb8TqWHS5bC2IMANFydH3wDCtEx3H181jUlGPm5/ILxIn3+f ONcRv8FVGwEJWSiVDkPS/dLg/q0gcbz46khaxpC1GN3n+1+BJCmJPNuVIftSL3bh j7si/FsmxUVsa0Ji3ySIf40JvJwyD3dVOVJRAjK60E/TOz4dQ2hAzuJGAg1VSNMF e5RxDK0QaagWrGrw02vVydvfKiXxX1XjnEb8KeCR0KB5QVG9VrEkhENB+vdxWvr0 s6DABfEKsZzOrrNTDxMoxJmc3SSeyrWmHqzUz8P79LFOA24hEcbjRsp9YAjKShXu sxjfT5eJlpax6C3pjqfkUInLiFWcNw== =a//M -----END PGP SIGNATURE----- --Sig_/CjylUucKiAPUPy98I.Dpp4t--