From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751055AbdCPADq (ORCPT ); Wed, 15 Mar 2017 20:03:46 -0400 Received: from one.firstfloor.org ([193.170.194.197]:56598 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858AbdCPADo (ORCPT ); Wed, 15 Mar 2017 20:03:44 -0400 Date: Wed, 15 Mar 2017 17:02:48 -0700 From: Andi Kleen To: Thomas Gleixner Cc: Bjorn Helgaas , Andi Kleen , Andi Kleen , bhelgaas@google.com, x86@kernel.org, linux-pci@vger.kernel.org, eranian@google.com, Peter Zijlstra , LKML Subject: Re: [PATCH 3/4] x86, pci: Add interface to force mmconfig Message-ID: <20170316000247.GD14380@two.firstfloor.org> References: <20170302232104.10136-3-andi@firstfloor.org> <20170314154155.GG32070@tassilo.jf.intel.com> <20170314170255.GH32070@tassilo.jf.intel.com> <20170314194720.GD26264@bhelgaas-glaptop.roam.corp.google.com> <20170315022414.GC14380@two.firstfloor.org> <20170315025549.GA13191@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > pci_root_ops is what is finally handed in to pci_scan_root_bus() as ops > argument for any bus segment no matter which type it is. mmconfig is only initialized after PCI is initialized (an ordering problem with ACPI). So it would require updating existing busses with likely interesting race conditions. There are also other ordering problems in the PCI layer, that is one of the reason early and raw PCI accesses even exist. > > The locking aspect is interesting as well. The type0/1 functions are having > their own internal locking. Oh, well. Right it could set lockless too. The internal locking is still needed because there are other users too. > What we really want is to differentiate bus segments. That means a PCIe > segment takes mmconfig ops and a PCI segment the type0/1 ops. That way we > can do what you suggested above, i.e. marking the ecam/mmconfig ops as > lockless. There's no need to separate PCIe and PCI. mmconfig has nothing to do with that. > Sure that's more work than just whacking a sloppy quirk into the code, but > the right thing to do. Before proposing grandiose plans it would be better if you acquired some basic understanding of the constraints this code is operating under first. -Andi