Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1485400rwl; Thu, 5 Jan 2023 14:27:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXv3zO8Glvq3AqC7fjd7V9K8ElCuRw4axCOgLHYAGfpr9aX32vufpGVH8/hzxG0yi82rprE6 X-Received: by 2002:a17:906:1c89:b0:7c0:b3a3:9b70 with SMTP id g9-20020a1709061c8900b007c0b3a39b70mr49968625ejh.62.1672957653570; Thu, 05 Jan 2023 14:27:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672957653; cv=none; d=google.com; s=arc-20160816; b=SRLV57eCUBXunZgYchUjviaZw8MQyVLU/hmvTKDI9HUA4UMvN29iEi0XmSWNgblFQ2 iwwNyqN0hHgHDYo3RKHhuBBoCoQV56VrcSEmun0wBs6Xeup4iAW/3S3iJk+yDQ9HA/ba +/sW6E91fGc5SKeaFahX8A6MfXlFKW6qzYeDKAsS6px6GVwNBNFmFk8ZcEoGIOT1T+Sl +gZU4DM09GXHoAJyQ6DASbF0qYmZ4RCjUmzwqPrG5CFbCqX8UEnmDqH8zjkajmG01j6G MnGks6IcFY3kSg0ylrCuphC2erMzW6dHUAZHlwZlzmdAv3FLgOwYetE0AVoonmuvGZ1S PMDg== 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-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=LNz25Hib0gs6zW+1GwEJurLLHX3/BbvaeRZVfPgkt3Q=; b=ebuiuqmciXVvyJ3ZhDC2cPhX2VHMd5w5XGtJYia8wphbaZyMToRnT4DwRKBimnp4hL lC86tFjnGwx+ziX6x9uKVgkpMAPiIFdXT/NbzpyczL3flbvgQL+LYRsUwrN9YduoXgrp Kmuvh3hOjDNaCRsRnFRgdIzr99UGMnp0dU59KzAmu7NzqkttcpjSwjaOsHnsbZt1jDM+ 0ERrX1Hw41Meo8QrFCaNVzmMZLr/Pkhop7Vxwupcjl25rO95VQIEiIPG0JdVIfb4KjCQ BBJis7OBOu0VE7wwENokmBT19WNQ7vAQK4pDOdZv3tKVx3WNYLFuQct1ZaAL5aK75htM 3BqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bl4maVmL; 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 o12-20020a170906974c00b007ae84881ebasi36451835ejy.505.2023.01.05.14.27.18; Thu, 05 Jan 2023 14:27:33 -0800 (PST) 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=bl4maVmL; 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 S235804AbjAEWUg (ORCPT + 55 others); Thu, 5 Jan 2023 17:20:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjAEWUe (ORCPT ); Thu, 5 Jan 2023 17:20:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1E4267BFF; Thu, 5 Jan 2023 14:20:33 -0800 (PST) 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 8D93A61C39; Thu, 5 Jan 2023 22:20:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1396C433EF; Thu, 5 Jan 2023 22:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672957233; bh=wFsjpVh3IkDmL+Utxx+F+EeOCJi8KbNIByUbOF9OlAk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=bl4maVmL8WVazXiY1F4XvKQmhwaB5YBcUiFS2s31mdvm8a1ZZn/Hx49BfQ/XYT+2m YeqtLdjYUydFElqyULMAnZKpFwCClpWNRqTcNuUl+j4ckAlIZ+m6ltXms9VWMUFqMd hIwBaDWpHxeIBiE4dEQzBNil5NCL+5dz41FOJeHBR394j8G5RTDXwQnYlv12YS/TFB kPIUH6P8kIVxY+Ro/RQMIFc9bEOgfbe0WMdX0Mi0Exvewjb9E63X0m6vjRyLCYZOOD 6beeQmfQybHtimNh92uaCN64BE0+CNmtKtAAUgByvvBFUZXPzMpo0osAMV1UJqotEQ R+gdDRAfjTwXg== Date: Thu, 5 Jan 2023 16:20:31 -0600 From: Bjorn Helgaas To: "Luck, Tony" Cc: "Williams, Dan J" , "Liang, Kan" , "bhelgaas@google.com" , "hdegoede@redhat.com" , "kernelorg@undead.fr" , "kjhambrick@gmail.com" , "2lprbe78@duck.com" <2lprbe78@duck.com>, "nicholas.johnson-opensource@outlook.com.au" , "benoitg@coeus.ca" , "mika.westerberg@linux.intel.com" , "wse@tuxedocomputers.com" , "mumblingdrunkard@protonmail.com" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Box, David E" , "Sun, Yunying" Subject: Re: Bug report: the extended PCI config space is missed with 6.2-rc2 Message-ID: <20230105222031.GA1175847@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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 Thu, Jan 05, 2023 at 09:49:44PM +0000, Luck, Tony wrote: > > The EDAC driver wouldn't have any ACPI stuff in it; it's just that > > Linux is looking for ACPI info about the ECAM area. > > Is there some way for a driver to know that pci_read_config_dword() > is going to fail for offsets in extended PCIe config space? There's no nice way to know ahead of time. "raw_pci_ext_ops == &pci_mmcfg" means it should work. It looks like pci_direct_conf1 and pci_mmcfg_numachip would also work, but it's all pretty ugly. You could check the result for PCI_POSSIBLE_ERROR(), since reads should return ~0 (PCI_ERROR_RESPONSE) if they fail either because we can't access extended config space or because there was some PCI error. Bjorn