Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1663487pxb; Wed, 9 Feb 2022 01:33:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgdX6Ku/oetS7/jGl1LKWd9vHnvw023jwb+sDje4hKXlIafHY9Qb5RtyTZDw+27+XI+IRz X-Received: by 2002:a62:86c1:: with SMTP id x184mr1356040pfd.26.1644399234100; Wed, 09 Feb 2022 01:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644399234; cv=none; d=google.com; s=arc-20160816; b=t6xtLL/ehjf1A1fwLKLXNofuwlxNN5j6N3DoSjSUfwcQLvNvM5OyYBpmMP9otPRwm9 MucGPB4bRplN4pe8Hknvb3gTMJwNgZaG9dB+J56Yjeg6raYNvpN5EOtGQ/ZK1BWIhOYe asIQYKDxTr9n0+IaOI6PpuV0E9zrpJx7JcGhvP2N0Ro5XwbemqqKbUqvm7UgvhgSQ0YV 3OHlb396kiPPZLbqlZxKfq4pwuoQjf8TosoYSBykcV60QDFRAJXTW5KIxa2EdSQy11xZ 1vlVs02ymZUqSZSCNj+Cyv5nrARf981UtYNWbwSG408XskGbIM3nQvz1+PMeHaEvMfJm cMZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7xDQa15I+fKMIear4i8+YzX7nK5a8RROs+XGP89V8UE=; b=q28vns/QQSz6hMPnrYj2DsU0r10ikIJ6VwVgEMLPzJ4kVLNEzKUvSuiAYvJig2FLHB Wz6k7uqgNqv9aKkwKgxClC3bRkg6pMmHJZ+5JZKHwYy8lYtOuB2HCeOBl0WIjDXsFead yTqur5cdwWMwkX5C1rPqL8I5SJbaodxUxicoZA1J29RlW2w38eAzPv2uAWN8HX0sHKZD OZ5DCasf1hLZsK4kt2HTmi9lCf5xZyizfyrZbISP7JTGDFRHMfnGY2esVWQ8ZI2SMk7G 3JB2MIdF6nrpnVpyikydgMe6SKjNtLSRRmp12+ngm+iCnOFLsU/Z7nxoI70fmDPrKYPd oU/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJSTsCnb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w10si15303190pgi.358.2022.02.09.01.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:33:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJSTsCnb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F3F09E05BA5A; Wed, 9 Feb 2022 01:00:33 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353390AbiBGQOf (ORCPT + 99 others); Mon, 7 Feb 2022 11:14:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345732AbiBGQJz (ORCPT ); Mon, 7 Feb 2022 11:09:55 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C9EEC0401E3; Mon, 7 Feb 2022 08:09:47 -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 ams.source.kernel.org (Postfix) with ESMTPS id 54EABB81620; Mon, 7 Feb 2022 16:09:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B487C36AE2; Mon, 7 Feb 2022 16:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644250185; bh=zmd2o9oLA0EJ0hPOoSHeAgUAtJ/i5oTwZaJJrykDlgM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mJSTsCnbTI3gwg/8BhSVQ+RBGPrG+psB6hlPxH2TkERftMdOHpsCZTo5MNoeifO1L oFrULqWEX0iWf+gGMaZH2QDadFBqmSGfutMMDcVyYKu0uwtxsIRlZPSsWP+XN7t+gA r8OaZctUL0ilvXmdCUeQTDILiTKRgaqk5rtCiY+MEkaT+0HodiWd37fMVWTP+uaeya 0zU4tVUBj2JvaEpJfySAVL5/b0dWuwoC3v8xANFI6+v+VCvFYfU5v4dcOruIH8co/X Je4AJeG6Vl3Vyo+7Euuk3LCkuySqicc0lRH4jodrf47WNRi/RLTPmyAnNHDKac1GqM dpmi98M+KgR3A== Received: by mail-ed1-f42.google.com with SMTP id f17so14004784edd.2; Mon, 07 Feb 2022 08:09:45 -0800 (PST) X-Gm-Message-State: AOAM532O3hG1AOvJ2wvbh2SeBUlFdEsZYiP3JcIBVdw+BfdP1NoWV6yQ ZcWy/S4q7xQoelYZctvy2uOm66fB5C2TE5QfGA== X-Received: by 2002:a50:e68d:: with SMTP id z13mr160190edm.307.1644250183395; Mon, 07 Feb 2022 08:09:43 -0800 (PST) MIME-Version: 1.0 References: <20211129173637.303201-1-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Mon, 7 Feb 2022 10:09:31 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] PCI: xgene: Fix IB window setup To: dann frazier Cc: Toan Le , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Andrew Murray , =?UTF-8?Q?St=C3=A9phane_Graber?= , stable , PCI , linux-arm-kernel , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, Feb 5, 2022 at 3:13 PM dann frazier wr= ote: > > On Sat, Feb 5, 2022 at 9:05 AM Rob Herring wrote: > > > > On Fri, Feb 4, 2022 at 5:01 PM dann frazier wrote: > > > > > > On Mon, Nov 29, 2021 at 11:36:37AM -0600, Rob Herring wrote: > > > > Commit 6dce5aa59e0b ("PCI: xgene: Use inbound resources for setup") > > > > broke PCI support on XGene. The cause is the IB resources are now s= orted > > > > in address order instead of being in DT dma-ranges order. The resul= t is > > > > which inbound registers are used for each region are swapped. I don= 't > > > > know the details about this h/w, but it appears that IB region 0 > > > > registers can't handle a size greater than 4GB. In any case, limiti= ng > > > > the size for region 0 is enough to get back to the original assignm= ent > > > > of dma-ranges to regions. > > > > > > hey Rob! > > > > > > I've been seeing a panic on HP Moonshoot m400 cartridges (X-Gene1) - > > > only during network installs - that I also bisected down to commit > > > 6dce5aa59e0b ("PCI: xgene: Use inbound resources for setup"). I was > > > hoping that this patch that fixed the issue on St=C3=A9phane's X-Gene= 2 > > > system would also fix my issue, but no luck. In fact, it seems to jus= t > > > makes it fail differently. Reverting both patches is required to get = a > > > v5.17-rc kernel to boot. > > > > > > I've collected the following logs - let me know if anything else woul= d > > > be useful. > > > > > > 1) v5.17-rc2+ (unmodified): > > > http://dannf.org/bugs/m400-no-reverts.log > > > Note that the mlx4 driver fails initialization. > > > > > > 2) v5.17-rc2+, w/o the commit that fixed St=C3=A9phane's system: > > > http://dannf.org/bugs/m400-xgene2-fix-reverted.log > > > Note the mlx4 MSI-X timeout, and later panic. > > > > > > 3) v5.17-rc2+, w/ both commits reverted (works) > > > http://dannf.org/bugs/m400-both-reverted.log > > > > The ranges and dma-ranges addresses don't appear to match up with any > > upstream dts files. Can you send me the DT? > > Sure: http://dannf.org/bugs/fdt The first fix certainly is a problem. It's going to need something besides size to key off of (originally it was dependent on order of dma-ranges entries). The 2nd issue is the 'dma-ranges' has a second entry that is now ignored: dma-ranges =3D <0x42000000 0x40 0x00 0x40 0x00 0x40 0x00 0x00>, <0x00 0x79000000 0x00 0x79000000 0x00 0x800000>; Based on the flags (3rd addr cell: 0x0), we have an inbound config space which the kernel now ignores because inbound config space accesses make no sense. But clearly some setup is needed. Upstream, in contrast, sets up a memory range that includes this region, so the setup does happen: <0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000> Minimally, I suspect it will work if you change dma-ranges 2nd entry to: <0x42000000 0x79000000 0x00 0x79000000 0x00 0x800000> While we shouldn't break existing DTs, the moonshot DT doesn't use what's documented upstream. There are multiple differences compared to what's documented. Is upstream supposed to support upstream DTs, downstream DTs, and ACPI for XGene which is an abandoned platform with only a handful of users? Rob