Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7178120imu; Thu, 31 Jan 2019 06:17:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN4g5eAWRmclcuryZJ3Zsz0u3lYUPS2qzovsA0IN9q9dRNqVx2jTdsvDau8UUTXrEaaeV6vm X-Received: by 2002:a63:e80e:: with SMTP id s14mr31556656pgh.30.1548944224488; Thu, 31 Jan 2019 06:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548944224; cv=none; d=google.com; s=arc-20160816; b=yBcclEks4qTkN9jOlrRalhpWtKe0h4CdCUS8WGbFGY+dRn9ZL95eHYIO0JCkc0uenC akBkfglUkZnBb13v1tlo8CpgkNhOR+Ej/v8txY+cQ/2r5hI1OUsGBOEmJgIxM5mQW2Vy 20dOhWsugvNXBG2aLU3kB6o4xuVC3WmSMJNChd9USjhtF225pMrXR4axgDQvbUQNBO33 jIB0CfoUhmQWcFEiq483f7mgbcWUAcxKt9tkce6r1zRR1bEvJilkN9p2o9jey8Vj1ilC VwbEBi2lA39gcH87eewxCnPX2O8aU7krZVXhuo5f418uQlmWXeJMze/aMNMIJmZlX5Xn Witw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8QSwmO+7UtDMUl2h5bXPkoUcbj9z4wWNhNk0IkYYWEw=; b=0EdaC2oQofgYvy78vlMNa9v3kDcQ4qttO+8sX6gkCMk4SwSC6XvsIKeJLK4a64cnpo bq7T12bcGQuNQaTwcRjrFqTKfJYw5CvsnwE6hr0rZCVs4DgFQ9SBZgxfVZehwKvEh3sV SZyFIsCnvJviLNsL6O2IfRwv0s9m2l4x4zTIsXcchipU64JYlRcxH+MP7oosQLPEAW0O wcoA8SCCAvG4240EiAVIBt7WIDzRirM+icoDkB8s2z6ZW0jHGMmZJW45w2dltC+oPxF+ 46ICiXl36J7Y/WadLuPl+3YacCCDtT40luc51MZf5tlpjE96/Gz8XauRlAVkJcvMquwE LkJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hcEz7N8k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si4359631pgi.438.2019.01.31.06.16.48; Thu, 31 Jan 2019 06:17:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hcEz7N8k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727434AbfAaOQF (ORCPT + 99 others); Thu, 31 Jan 2019 09:16:05 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:56198 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbfAaOQE (ORCPT ); Thu, 31 Jan 2019 09:16:04 -0500 Received: by mail-wm1-f67.google.com with SMTP id y139so2639944wmc.5 for ; Thu, 31 Jan 2019 06:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8QSwmO+7UtDMUl2h5bXPkoUcbj9z4wWNhNk0IkYYWEw=; b=hcEz7N8kKKaaS/V3KJhjoSjIwwPae2DwBzoJj0cdXpgjdjy8SHgN246zqrZN0GeUNS cKpuUL24AflhsXRTVKIq9KjwCO45KxHOHT8fNOkkBBYuxVKRlf0z7hdgF8z5hku7ehcA t4HoeDLXZDBlNG6pblaLZ+w37HtR8drwufDfZH55BQsvJgc2NITYf8Uo69yCF0LtDI+Z QR9ZlAGNLnT+mLM/WLGLaj1prDk1pE9kr+mS8ef0BbnMbjgvLrgCPM5p7Q2wyq1/sY+I BpRrXsFdbnc2eFOzlVR3yPXrL0AlMFJ74AQBNRbJvvF7EIBRh44G54Jt7u+Pwc/LYODe fq7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8QSwmO+7UtDMUl2h5bXPkoUcbj9z4wWNhNk0IkYYWEw=; b=COhmdBzS4U+BoB/2glOClNUSmkcCHu0uvHbbH4S4z8uPFCqgWWYM3QM2UaHFrXjxXw dhDkVlDMW9uEcsxyGvTP6jW3eXE44fquuffNVR8uY0oc/z6Zc6CLQQM7bnW3PuXjjbGb YuVO4wND4SDcM3JodvCED5mOezSLq31Mj5SGIBrtsjKWEqAgQvpB86/qCnsajHR/WieM j6ptKzECvx9B+MRNzWniKwaykI2U/Mi16RNmhVMG7K0GmncxUXSMIPe7/BOzn/bIFNHx bezYsS/RYqcVywuIiLnslvR9AYWU7hjN+DkFUntjIV5nelDbc7rFsqAo3kj4AhiXKZ7d S1Sg== X-Gm-Message-State: AJcUukeZSPahWKpdtK97OSfv1qjCcezfHjJjzRRNM3+TybJwqY2j5Xqe vRsHLvaQGJEiItQhQoCYeWfiB3rPlgUPW3EUeMS5dq68CsvJ X-Received: by 2002:a1c:3d44:: with SMTP id k65mr29416104wma.76.1548944162606; Thu, 31 Jan 2019 06:16:02 -0800 (PST) MIME-Version: 1.0 References: <20190131134033.1ed0021d@canb.auug.org.au> In-Reply-To: <20190131134033.1ed0021d@canb.auug.org.au> From: Bjorn Helgaas Date: Thu, 31 Jan 2019 08:15:50 -0600 Message-ID: Subject: Re: linux-next: manual merge of the vhost tree with the pci tree To: Stephen Rothwell Cc: "Michael S. Tsirkin" , Linux Next Mailing List , Linux Kernel Mailing List , linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 8:40 PM Stephen Rothwell wrote: > > Hi all, > > Today's linux-next merge of the vhost tree got a conflict in: > > drivers/pci/setup-bus.c > > between commit: > > 51c48b310183 ("PCI: Probe bridge window attributes once at enumeration-time") > > from the pci tree and commit: > > 955156f34e7d ("PCI: avoid bridge feature re-probing on hotplug") > > from the vhost tree. > > I fixed it up (hopefully - see below) and can carry the fix as > necessary. This is now fixed as far as linux-next is concerned, but any > non trivial conflicts should be mentioned to your upstream maintainer > when your tree is submitted for merging. You may also want to consider > cooperating with the maintainer of the conflicting tree to minimise any > particularly complex conflicts. 51c48b310183 and 955156f34e7d are both to solve the same problem, so I think the best resolution is to drop 955156f34e7d from the vhost tree completely. The remaining wrinkle to work out is that we need a stable backport. 51c48b310183 is technically a little large for a stable backport, so I want to have a solid justification for it. As soon as I get a kernel.org bugzilla with those details (who's affected by the breakage, what the failure looks like, how to reproduce it, etc), I'll add that URL and the stable tag. Bjorn > diff --cc drivers/pci/setup-bus.c > index 1941bb0a6c13,d5c25d465d97..000000000000 > --- a/drivers/pci/setup-bus.c > +++ b/drivers/pci/setup-bus.c > @@@ -735,17 -735,50 +735,26 @@@ int pci_claim_bridge_resource(struct pc > base/limit registers must be read-only and read as 0. */ > static void pci_bridge_check_ranges(struct pci_bus *bus) > { > - u16 io; > - u32 pmem; > struct pci_dev *bridge = bus->self; > - struct resource *b_res; > - > - b_res = &bridge->resource[PCI_BRIDGE_RESOURCES]; > + struct resource *b_res = &bridge->resource[PCI_BRIDGE_RESOURCES]; > > + /* > + * Don't re-check after this was called once already: > + * important since bridge might be in use. > + * Note: this is only reliable because as per spec all PCI to PCI > + * bridges support memory unconditionally so IORESOURCE_MEM is set. > + */ > + if (b_res[1].flags & IORESOURCE_MEM) > + return; > + > b_res[1].flags |= IORESOURCE_MEM; > > - pci_read_config_word(bridge, PCI_IO_BASE, &io); > - if (!io) { > - pci_write_config_word(bridge, PCI_IO_BASE, 0xe0f0); > - pci_read_config_word(bridge, PCI_IO_BASE, &io); > - pci_write_config_word(bridge, PCI_IO_BASE, 0x0); > - } > - if (io) > + if (bridge->io_window) > b_res[0].flags |= IORESOURCE_IO; > > - /* DECchip 21050 pass 2 errata: the bridge may miss an address > - disconnect boundary by one PCI data phase. > - Workaround: do not use prefetching on this device. */ > - if (bridge->vendor == PCI_VENDOR_ID_DEC && bridge->device == 0x0001) > - return; > - > - pci_read_config_dword(bridge, PCI_PREF_MEMORY_BASE, &pmem); > - if (!pmem) { > - pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, > - 0xffe0fff0); > - pci_read_config_dword(bridge, PCI_PREF_MEMORY_BASE, &pmem); > - pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, 0x0); > - } > - if (pmem) { > + if (bridge->pref_window) { > b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH; > - if ((pmem & PCI_PREF_RANGE_TYPE_MASK) == > - PCI_PREF_RANGE_TYPE_64) { > + if (bridge->pref_64_window) { > b_res[2].flags |= IORESOURCE_MEM_64; > b_res[2].flags |= PCI_PREF_RANGE_TYPE_64; > }