From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD50BC6FA82 for ; Mon, 12 Sep 2022 20:32:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbiILUcV (ORCPT ); Mon, 12 Sep 2022 16:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbiILUcU (ORCPT ); Mon, 12 Sep 2022 16:32:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 333A53206D; Mon, 12 Sep 2022 13:32:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C243A612AC; Mon, 12 Sep 2022 20:32:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03393C433D6; Mon, 12 Sep 2022 20:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663014738; bh=PXeC2aQQnVgOv75X6Uw55HEBxJ0NTSxWsOiyXkjtTms=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=BczlH589EycP4AyonxYdpcW36S0+PWIMozVDFqFhMmatT8gMRkcKrFfpwS5cmAhj8 7nxB6dHT1Ryz1A+vlrMp7s8I2bdtfZyyOg0MmXq436qvDMZ0+/T31c8iLdslE025HC 98XJm0FMtjjfauJ1setzDv4zg4sXs7V8JBVK5F/nqAX6fVC48P+PxH5CvFFT6hxha9 SSaH6NusuLGQC0AwaHFaH2/vL5S/MOso2mVOl7tNpvcJsKv1OromPDtxp6inYfL4Kb zDb8XGMyKKjSUm40y1/Cx2VWOSFY3jCzxBFnAND3vRoKfvyW9d70oDbGy8V2U90KTX 9HDDU5lKitdbw== Date: Mon, 12 Sep 2022 15:32:16 -0500 From: Bjorn Helgaas To: Rajvi Jingar Cc: Koba Ko , Mika Westerberg , "David E . Box" , Sathyanarayanan Kuppuswamy , linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Kai-Heng Feng , "Rafael J . Wysocki" Subject: Re: [PATCH v4 0/9] PCI/PM: Always disable PTM for all devices during suspend Message-ID: <20220912203216.GA534915@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Mon, Sep 12, 2022 at 01:15:59PM -0700, Rajvi Jingar wrote: > On 9/9/22 13:24, Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > We currently disable PTM for Root Ports during suspend. Leaving PTM > > enabled for downstream devices causes UR errors if they send PTM Requests > > to upstream devices that have PTM disabled. > > > > The intent of this series is to: > > > > - Unconditionally disable PTM during suspend (even if the driver saves > > its own state) by moving the disable from pci_prepare_to_sleep() to > > pci_pm_suspend(). > > > > - Disable PTM for all devices by removing the Root Port condition and > > doing it early in the suspend paths. > > > > - Explicitly re-enable PTM during resume. > > > > Changes between v3 and v4: > > - Use u16 for ptm_cap > > - Add kernel-doc for pci_enable_ptm() and pci_disable_ptm() (exported > > functions) > > - Drop "Preserve PTM Root Select" (unnecessary since enabling PTM sets > > Root Select when needed) > > - Squash these three patches into one because they make more sense that > > way: > > PCI/PTM: Add suspend/resume > > PCI/PTM: Add pci_enable_ptm() wrapper > > PCI/PTM: Add pci_disable_ptm() wrapper > > - Add "PCI/PTM: Preserve RsvdP bits in PTM Control register" > > - Add "PCI/PTM: Consolidate PTM interface declarations" > > > > Bjorn Helgaas (9): > > PCI/PTM: Cache PTM Capability offset > > PCI/PTM: Add pci_upstream_ptm() helper > > PCI/PTM: Separate configuration and enable > > PCI/PTM: Add pci_suspend_ptm() and pci_resume_ptm() > > PCI/PTM: Move pci_ptm_info() body into its only caller > > PCI/PTM: Preserve RsvdP bits in PTM Control register > > PCI/PTM: Reorder functions in logical order > > PCI/PTM: Consolidate PTM interface declarations > > PCI/PM: Always disable PTM for all devices during suspend > > Looks good. It fixes the issue on Dell Precision 5530 with Coffee Lake > CPU platforms to get improved residency in low power idle states. > > Tested-by:rajvi.jingar@linux.intel.com Thanks a lot for testing this! It's best if you can send plain-text mail to the lists. This was a multi-part message, which the vger mailing lists reject: http://vger.kernel.org/majordomo-info.html Bjorn