Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1065141pxv; Fri, 9 Jul 2021 16:44:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrtqtg+MtT3GKDQBkEx2xmA8wfmgfxIXMlDwmmw5g/7rc2KGnUqTwNssz7L3kTCp7s9dRW X-Received: by 2002:a92:c0cc:: with SMTP id t12mr13847664ilf.47.1625874250182; Fri, 09 Jul 2021 16:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625874250; cv=none; d=google.com; s=arc-20160816; b=A3bN0E15Wk2qSX0WBrQn7jZraWm66+ZuIJkLa+0U1rDWh7I7ZOCE7M+6hluznE1T7n HI5jbCLOmlvTAWHGqr43UoQQ6TcVvQPF1iJUOxTQsrIKZ2S2G99cVPohhdelnR65gEs0 PpK2bVzkkVpCBllD9/REd1OhjqNy+4YW4yRDhqXUSMiJ0tsI0isqNgJV1wb7gUDEp/tz ukOMAO/ffE3F8Zwtywf1NuExvQ//Ijx+b5aE54qqU1VK5QGeJMrbH6s2HI8r3K+HBQNq D2M0APdqr+F71oUNRfA8dOJDmCIk8zLICjCHAOAEQu1eiMpQr2DdoBUJyF728/Qi/5H8 lYpA== 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=Q2V5d/APNPVrs9dJJLJXoXWpqhzmE2xidjLwZfm2+Os=; b=ZrOxdIW2xf0gOWeRQJc2cxGd6L41+1YRpADkUyPqAK1xcdvhDJYkzClRBENxlcGzNa MWQS+aOR4k8l9Iz1DoILKRY1/zygEjv0qlcoLb/XfqNoj/ew48X8SBRb6RLcgr0wC0Fr tZaIVP/EpB8qHxbaxNuKi+owqXDSYoMwfjsgcWpDzjRe61jfrLuZo6EwPo0ZDp4zaiR3 y8Kpg1FwwBKFIStmdWcZo8JeXIWd9ZOgWuTZGFE8Q/t3etfrvh+GXN6ttyuFats4CVIM 5/ALQ3Pdr9LYDFFjSatxFYhRTwl8U/vnBCjpozRIotZLB0U6IdEcRo8Iyj6u7tsnpOOX i22g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y2EMvkM9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si7984214jal.57.2021.07.09.16.43.58; Fri, 09 Jul 2021 16:44:10 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y2EMvkM9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231325AbhGIXqB (ORCPT + 99 others); Fri, 9 Jul 2021 19:46:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:44018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230130AbhGIXqA (ORCPT ); Fri, 9 Jul 2021 19:46:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46DF3613BC; Fri, 9 Jul 2021 23:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625874196; bh=rWYYHfcOSsh0+iRHRkiaPEjeYRspao8067seJfDvmTk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Y2EMvkM9O5dFAayo85pBHP/mtYjIFpyHdRxAJXIpEdD51R+GE2mwuA2QnbyT/7Ais p1H8blEx358/42mlk6e6bsspojOWfttNM87lCKgTlgal4BCw39EbxMNBMeV3zDp/tf LY6FkPWOqc6Ssr6tZotabvroaDZIj9Nl3NXIGAUhbPFnwUNtn9J6QsMX7DwDeF38f7 dE7xOnnyB20xgbo1+49eA+OPHVz7hX7fyGlIKwsh7FS8aZxXSHCqR3nD3HRkYtO4Hx Sy3yS/vy3EzR2BsbnMRzAh33Umf3O2MWWfeSgHzEkbXfdkYvb2MLe6WQvpqz81a0Ay I3X7VhGwFzQ8Q== Date: Fri, 9 Jul 2021 18:43:14 -0500 From: Bjorn Helgaas To: Guenter Roeck Cc: Kai-Heng Feng , bhelgaas@google.com, "open list:PCI SUBSYSTEM" , open list Subject: Re: [PATCH v2] PCI: Coalesce contiguous regions for host bridges Message-ID: <20210709234314.GA1181719@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210709231529.GA3270116@roeck-us.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 09, 2021 at 04:15:29PM -0700, Guenter Roeck wrote: > Hi, > > On Thu, Apr 01, 2021 at 09:12:52PM +0800, Kai-Heng Feng wrote: > > Built-in graphics on HP EliteDesk 805 G6 doesn't work because graphics > > can't get the BAR it needs: > > [ 0.611504] pci_bus 0000:00: root bus resource [mem 0x10020200000-0x100303fffff window] > > [ 0.611505] pci_bus 0000:00: root bus resource [mem 0x10030400000-0x100401fffff window] > > ... > > [ 0.638083] pci 0000:00:08.1: bridge window [mem 0xd2000000-0xd23fffff] > > [ 0.638086] pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100401fffff 64bit pref] > > [ 0.962086] pci 0000:00:08.1: can't claim BAR 15 [mem 0x10030000000-0x100401fffff 64bit pref]: no compatible bridge window > > [ 0.962086] pci 0000:00:08.1: [mem 0x10030000000-0x100401fffff 64bit pref] clipped to [mem 0x10030000000-0x100303fffff 64bit pref] > > [ 0.962086] pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100303fffff 64bit pref] > > [ 0.962086] pci 0000:07:00.0: can't claim BAR 0 [mem 0x10030000000-0x1003fffffff 64bit pref]: no compatible bridge window > > [ 0.962086] pci 0000:07:00.0: can't claim BAR 2 [mem 0x10040000000-0x100401fffff 64bit pref]: no compatible bridge window > > > > However, the root bus has two contiguous regions that can contain the > > child resource requested. > > > > Bjorn Helgaas pointed out that we can simply coalesce contiguous regions > > for host bridges, since host bridge don't have _SRS. So do that > > accordingly to make child resource can be contained. This change makes > > the graphics works on the system in question. > > > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212013 > > Suggested-by: Bjorn Helgaas > > Signed-off-by: Kai-Heng Feng > > With this patch in place, I can no longer boot the ppc:sam460ex > qemu emulation from nvme. I see the following boot error: > > nvme nvme0: Device not ready; aborting initialisation, CSTS=0x0 > nvme nvme0: Removing after probe failure status: -19 Thanks for the report and bisection! I'll try to get this reverted before v5.14-rc1. Bjorn