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 02C58EB64D7 for ; Wed, 21 Jun 2023 07:13:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230251AbjFUHNE (ORCPT ); Wed, 21 Jun 2023 03:13:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbjFUHND (ORCPT ); Wed, 21 Jun 2023 03:13:03 -0400 Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5725110D2; Wed, 21 Jun 2023 00:13:01 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 62097100FC16D; Wed, 21 Jun 2023 09:12:59 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 2ECED110A0; Wed, 21 Jun 2023 09:12:59 +0200 (CEST) Date: Wed, 21 Jun 2023 09:12:59 +0200 From: Lukas Wunner To: Smita Koralahalli Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , oohall@gmail.com, Mahesh J Salgaonkar , Kuppuswamy Sathyanarayanan , Yazen Ghannam , Fontenot Nathan Subject: Re: [PATCH v2 2/2] PCI: pciehp: Clear the optional capabilities in DEVCTL2 on a hot-plug Message-ID: <20230621071259.GA2028@wunner.de> References: <20230418210526.36514-1-Smita.KoralahalliChannabasappa@amd.com> <20230418210526.36514-3-Smita.KoralahalliChannabasappa@amd.com> <20230511111902.GA10720@wunner.de> <20230616182409.GA8894@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Fri, Jun 16, 2023 at 04:34:27PM -0700, Smita Koralahalli wrote: > On 6/16/2023 11:24 AM, Lukas Wunner wrote: > > On Mon, May 22, 2023 at 03:23:31PM -0700, Smita Koralahalli wrote: > > > On 5/11/2023 4:19 AM, Lukas Wunner wrote: > > > > On Tue, Apr 18, 2023 at 09:05:26PM +0000, Smita Koralahalli wrote: > > > Some couple of ways we think could be: > > > [1] Check if these bits are enabled by Platform at boot time, clear them > > > only it is set during hotplug flow. > > > [2] Clear them unconditionally as I did.. > > > [3] Enable 10-bits tags in Linux when a device is probed just like how > > > we do for ARI.. > > > > > > Similarly call pci_enable_atomic_ops_to_root() during a hot add.. > > > > Personally I'm fine with option [2]. If you or Bjorn prefer option [3], > > I'm fine with that as well. > > Looking forward for Bjorn comments! You may want to consider first doing [2], i.e. clear the DevCtl2 bits on hot removal, and then in a separate step do [3], i.e. add support for enabling 10 bit tags and atomic ops in the kernel. Having that would certainly be useful, but it's more complex than just clearing the DevCtl2 bits on unplug. So you may want to do the latter as a stop-gap. Thanks, Lukas