Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp570682pxk; Wed, 2 Sep 2020 09:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMv1Bd7IKCacRRDKdahQslrwbBV8dhOBBS4w3TvdDTU6gGodhsxxD/wTj76BUmIfB7O3c7 X-Received: by 2002:a50:8d4b:: with SMTP id t11mr774849edt.5.1599062562166; Wed, 02 Sep 2020 09:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599062562; cv=none; d=google.com; s=arc-20160816; b=ugkQUK0NAJt4cOkk5lIkE2PmMoajbnVufKx2peoLNwCxTFHYdYvt4kjX/tUi5bMnaV 7lSrhLCeD8YJf52d/swO+670cI7REqWHeSm7vmHiiyZAA3B+CVsHkq3ZZ8QnqQfjX7vr 9LT2mfWUKzLLl5X4aev0PBlZv7xmBbg9kXOrZ9xeGw1B9KC5r7lFeIooxh807/5kEVsx CqT+BtEwawFrY/RTYIv/NbuBu6JoV7W0wQ3xdOblR+I8Lvb91K/YB8Ax9envbQ+OLVCn zqqTFposut3+hGxvCUUAXZ5GwgFR0KD7JZ9UliKDiZcMs4KHxsuZ0B5wgdVCzutU1kSk pfBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NzLikGroum7otGzzuqgaYtmOGniySC35H/8l8QKqkTU=; b=rVQGpSAv1lsEv7Nkgen6Y0kDVDFAAkPQgYgSkdpdepLkksaGxHEP3Jg9+xS+W1NnWU 8YMJ2lV7AzIeNDDGhMvRR5kqY3n2fHuXP4PavMjqo55ITIJ6ORHQSw2hzguFbUlFI0YR xVewl+L4cg/wEr9dEWqSXf0jkQh3vGvGZ0D0uaPWzFFRPv1JBmlv96/5vnDC9rh8A0K/ bYwCeejKNCS8EIEhyAgskgcV3QvRsvV1pIKfNu9k2FUU8NRMUJSo3pfZtnFMWPM10iJK HvZdH58TiFR8f0OOuYIVGDrTmxwMDrRGmSyl3rf4kP18yN76QHujMibgXJDjLXNXCA1u /ttQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd8si2927022ejb.656.2020.09.02.09.02.16; Wed, 02 Sep 2020 09:02:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbgIBQBe (ORCPT + 99 others); Wed, 2 Sep 2020 12:01:34 -0400 Received: from foss.arm.com ([217.140.110.172]:41474 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbgIBQBd (ORCPT ); Wed, 2 Sep 2020 12:01:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 24BFE101E; Wed, 2 Sep 2020 09:01:32 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 23D893F66F; Wed, 2 Sep 2020 09:01:31 -0700 (PDT) Date: Wed, 2 Sep 2020 17:01:19 +0100 From: Lorenzo Pieralisi To: Samuel Dionne-Riel Cc: Marc Zyngier , Bjorn Helgaas , Rob Herring , devicetree@vger.kernel.org, Frank Rowand , linux-kernel@vger.kernel.org Subject: Re: Boot failure on gru-scarlet-inx with 5.9-rc2 Message-ID: <20200902160110.GA30014@e121166-lin.cambridge.arm.com> References: <20200829164920.7d28e01a@DUFFMAN> <65d88bdd0888a69849327501a2aad186@kernel.org> <20200831031838.2d6d76d9@DUFFMAN> <90731ebb54fe03003dce03bc7ec4872e@kernel.org> <20200831234542.295b1275@DUFFMAN> <5db50a8e5b251714cebe0a719ee9dc73@kernel.org> <20200901164249.GA15045@e121166-lin.cambridge.arm.com> <20200901143356.0425d9ba@DUFFMAN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200901143356.0425d9ba@DUFFMAN> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 01, 2020 at 02:33:56PM -0400, Samuel Dionne-Riel wrote: > On Tue, 1 Sep 2020 17:42:49 +0100 > Lorenzo Pieralisi wrote: > > > On Tue, Sep 01, 2020 at 04:37:42PM +0100, Marc Zyngier wrote: > > > On 2020-09-01 04:45, Samuel Dionne-Riel wrote: > > > > - if (pci_is_root_bus(bus->parent) && dev > 0) > > > > + if (bus->primary == rockchip->root_bus_nr && dev > 0) > > > > Can you dump bus->primary when this condition is hit please ? > > With the following diff > > --- > @@ -79,6 +79,8 @@ static int rockchip_pcie_valid_device(struct rockchip_pcie *rockchip, > * do not read more than one device on the bus directly attached > * to RC's downstream side. > */ > + printk("[!!] // bus->parent (%d)\n", bus->parent); Please print a pointer as a pointer and print both bus and bus->parent. > + printk("[!!] bus->primary (%d) == rockchip->root_bus_nr (%d) && dev (%d) > 0\n", bus->primary, rockchip->root_bus_nr, dev); > if (bus->primary == rockchip->root_bus_nr && dev > 0) > return 0; > > -- > > I get two kind of results > > [ 1.692913] [!!] // bus->parent (0) > [ 1.692917] [!!] bus->primary (0) == rockchip->root_bus_nr (0) && dev (0) > 0 > > and > > [ 1.693055] [!!] // bus->parent (-256794624) > [ 1.693058] [!!] bus->primary (0) == rockchip->root_bus_nr (0) && dev (0) > 0 > Looks like this is the condition that pci_is_root_bus(bus->parent) is not hitting. [...] > > > > + /* HACK; ~equiv to last param of > > > > pci_parse_request_of_pci_ranges */ > > > > + bus_res = (resource_list_first_type(&bridge->windows, > > > > IORESOURCE_MEM))->res; > > > > IORESOURCE_MEM ? I am a bit puzzled by this hack, what is it supposed > > to do ? > > It's not really supposed to do anything. I only needed access to > bus_res for bus_res->start to keep as root_bus_nr. My complete lack of > familiarity with all of this meant that I simply borrowed something > that was in use in another function to give me the bus_res. You are accessing a resource IORESOURCE_MEM that has nothing to do with bus numbers. s/IORESOURCE_MEM/IORESOURCE_BUS should be better ;-) Lorenzo