Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3717319ima; Tue, 23 Oct 2018 10:06:32 -0700 (PDT) X-Google-Smtp-Source: AJdET5dd1XK7Vhin+ih13VpiOxO8vqExy18VIODqJBsRII1rqW8m6pXAt1KIG3UI2aYPKLYhj5il X-Received: by 2002:a17:902:14e:: with SMTP id 72-v6mr1250049plb.299.1540314392641; Tue, 23 Oct 2018 10:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540314392; cv=none; d=google.com; s=arc-20160816; b=gve5i7tM1M553Fq2XvDcPKTSxvGVRAjRv7XOk+f3E4fO1zlt0qfmRaJm3R3G4HDVGT lIGUKQ/g32CaSJ7CKJmZkm4mJJ0c8lhdaTjuLE6eOmiVKkXG95qxT1EkEpOBYmGXBpHE OkjVrvHfSGyY1+TTQTN0s2nqeB3mjYvZIgSFjwDUbnma2p7NjsXZz571h3fTXbqQZ9Up YrjqMpTJ7hzUelQozLVFTQ2eIl9UF0fwsrhe8FsUC1uilnbZCMNjhPvgIHl4rPr0gKjd bNcIhFjnBiDUs3MyiiCty48G98yx0NWpfjr3xXIfW/ENavsBdVD8OydRQ7Y+ZpvFCK7d mTJA== 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:dkim-signature; bh=cqaAMi/QQV4ehSg0EBVe7U12FwF1qIplgsNZsHzgywk=; b=RPT2Y335aOk0uVfhTL4FAK3RtLSK6oqob7MN3p2TS0gf3+8WWtpQ+e+RbxzpVLSFEp knF/ItvBWW2AqpDo7pi4UetbzPR7nWTAAYh6IgRWWtX2Lr6xLN/hhr3WJDzG7a6v9qdR cC/6sjrZ27henThZ4X58A8SAaOrgSkLNgiwIOw9omxx3KJ+cgP60rz/uKKQpsoiHX+VI YifHmYWI/Dla/Tn5qXENaqXKUA5W1NepG/k3MD7+BcxOSjv5K+0xwhBB6dXVjdiIMz7X AkzE9L0K1baoL+iWtD7phNQ1KK9PSsfRz+l1z+SVnAh2Eqby6nSvZUll4CyHI709Zluo CdRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LTsY33CL; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si1788289pga.6.2018.10.23.10.06.04; Tue, 23 Oct 2018 10:06:32 -0700 (PDT) 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=@kernel.org header.s=default header.b=LTsY33CL; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728707AbeJXB17 (ORCPT + 99 others); Tue, 23 Oct 2018 21:27:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:38060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728065AbeJXB16 (ORCPT ); Tue, 23 Oct 2018 21:27:58 -0400 Received: from localhost (173-25-171-118.client.mchsi.com [173.25.171.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 181DA20665; Tue, 23 Oct 2018 17:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540314225; bh=LvDDZ0w2nfjnEh/gQrBUQbsr+G1T51Ur6P5Szasppnw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LTsY33CL20e3eO1U2Y8xnJH4DBO+Tb4/2QArv6BaIjCAJg/DXuYipuG4ezW+7Nv6w k2PB0jfljLbYvAGr2af8CCwo489TT0VQywndnAqySC1ztJe2/0DLCWiOQDKcXf1EEI Ka11mLyuSMsplYBf2xEcLdiSUncjEeXHlW13O7TI= Date: Tue, 23 Oct 2018 12:03:43 -0500 From: Bjorn Helgaas To: "Guilherme G. Piccoli" Cc: linux-pci@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, andi@firstfloor.org, lukas@wunner.de, billy.olsen@canonical.com, cascardo@canonical.com, ddstreet@canonical.com, fabiomirmar@canonical.com, gavin.guo@canonical.com, jay.vosburgh@canonical.com, kernel@gpiccoli.net, mfo@canonical.com, shan.gavin@linux.alibaba.com Subject: Re: [PATCH 1/3] x86/quirks: Scan all busses for early PCI quirks Message-ID: <20181023170343.GA4587@bhelgaas-glaptop.roam.corp.google.com> References: <20181018183721.27467-1-gpiccoli@canonical.com> <20181018221538.GN5906@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.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 22, 2018 at 05:35:06PM -0300, Guilherme G. Piccoli wrote: > On 18/10/2018 19:15, Bjorn Helgaas wrote: > > On Thu, Oct 18, 2018 at 03:37:19PM -0300, Guilherme G. Piccoli wrote: > > [...] > I understand your point, but I think this is inherently an architecture > problem. No matter what solution we decide for, it'll need to be applied > in early boot time, like before the PCI layer gets initialized. This is the part I want to know more about. Apparently there's some event X between early_quirks() and the PCI device enumeration, and we must disable MSIs before X: setup_arch() early_quirks() # arch/x86/kernel/early-quirks.c early_pci_clear_msi() ... X ... pci_scan_root_bus_bridge() ... DECLARE_PCI_FIXUP_EARLY # drivers/pci/quirks.c I want to know specifically what X is. If we don't know what X is and all we know is "we have to disable MSIs earlier than PCI init", then we're likely to break things again in the future by changing the order of disabling MSIs and whatever X is. Bjorn