Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7115674rwn; Tue, 13 Sep 2022 14:13:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR41XSBqMjYV5tn8A+JzX4GUnVLV4S4AeMgvIlo2TAX9STcpCB0gG0iwosRYQUFby9nKQZzA X-Received: by 2002:a63:5b4f:0:b0:426:9c52:a1f with SMTP id l15-20020a635b4f000000b004269c520a1fmr29278289pgm.511.1663103599435; Tue, 13 Sep 2022 14:13:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663103599; cv=none; d=google.com; s=arc-20160816; b=kmNHyGuhMpQZJpSFN5VZgeXfmmJxR+Z5eHsw75FFW+uRmYLKB/anhdnPpu3XRFu3Zg I6cBQ40s0AlvSTfmmKaClf/BIZxvcT0Ej6u2ya7Ysl1ZqDTai/VjUFTS2/KdKjZwBmwM hqQSRCEf4EFS9KCzibBL/6OZC0mmbMZYQAKyZ5syf5PDw6irX1sUT/VIBnqKAIwW/KFF FaNpFZOn7kogt9Vhd3jEN2Ve+haRAKg7nGYaFsxbLyNN0LuAHlF5MHtrnjXPqZHzyX7q BwglXwTIfpPLHMQmyvqtYDQ1lMwAPW1UxuovQRJoCl35zVnxRxc9EmtksgQWGIdA5Lts XpSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=4V9OoeGMgDv4SyQf+eBxyG9cgiCvP7dO1Sh9dZbd9eY=; b=KvT+oMLxEQ1oiXcbtgjgwE9hSUflrJJYnIJRf9flvnH+KfJrOGL0a/cPhaCprAOJS6 LiB3H0yIl0B9Yny5V+oxDFdxYLgEFJzYrRZH9Mf9rKcDcJRWCqHx6qtY5UpMFY9tgdMq gApgMm2KYZhnZRnEkLcuZbFW2WXBr/pkLKGEe+JwFt1uzH27kAhul1SRDBbAOPoDFjbF K1DJhF66w+/prSNAWklfYaOFSIJqPE5BwIB7OvDg2RdsdsBLCXCT3DA1MmWctSNabKDg DSo7DFHn63B6076rGjE7LPcjKhpyZ/AJmkC0fYeXe3bVUWMn6DuAkdvlc25QweSWa/3x UiBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZZrrTuzQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a170902dac700b001768f24bd93si11742737plx.450.2022.09.13.14.13.07; Tue, 13 Sep 2022 14:13:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZZrrTuzQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbiIMVMU (ORCPT + 99 others); Tue, 13 Sep 2022 17:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229588AbiIMVMC (ORCPT ); Tue, 13 Sep 2022 17:12:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69996760E5; Tue, 13 Sep 2022 14:11:48 -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 ams.source.kernel.org (Postfix) with ESMTPS id B83F1B810E0; Tue, 13 Sep 2022 21:11:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 421DDC433D6; Tue, 13 Sep 2022 21:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663103505; bh=EqY+NqhVnysbIE+p5o7TH2MFWfeZ8Ji3Lp9KdSogTdQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZZrrTuzQFcDZqyAlbzVysvh5WkG66uD5zeqNqrKwnX5XB2JK/oM5H2AN0kJfCKTUs qZdb3DBmjt5HpqEJ/dzkK8sNCsH6VhmG3a8LclTNgSdyz+dmlu3trBINKbkkM829Ia Uq1PwTKMJRNxtrlXdsNCgmHNvV4n5gW+qCpmz6t+ZWm1NJ7r9u139KZSDaurBewnOk Wh4eXbFhFZmcCjF+kFgkJgLYeGAs9z1zS2PT16kbSsO1fGPU9k1jU3AsgWDgBH7Yrw VnOiuW+7n4kKGMmoffW+YUxq7ZuptY7MOZXcXHw6vv4crs+CmbnB64yODoLpJ5EmOp aieka6oXQ4Aaw== Date: Tue, 13 Sep 2022 16:11:43 -0500 From: Bjorn Helgaas To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Sergio Paracuellos , Matthias Brugger , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [RFC PATCH 1/3] PCI: Add standard PCI Config Address macros Message-ID: <20220913211143.GA624473@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220911112024.14304-2-pali@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 11, 2022 at 01:20:22PM +0200, Pali Roh?r wrote: > Lot of PCI and PCIe controllers are using standard Config Address for PCI > Configuration Mechanism #1 (as defined inPCI Local Bus Specification) or > its extended version. > > So introduce new macros PCI_CONF1_ADDRESS() and PCI_CONF1_EXT_ADDRESS() in > new include file linux/pci-conf1.h which can be suitable for PCI and PCIe > controllers which uses this type of access to PCI config space. > > Signed-off-by: Pali Roh?r > --- > include/linux/pci-conf1.h | 51 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 include/linux/pci-conf1.h This seems like a nice addition, but it would be nice if we could encapsulate it in drivers/pci. I know it's parallel to the existing include/linux/pci-ecam.h. I wish we could encapsulate *that* in drivers/pci, too. For pci-ecam.h, I think the only things that prevent that are drivers/acpi/pci_mcfg.c, loongarch, and a few arm64 things. pci_mcfg.c arguably would make more sense in drivers/pci; it uses acpi_table_parse(), but no other ACPI services. The arm64 code that uses pci-ecam.h is really generic code that would not be in arch/arm64 except for the fact that x86 has really ugly legacy x86-specific mmconfig code. I guess that's a long-winded way of saying that I think maybe we could put this in drivers/pci/pci.h even though the parallel ECAM stuff is in include/linux/pci-ecam.h. Bjorn