Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp703849rdh; Wed, 14 Feb 2024 08:58:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUu+vdCPgGqKp1a307KOj8tedQ2MX/+jFsDf2o53xp3Kej/tKJhj7l7ix4pOVfHMAj3QN1kT/ht6deieqIkspU8zke8z7i2u4Rj950yMQ== X-Google-Smtp-Source: AGHT+IGMWdR0Pnn3ORQH/82XJn4/5ecM3Ms+B8ku1k1oFm5B8fllvR5uheS8ueOEHWWTGJltiKiH X-Received: by 2002:a05:6870:b294:b0:21e:7de:148 with SMTP id c20-20020a056870b29400b0021e07de0148mr2931960oao.49.1707929897540; Wed, 14 Feb 2024 08:58:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707929897; cv=pass; d=google.com; s=arc-20160816; b=B+CRg9ylX/Z9EaQR1ysyDySttIIxen2javSeWgnP4/ANKo0YRuISMmHaZd8Q7kUC2s xGB/PifRLqbrnvkcusS6oQ2lyqEfqxfHSZ2fVZ1x71cgG4WMqb60P0wkNvnGh4SrnpL6 Ctat3/5NRzWI8o+kaR2SQfT6YkpVLnr22WgS36iRaWsvvH0hOgbMf5M7AWsq8Ksdvvb+ OWZyRsHcN55R+BwEDlXsqxYOEAQOiOWnJQpAWWTXl8yxLPFfnV1EJDTsXC1ie01wQEPt ZG3IDzkoLpeCRIeQIancvUu1hjW1xxfTPNjP0ZoQSuVMKH4BYCXtU1JOSiS7o6RQTmRL NkUw== 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:message-id:subject:cc:to:from :date:dkim-signature; bh=nEW6D3NEDey/ZVLfFcvhnIcva+rE2cYQa/klQw6uv/4=; fh=0hv+agRLG6tGbIWDmJ1Ia44alNgh0JdZYF73O8BEaVA=; b=bQjtJkW4LtM/9PCEjx7hR2O98ECXD0YruYeCBya0OFevngzjZr6aFTexl+2MnNh7Wn hh0+COMUJupxLrvvzyLvWAXO9yHCxS1iXubZw+Bic0SCk2F2f99zuY98t1XxLC8c7eh3 vEvfwPuFBtRJdm/44Q5u8I438bYt/jr4gD3yTxpwinLe3GdpfDHiNl7I6o7OdesRM8P2 9KtBeQOg/gCi+an0+xL/SdOi+bXCzrVe432FOVGjkEmvO8MXFfY5CqP5+X0yYl80E6Rv SVMhTtsGfaC1E+KtIv4IG5UoS5dyCVU3GCdTIB4ybi03Y6yRCMX/ceEeM6A+lrEYBkfO Jvjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pL2nwhSi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCVdeMxVBNVLCiRgqKC2kBp27iPeLsGv+E8tG1sr8Dj9E8UGBgyWN+3xVMcktBA6rwmTgl4Tx7eAF20QtaZ8Kt7IhFkRdy5znoCSn7TIiA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b187-20020a6334c4000000b005dc528a9d0bsi3887656pga.241.2024.02.14.08.58.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 08:58:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pL2nwhSi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 336992833A9 for ; Wed, 14 Feb 2024 16:58:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0DDA60B8C; Wed, 14 Feb 2024 16:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pL2nwhSi" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CCF94604BC; Wed, 14 Feb 2024 16:58:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707929882; cv=none; b=cAcJRTBZDQTosAYyDSayPuWR8wlVlcZA+4Nx9BKHjxwZoYdMF6n13j+muXq4cdW55ABLYQBydpfyoJ2Q3OPHd2NVdxUEz+fzVNA9qhWIUiJzd3Asnnr4N7wDb8uSCRhg5j/KF4aSZqK8HRuV+hgyUxBrkUcsv/fgps+iKPxaT2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707929882; c=relaxed/simple; bh=QZHxpOWGstMLL7cOOITs7En2K1eIVAPNG1eepxsSzQk=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=bjzvKAm3TkrqJKKvGybnA1R4+Z39Hehgwp5Erj/FjCLyqq2yotAi8PKMxoiX9gG40NMpz9WZW1Yzwk3784PHDX+uu2GRhIfMwFvhTluNLfbBKf6DHo4ro+cofzT9G0HJzaA6DribHLvdkJuJlW8d5Rt1HnUPun/V+BLSoQCuUS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pL2nwhSi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0529DC433F1; Wed, 14 Feb 2024 16:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707929882; bh=QZHxpOWGstMLL7cOOITs7En2K1eIVAPNG1eepxsSzQk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=pL2nwhSiDD9P3cmh9vfh1L2zZAuGnHwMUNz6aVd0nq3Nxy7qJuus9zSnoVPvIpDBC m3AVtdTDmqJc5GLDa0HOMFkCbFvgoG06GFbkjo07iJMsVxkpfmZCg75D06Q8FbDQyE TLfmEjSNzHQZcY2e36Bp20ncZlRl9vDrBq0OeunZ0SMoERwrDU5sFEwwWuGG2PBw7h Gm+O+kBHzD8LpLdG7gi3ckxxvJuwvlMr/2dfQFjnygONmmrGd8QcmztWnafleZGOlV wI+g/eGieKBAUOcWsHYruB9dmergGF78Runlp2uSxTemqyEKb9+0epi/unWqXNSTl4 YytRU5dwBDNwg== Date: Wed, 14 Feb 2024 10:58:00 -0600 From: Bjorn Helgaas To: Jarkko Nikula Cc: Raag Jadav , bhelgaas@google.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, stanislaw.gruszka@linux.intel.com, lukas@wunner.de, rafael@kernel.org, ilpo.jarvinen@linux.intel.com, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, sashal@kernel.org Subject: Re: [PATCH v1] PCI / PM: Really allow runtime PM without callback functions Message-ID: <20240214165800.GA1254628@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=us-ascii Content-Disposition: inline In-Reply-To: <93c77778-fbdc-4345-be8b-04959d1ce929@linux.intel.com> On Wed, Feb 14, 2024 at 08:58:48AM +0200, Jarkko Nikula wrote: > On 2/13/24 22:06, Bjorn Helgaas wrote: > > > Debugged-by: Mika Westerberg > > > > Sounds like this resolves a problem report? Is there a URL we can > > cite? If not, at least a mention of what the user-visible problem is? > > > > From the c5eb1190074c commit log, it sounds like maybe this allows > > devices to be autosuspended when they previously could not be? > > > > Possibly this should have "Fixes: c5eb1190074c ("PCI / PM: Allow > > runtime PM without callback functions")" since it sounds like it goes > > with it? > > > I don't think there's known regression but my above commit wasn't complete. > Autosuspending works without runtime PM callback as long as the driver has > the PM callbacks structure set. I didn't suggest there was a regression, but if we mention that Mika debugged something, I want to know what the something was. I'm guessing runtime PM doesn't work for some subset of drivers, and this patch fixes that. So let's say exactly how to find that subset of drivers, e.g., "drivers that implement X but not Y" or whatever. > For example the drivers/i2c/busses/i2c-i801.c has system suspend/resume > callbacks. I tested this patch by hack-removing them and yes, autosuspend > doesn't work without this patch. > > Raag and Mika noticed the issue when cleaning up empty runtime PM callbacks > from an another driver which doesn't have any other PM callbacks. Bjorn