Message ID | 20240214103008.0bb12069@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-64543-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp885065dyb; Tue, 13 Feb 2024 16:06:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV8NLWwbxtvMednUqO1XRjAL4bPqGJ4+B6TPVNB/9aef9tBdsunB07ZStWE+/kTmea9vfhC0JCHSpAhiOEmLveYkxBuxQ== X-Google-Smtp-Source: AGHT+IHaQuiAjlG8yEExTE8yokeG01p+tpeZLJy4Rdm6hLkZG5Q+OT7YSD0Ic3ry0yiQsLllbI8Z X-Received: by 2002:a05:6870:d18f:b0:21a:46a6:b069 with SMTP id a15-20020a056870d18f00b0021a46a6b069mr1177970oac.14.1707869185813; Tue, 13 Feb 2024 16:06:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707869185; cv=pass; d=google.com; s=arc-20160816; b=seXv6ce5F41io0a9s1e/xUDc4XmusMwQqpRrFF30oZlw+i/S1ikYJBSHYNE0DVj1mS YSpBpr1ldU53bEDw8AddtrobADd2VoNOUXkBE9sf/6JS6+YTOVbfERPBhJXqXWzU/gTP /02ugjZjP1kTEVzjpKYFiDvVAN3Rlstn/5H37f2x2k6eukjyiPCdks1Bx00JBHouMoMb 7ZXuZMNe+RJ2TbNwIvOe3d+cN+BS0iUpcjAS0MKeV2Fm5JQ6h2t+I7y7h3Zs4gs8gmMc I08UKNAFrrureA37QYiqOIaWXMeIx9Rj2xoRxwJu8mrMBjkR7FttjLNYrDWILIBinWCo vuKw== 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=9qGsc/E3VPqoNxBs+qA/7kGv8FEkfDJNsdxXMqX/GlU=; b=XNGtjmp6icxt+bVxL+99IlTx3oJWEsGXrDhx+dvPelwpSFGX4Wgf4gadhzf9Sts2FM WJ2eWBfgeRZphwPaBKwqEIy0ta9KvoJd4SMv+3B2mj01Byy80KjGDe9VIw6VY/C3pCNz +DwaJqlXVD7s5DQqQQrzgduyREuWMV1C0dtr+OgqhfcgEn3TYq74pxBTdIDuPmLCxkTn gMtKP5f4bCWuyXAmjD4f1SHix6jEbsWU/KYccDqWOl2Qib19J4qLAuw4Lb0qLPYUd2NX zHcm7ZddKcAYBHD7FZFbxGlo8+KWrii3StG2+sj86N1/VhGGlDMBQvFT+QFCReJEjmbX L9LQ==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64543-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au X-Forwarded-Encrypted: i=2; AJvYcCVMzqfZkglxYCF3129DYF9MFIoC7alvLM+5DOpMOGA++ZZoZEsp9FBI4bNdVF/ixiFGahr+EQImYZBjfYjKKDQ9lApR2w== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p19-20020a637f53000000b005d8b8c682cfsi2773691pgn.582.2024.02.13.16.06.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 16:06:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64543-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64543-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9C935B273AA for <ouuuleilei@gmail.com>; Tue, 13 Feb 2024 23:30:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C91AE63136; Tue, 13 Feb 2024 23:30:27 +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 <sfr@canb.auug.org.au> To: "Rafael J. Wysocki" <rjw@rjwysocki.net>, Bjorn Helgaas <bhelgaas@google.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Krzysztof =?utf-8?q?Wilczy=C5=84?= =?utf-8?q?ski?= <kw@linux.com> Cc: Alex Williamson <alex.williamson@redhat.com>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Sakari Ailus <sakari.ailus@linux.intel.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/CjylUucKiAPUPy98I.Dpp4t"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790830639093528035 X-GMAIL-MSGID: 1790830639093528035 |
Series |
linux-next: manual merge of the pm tree with the pci-current tree
|
|
Commit Message
Stephen Rothwell
Feb. 13, 2024, 11:30 p.m. UTC
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.
Comments
Hi Stephen, On Wed, Feb 14, 2024 at 10:30:08AM +1100, Stephen Rothwell wrote: > 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. The change looks good to me. Thanks! > > -- > 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 = pdev->bus->self; > struct device *dev = &pdev->dev; > - int pm_status; > + struct device *bdev = bridge ? &bridge->dev : NULL; > + int bref = 0; > > /* > - * 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 != PCI_D0) > - continue; > + if (bdev) { > - bref = pm_runtime_get_if_active(bdev, true); > ++ bref = pm_runtime_get_if_active(bdev); > + if (!bref) > + continue; > + > + if (bridge->current_state != PCI_D0) > + goto put_bridge; > + } > > /* > - * 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 = pm_runtime_get_if_active(dev); > - if (!pm_status) > - continue; > - > - if (pdev->current_state != PCI_D3cold) > + if (pm_runtime_suspended(dev) && > + pdev->current_state != PCI_D3cold) > pci_pme_wakeup(pdev, NULL); > > - 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);
On Wed, Feb 14, 2024 at 10:30:08AM +1100, Stephen Rothwell wrote: > 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. Just FYI, 41044d536068 is now upstream for v6.8, so the conflict will be between upstream and the pm tree: https://git.kernel.org/linus/41044d536068 > 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. > > -- > 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 = pdev->bus->self; > struct device *dev = &pdev->dev; > - int pm_status; > + struct device *bdev = bridge ? &bridge->dev : NULL; > + int bref = 0; > > /* > - * 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 != PCI_D0) > - continue; > + if (bdev) { > - bref = pm_runtime_get_if_active(bdev, true); > ++ bref = pm_runtime_get_if_active(bdev); > + if (!bref) > + continue; > + > + if (bridge->current_state != PCI_D0) > + goto put_bridge; > + } > > /* > - * 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 = pm_runtime_get_if_active(dev); > - if (!pm_status) > - continue; > - > - if (pdev->current_state != PCI_D3cold) > + if (pm_runtime_suspended(dev) && > + pdev->current_state != PCI_D3cold) > pci_pme_wakeup(pdev, NULL); > > - 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);
diff --cc drivers/pci/pci.c index a532bf597e57,cb51c4079013..000000000000 --- a/drivers/pci/pci.c