Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp506367rdh; Wed, 14 Feb 2024 03:40:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUvgKlUE8u6vQJx3YauuNiTGpKJ3R70SgbGYGScPlV4+JCXg9hDLBior4qHEbHL9mWDSKYCnl6SIVws1DTrFB1n5SoDq5Z9WjPQ7GrYkQ== X-Google-Smtp-Source: AGHT+IFD/3NMljdKs0kn70khsHkouK6JN4Jqz/NpM42Xsk/CCfIvZUtv3GLK6lko9xRXoBK6NQZv X-Received: by 2002:a05:6a21:3a44:b0:19e:ccb2:fd79 with SMTP id zu4-20020a056a213a4400b0019eccb2fd79mr2895793pzb.39.1707910819003; Wed, 14 Feb 2024 03:40:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707910818; cv=pass; d=google.com; s=arc-20160816; b=eMJ7PZ8dtHHHLNTZGsQBZn284rL8OnW1Br3h1T1a5EB0QO0TdV7ioxRLoSS3bYI9HS B5qIY7GcXjplq42XMjXDBPDV+OpN03ZadroYx2gDwavNzPjDvInbeSimrsQiypDsWnRX QHTdpd8Fo9QvvcSO3u/GrB4snAC9JGBDzef2Gga0eXgANYBA2Sv1C4CyIuw54ghZJYxE f7njJu/htP0hKm8N8anlWugRO600r3l2utTu3OfujIaY90t3Oo+4PvgGS/b73LpazRNA V90UXmVPxJMnvc7JfGT+nZG/KzMt3PX6Fx8nJ+WH0ipC7NDkmH9OoqLJGk61Kg25OEsP HthQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=m6cvDResroXlv+sjnJ5KO7m4n2/abUJhFsbmfaGyCFE=; fh=DitHPeH+Fzpzlfl/Y0ldoQP9SIxqxQr1x6ULRti26vk=; b=MUB80ZEM2U2dyJy+7Odrbl4+jxl9TgjRIG8vk76pRyGwu8jhLVmIZvN3wOP8JIggYh omle/qk67O8dgJFHZ7Nq12v0dG8gDPcLZhlOk5KOuslfJBopfa8iIHU9I8IEyoLmfH1i ofTSL4l8wMIW7GrmU6HItAcXMnHBDw7HLpyfmWvSvt4BNNu9obKjWVDErCXi9ruaiSFe wzM3dQXwDcJrVcuRqEk732SoiXYo+p6mGPUYH4yghFkeoBS9QjzQkluCkKzLGE3bC5HO RrRMmERh+VwlZBbRUlqoX/UB8XQp4e/n04VzUCNI1gbdbaOcyf7vTy7Kblm86sH19aL0 SqTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ejTcvIYm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-64825-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64825-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXDRPHxNqJVIHKrN1/9MDX8UuWgEaPgG6ZdxgduOtSjY8hOJsPXSIykSasWBqGie2LqIGB0S84bU0YCWMJ1qRKtK2KR9n4titJ2ShpNcQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p41-20020a056a000a2900b006e0e693c865si4327873pfh.212.2024.02.14.03.40.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 03:40:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64825-linux.lists.archive=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=@intel.com header.s=Intel header.b=ejTcvIYm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-64825-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64825-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 DE986B22CB7 for ; Wed, 14 Feb 2024 07:10:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1941511709; Wed, 14 Feb 2024 07:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ejTcvIYm" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 97FA210A25; Wed, 14 Feb 2024 07:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707894602; cv=none; b=PDGqvvhWsUQ4b8VbQmOLdeNSFXAIFHOfJWQFX9J700LgMJqmyZ9eyhjgUbckm4U3hkOQRmPUk5OCvPYJJHtMSKCAsBKvcr6OxXdxbLKfJ9Aenk4OHR2ae5JwFJnsho4rqCYXBerD/xZDZb3UNJKXfG0rzX/argjJu6pMF9BP97Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707894602; c=relaxed/simple; bh=OmZiqJBsNOZBfJ1AJN84aA24Z9t9LzxTDt3eDw44UCA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UB7+Wl8AcPHd+ngPjAGusI69323HvBcjG9hNviawrb+x9Y9I4Kl6q1bST3a7BBZ4uW+LlG+If8cymahxDV/Ps4/dIA85YuAhX0DC/1/EoCk1oPrIJim2wKGrWaTqof71WV4PHDsO9hCxFT0MEpUxaM1glV/n2zi8XfLEMDJs96s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ejTcvIYm; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707894601; x=1739430601; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=OmZiqJBsNOZBfJ1AJN84aA24Z9t9LzxTDt3eDw44UCA=; b=ejTcvIYmsflgRzAMM5YuwTspzWS/d44K4ikUCeLKIovt+n4MdPz4B/Kc SIjZNBWhJpQ7zSYE93KSyDLJc8KedmXwvKwscDB43qKxYjoZmHQurMohK u2f2u7Cqm/rUnsdZynbBGMMTqK7dJdzF8dOrMh3L8pUUhI3XAVVu4ER45 Wo9K7tTSfW8ecJ3Kp54VrEiZhJxjPYOUxAUkR6MtmQ/UuWMScswiS5yJ7 X4wCDVAixS13Ys0Smfql7DZAsHifquCLjXP1V5yBVX4mPT9mwTniIcncy 3gW3pNCtpPYe9AyRfFotToqxpFwFr4B+Xg1AsbG6fg2nevqA7xNo9KMoP A==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="1801212" X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="1801212" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 23:09:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,159,1705392000"; d="scan'208";a="3085562" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 23:09:57 -0800 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 34F8B11F86A; Wed, 14 Feb 2024 09:09:54 +0200 (EET) Date: Wed, 14 Feb 2024 07:09:54 +0000 From: Sakari Ailus To: Stephen Rothwell Cc: "Rafael J. Wysocki" , Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Alex Williamson , Linux Kernel Mailing List , Linux Next Mailing List , "Rafael J. Wysocki" Subject: Re: linux-next: manual merge of the pm tree with the pci-current tree Message-ID: References: <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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240214103008.0bb12069@canb.auug.org.au> 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); -- Kind regards, Sakari Ailus