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 C7B89C433F5 for ; Tue, 22 Mar 2022 21:01:58 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NaySeulOoVW/WdOWgDhAujoLYF/Bm8RwejCYQCc81gU=; b=vReoTGfzwbpTcj xu3jGwnx7B7h+x+ALIBGFm59fi7yMcqRc5RKH+YL3fGKtk+1tlLhrSpvqztQzGfwYkB/54h4bx11E XGtyywWOi4PA0G/gjx1Zru0Q7hvKqnCdpVGBshMEDlhGou+aLuAQhfOv67gojD9OyJIhPOtjLutmT hbXXLtfewl2Pi3j+bBYVOLFL+YN6NOd1Ogb413P4lc1nWWgatzrFUooRCjSu9Goa3J95S32OT0+2H /hk3VNP8sMZvlLY3e4vSmzDCLeiWkSEMrcvqbhvr6mFFzvLPzQcAO2Y8ooJyvkBhOCJqtvwu+NAUz gHz5D9oQA+EgMdGkmhTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWlcO-00C9b5-3y; Tue, 22 Mar 2022 21:00:40 +0000 Received: from mail-ot1-f41.google.com ([209.85.210.41]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWlcB-00C9Y4-8d for linux-arm-kernel@lists.infradead.org; Tue, 22 Mar 2022 21:00:29 +0000 Received: by mail-ot1-f41.google.com with SMTP id z9-20020a05683020c900b005b22bf41872so13360974otq.13 for ; Tue, 22 Mar 2022 14:00:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eWrxir0SCucnCeRksK5ciUanQNtfuZVTYICxGR86kfU=; b=Luf72kWY9ksuFUPCk+YNIGtm0X/YZLpNXk8H6WwL+pk/UYormXAA8jJ4L/Sn5xG+mG fClpKVV/QqSGXJ02JB74oJfFtINI9g3evxMAj+VteC6Md+Dj4ECvjA4T4QdojM1u6Zb0 GoafmHXAakW+oPQHxEvYWrx4ZuDC5gZ66tLaxidl3zRvWpTzVsfNMsoZp/l7TfCCU9Oy N7WCmltN5uAe5IE4k28HRYWcIMylkbqs5Ztfx19+YAsFVW7ijVnjtAM4cMMUweT/63bv 2rGnvGx3j0bTSQT6rL+UQ2lLbzoeVlYxR5ypXo0nO7VMpf+7L7av6CtTn5u2A8/vCOgA TXtQ== X-Gm-Message-State: AOAM5337/mJbcPpbOwOTaA5Jr/A+m1KjY60VUo9iRN1pzJYljVZy+4Fq cd96yKZaK6f/68F+B5M9eQ== X-Google-Smtp-Source: ABdhPJySomTvR7UHgMNwORSbREz8D4fKteTz8sVVbudUJNOk/baydeHAjdQ5mX6dr0LBd2AdAP6wtw== X-Received: by 2002:a9d:70da:0:b0:5b2:4dcf:fc74 with SMTP id w26-20020a9d70da000000b005b24dcffc74mr10484475otj.376.1647982825779; Tue, 22 Mar 2022 14:00:25 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id bc36-20020a05682016a400b003240a532a1csm8388702oob.29.2022.03.22.14.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Mar 2022 14:00:24 -0700 (PDT) Received: (nullmailer pid 2498482 invoked by uid 1000); Tue, 22 Mar 2022 21:00:22 -0000 Date: Tue, 22 Mar 2022 16:00:22 -0500 From: Rob Herring To: dann frazier Cc: Marc Zyngier , "linux-kernel@vger.kernel.org" , linux-arm-kernel , PCI , Toan Le , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , =?iso-8859-1?Q?St=E9phane?= Graber , Android Kernel Team Subject: Re: [PATCH v2 0/2] PCI: xgene: Restore working PCIe functionnality Message-ID: References: <20220321104843.949645-1-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220322_140027_355457_179E2172 X-CRM114-Status: GOOD ( 33.28 ) 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, Mar 21, 2022 at 04:32:40PM -0600, dann frazier wrote: > On Mon, Mar 21, 2022 at 11:08:20AM -0500, Rob Herring wrote: > > On Mon, Mar 21, 2022 at 09:50:24AM -0600, dann frazier wrote: > > > On Mon, Mar 21, 2022 at 10:17:34AM -0500, 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). 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. > > > > > > Happy to provide that for the m400 if told how :) > > > > Something like the below patch. This should be with the 'dma-ranges' > > DT change and only c7a75d07827a reverted. > > https://paste.ubuntu.com/p/RHzBd5jT6v/ > > Note that networking does come up with this setup. That surprised me > because I thought I'd tested this combo before, but apparently what > I'd tested before was 6dce5aa59e0b reverted + the dtb change: > https://lore.kernel.org/linux-pci/YgXG838iMrS1l8SC@xps13.dannf/ That doesn't make sense. I just noticed there's an error in what I told you to do for dma-ranges. I fixed the wrong cell as it should be: - dma-ranges = <0x42000000 0x40 0x00 0x40 0x00 0x40 0x00 0x00 0x00 0x79000000 0x00 0x79000000 0x00 0x800000>; + dma-ranges = <0x42000000 0x40 0x00 0x40 0x00 0x40 0x00 0x42000000 0x00 0x79000000 0x00 0x79000000 0x00 0x800000>; Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel