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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C48F0C433F5 for ; Mon, 21 Mar 2022 16:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nO/Dkiob3QIRjDsAm5xCIlNZSeZbLwEEsRBKJHeOvp4=; b=JungGpfZARsBT0 aCjWt3nDsozDkmwDWozYCMY5RK5b3tYwf2vv9a1ZHmT5qCF8uMGjH1DIYskZLCUQwepNUlGFBlRLf cM6VZMEJluRTsXpMgDiyiWGl4tTNVgF6Cu8hEkiH3SxeQi+bElCoKqYBjYP2c4s7R9Qwx1zAno8cf 56YjtN+pRxLzXxq79zXP6mofcbRz1Vqg70SdZEJNOBrnK4iayqfb6N5CXAAYb1KsKveI7dyKbAGmb kG9gjPXWeBsufIglUavJmLdg1AiVwdauT82ijtJgxYlIApCgGl1zYuCuyBPNbU+GBC/ovJuQcaJAY WnJ21oOJEDTjwg5oieHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWL0u-008OoE-ES; Mon, 21 Mar 2022 16:36:12 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWL0q-008Ono-Jx for linux-arm-kernel@lists.infradead.org; Mon, 21 Mar 2022 16:36:10 +0000 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 2B392B81883; Mon, 21 Mar 2022 16:36:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0963C340E8; Mon, 21 Mar 2022 16:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647880565; bh=dBXNJk4k4ynl1kpfdDo3ulLplUYqQLK5nh1qo/Cjtgc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XQbsZBRpCWaVUaP1+gpARV4ZRo3gXV3mQipEsvt+A03/5xmRsAvcD4zbzC+sfMepO WTA8tRsDWPenBbBMwstq36LswmoJG7n5D6lIkSoic2BJfYQudrNUGl/sJBD1orR6I+ ByHzhkMtLTVA5mY8yfM55Z7N2GMXWU+vZcuz3uYkwuSHaaEx+11YRI7SrO/JiXw6F1 9GIPTNntglLkodVk4eOgqp7Z6gT5Wciluy5a3/4m38ZI2mMZgrHTgCbnN51qjB5BsA rJ7Rd47fC3UY6Q83pTaDJSieOyBSmKAaoiuxssQdae5ntYaMo+IWY/K+nJs/4zuSks xFw1fxzVJiFsA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nWL0l-00G0ji-4p; Mon, 21 Mar 2022 16:36:03 +0000 Date: Mon, 21 Mar 2022 16:36:02 +0000 Message-ID: <87h77rxnyl.wl-maz@kernel.org> From: Marc Zyngier To: Rob Herring Cc: "linux-kernel@vger.kernel.org" , linux-arm-kernel , PCI , Toan Le , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRz?= =?UTF-8?B?a2k=?= , Bjorn Helgaas , =?UTF-8?B?U3TDqXBoYW5l?= Graber , dann frazier , Android Kernel Team Subject: Re: [PATCH v2 0/2] PCI: xgene: Restore working PCIe functionnality In-Reply-To: References: <20220321104843.949645-1-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: robh@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, toan@os.amperecomputing.com, lorenzo.pieralisi@arm.com, kw@linux.com, bhelgaas@google.com, stgraber@ubuntu.com, dann.frazier@canonical.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220321_093608_989977_ACB0925E X-CRM114-Status: GOOD ( 34.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 21 Mar 2022 15:17:34 +0000, Rob Herring wrote: > > On Mon, Mar 21, 2022 at 5:49 AM Marc Zyngier wrote: > > > > Since 6dce5aa59e0b ("PCI: xgene: Use inbound resources for setup") was > > merged in the 5.5 time frame, PCIe on the venerable XGene platform has > > been unusable: 6dce5aa59e0b broke both XGene-1 (Mustang and m400) and > > XGene-2 (Merlin), while the addition of c7a75d07827a ("PCI: xgene: Fix > > IB window setup") fixed XGene-2, but left the rest of the zoo > > unusable. > > > > It is understood that this systems come with "creative" DTs that don't > > match the expectations of modern kernels. However, there is little to > > be gained by forcing these changes on users -- the firmware is not > > upgradable, and the current owner of the IP will deny that these > > machines have ever existed. > > The gain for fixing this properly is not having drivers do their own > dma-ranges parsing. We've seen what happens when drivers do their own > parsing of standard properties (e.g. interrupt-map). We have, and we added the required exceptions for the legacy platforms that the code base supported until then. We didn't leave things broken just because we didn't like the way things were done a long time ago. > Currently, we don't have any drivers doing their own parsing: > > $ git grep of_pci_dma_range_parser_init > drivers/of/address.c:int of_pci_dma_range_parser_init(struct > of_pci_range_parser *parser, > drivers/of/address.c:EXPORT_SYMBOL_GPL(of_pci_dma_range_parser_init); > drivers/of/address.c:#define of_dma_range_parser_init > of_pci_dma_range_parser_init > drivers/of/unittest.c: if (of_pci_dma_range_parser_init(&parser, np)) { > drivers/pci/of.c: err = of_pci_dma_range_parser_init(&parser, dev_node); > include/linux/of_address.h:extern int > of_pci_dma_range_parser_init(struct of_pci_range_parser *parser, > include/linux/of_address.h:static inline int > of_pci_dma_range_parser_init(struct of_pci_range_parser *parser, > > And we can probably further refactor this to be private to drivers/pci/of.c. > > For XGene-2 the issue is simply that the driver depends on the order > of dma-ranges entries. > > For XGene-1, I'd still like to understand what the issue is. Reverting > the first fix and fixing 'dma-ranges' should have fixed it. I need a > dump of how the IB registers are initialized in both cases. I'm not > saying changing 'dma-ranges' in the firmware is going to be required > here. There's a couple of other ways we could fix that without a > firmware change, but first I need to understand why it broke. Reverting 6dce5aa59e0b was enough for me, without changing anything else. m400 probably uses an even older firmware (AFAIR, it was stuck with an ancient version of u-boot that HP never updated, while Mustang had a few updates). In any case, that DT cannot be changed. > > Rob > > P.S. We're carrying ACPI and DT support for these platforms. It seems > the few users are using DT, so can we drop the ACPI support? Or do I > need to break it first and wait a year? ;) I'm not sure people on the list are representative of all the users, and I didn't realise the plan was "let's break everything we don't like and see if someone wakes up" either. That definitely puts things in a different perspective. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel