Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5911056imw; Wed, 20 Jul 2022 15:29:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tnbH62/YxjWCnrWTen7abESTeEHMeXqNEBiSrb2fi3+trM1Lae/65Uh8SFYVBA+7XX+zXL X-Received: by 2002:a17:907:2bd9:b0:72b:1752:aa52 with SMTP id gv25-20020a1709072bd900b0072b1752aa52mr37950266ejc.646.1658356164417; Wed, 20 Jul 2022 15:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658356164; cv=none; d=google.com; s=arc-20160816; b=FbuZS9D9xi55pqWdu0CzVnCuuYsQB5QWdrcXySoxU9PaEZsJKc3jOqc+AQDMR1dpjZ 4dm5udqjLWWPmMZEceVA2jq2IEb4SyCHVa9H+mYM40g5LXVisVcoDvxUbRRB6LZf25Ej 4zppbQg7/2X91J6xlsIaQCmBdGq86qYMF3qejjwSS5UY6rrnjzxNBG+S+O3LxzH3hAw9 m11nOAWNkPYQ3xC0Zl+udEPa4Jv6wmp/qp9BSTCSZ6OxBhV/np9Ka37UHb5mSIKO+VWX RCqH58nWW/aGS0DLirCjQ8QbkZ5wtpA/1fi+WbC379pNznvahBePYNMVbAl/ENcF7YA+ zxSA== 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=ZbfN67tznfnZFey1wWegpcsYs63E0yeXbNpyRVGZr4Y=; b=fXxUs7hsekmrt1jia5W3lGMk2APEtDAfUKeXj2FBkhrUR3q9XfS0oYhFiFN8PBxbaF WUr3tpu1lFFQ7McVuSSLV3/Ruoy6RdKh5HK98lywrZi+A5tgooGV4dxrv+VU+fLFcBdl n9YSLL6GXS5TUcUYx6wOI+w9SUWGYJOHDODRo5EZI8m5Rp3aw9RFG4wQ57PZvw9UzD7j 9t2s+1uzsukIhuedwb9KKO3oUQj/O0lK8Msm49xykC0MJ1sACnnJy/jtfygJV+bqjw1D tgGul+C0FrzLsPHH4lWcVe5VE3Qwxg8q8WJ16hUe3fhVyOixzzo6OZjhyuhnDKqGU3dt MYcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vImESz6H; 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 x13-20020a05640226cd00b0043bb69a32d6si295659edd.561.2022.07.20.15.28.59; Wed, 20 Jul 2022 15:29:24 -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=vImESz6H; 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 S229793AbiGTWIq (ORCPT + 99 others); Wed, 20 Jul 2022 18:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiGTWIp (ORCPT ); Wed, 20 Jul 2022 18:08:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6FC642AC1; Wed, 20 Jul 2022 15:08:44 -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 66195B8220F; Wed, 20 Jul 2022 22:08:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0374C341C7; Wed, 20 Jul 2022 22:08:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658354921; bh=6NPJbp8qd++ZJMzUvD/xwkV8ieUhuhN8noME2rFU4ao=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=vImESz6H+FmCQBQFGg6RwGB1qUexGM88QKZgQo2j6EKPY9DUkTE6WFlJPsdKOsCWi tQgqkpnO/efA4PMFoBcERZacJUh+sxI/8da7uS/J3ZLjQBaH14ge3TBLfQ84Quu8N2 Qa53LZ9RqK3fgLnWTzhKfjknNgTBxaZrDNSO/+m9rFQMvTj8DyA7FFqpKQIBhfOzlq 1I3rb8cNi9M3B7g3A8kyb+fnHdVoocE9k42ZA9u6WalZammMd5HRfK/qiJu7Ei2KB0 uxQfIc4IfRU2n7z27cZgp3L70A5knqsvG9bc0ifZ8OxsFfZY9lVJ/0gXMNTPo92m+d k4LfG3JnkObvg== Date: Wed, 20 Jul 2022 17:08:40 -0500 From: Bjorn Helgaas To: Jim Quinlan Cc: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com, Florian Fainelli , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Subject: Re: [PATCH v2 3/6] PCI: brcmstb: Add "refusal mode" to preclude PCIe-induced CPU aborts Message-ID: <20220720220840.GA1663326@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220716222454.29914-4-jim2101024@gmail.com> X-Spam-Status: No, score=-7.8 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 Sat, Jul 16, 2022 at 06:24:50PM -0400, Jim Quinlan wrote: > Our PCIe RC HW has an atypical behavior: if it does not have PCIe link > established between itself and downstream, any subsequent config space > access causes a CPU abort. This commit sets a "refusal mode" if the PCIe > link-up fails, and this has our pci_ops map_bus function returning a NULL > address, which in turn precludes the access from happening. > @@ -687,6 +688,19 @@ static void __iomem *brcm_pcie_map_conf(struct pci_bus *bus, unsigned int devfn, Oh, and I forgot to mention that brcmstb is one of the few drivers that doesn't name these functions ".*_map_bus()". It's helpful when they all match a simple grep pattern. Maybe a patch at the end could fix this.