From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 671CBC4345F for ; Tue, 16 Apr 2024 08:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y4q2qVqy0VXzElvehW2ifNNB+XTrjI7JhFZEARjBzhY=; b=WxKgf5tMxJ9yzm sHkPuf7MJLaZJHuQ5GtdKBQCc9XMbRE2yQpNnj7tlNUlK4i2Cl5/4NIrB4mnRxuWAPMox+nXUSI3T B/ycl7mt0vd4W8RWnHbbyW/BrbzYKq11YjLArEDrnbRjYNBT0KAPbQObJKQ1lXo7F8yMUNQlRn3TW 0VbN5VaahzRSoaUOsQe40EQEYA3tRGwYWEedcTKTO/QJf9ywrui3bLMITrRdb1HULjpMTol7LDY7a mlMU93nUKTpYMESLzMKS4XABHexn5CYyo6rDv5XimYGa3qeg//REvwj32/ZlmBFv5p8MsWX1EOLvy 28Cp2FfrnfKbQ1r1mO6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwe7D-0000000BRGw-21lU; Tue, 16 Apr 2024 08:24:31 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwe77-0000000BRBC-18NX for linux-arm-kernel@lists.infradead.org; Tue, 16 Apr 2024 08:24:29 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6ed0e9ccca1so3743768b3a.0 for ; Tue, 16 Apr 2024 01:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1713255854; x=1713860654; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=A8bGjiZPk9FOE86PWXYntaE4YFnpmEJwu/r5kYeeL8c=; b=DatQpTSgxxvduGEYFQTuoIJvJ3nQV8o3GeFvwUrcGv5B7aT0GhTlYX1mTW2Qv8OKgg ZHSEBVTyh+4Kv5FoJAYG/a5aj6rZOLCx3Hs+Z3KNS8DMiOiGFGoq7BEpAizZFe+Xvdw1 GE+q1GqNJSFqJiahOCepK0CoQ0r4+oLShLOMvzju8IkHSbCj1jDXrKYC+wx+3rkpwUfj giRE/DgmxaXB/1cTluCWIySk0XoHCXNbi9D74RjcPS2dhGZdywJzvFiKLPyFAucZYib1 hgGU3pblEbVsD78AlrKKTWN769N56wlEFC8ZUTtvoanbhzDSFZxLxFhNhsYy0qUgJZpw /DWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713255854; x=1713860654; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=A8bGjiZPk9FOE86PWXYntaE4YFnpmEJwu/r5kYeeL8c=; b=TMbjv7bq4QH1h8uPmiBjVHLcANivvsCWmK55II8c36fY+2CHDr5ePFGj9JzkQhyLDm yKIgfIDnjCUGhsUTMpMhA4RLCpLiJTmQoFzVLBiuDYfb57KOK2aynscFnVZlnU1HQHuO iRG7k4s5Hm+470X7PrRy/vDV0W+J1utwMFzisLfc8YuyS4mzgsNkvVBdT82G7wY2iVNt 0N8dGNfTiX7g2/oqGUyyj8WH3YAJUI+YLRjPy5pEsptwFzFSpWylo6y1uvX+ow1/X7o4 ig+8IOzu9LdrpZK77rSnHvBtAjDVT2yZ20Idhv2gU4TP/IOq7fmFO1VdI63iXV9WwYhj vl0w== X-Gm-Message-State: AOJu0Ywk7io38jmYZDzubYaqDFVwlrINnI/pzySmC9SZiLek6n4wEKBJ RpdQbxZcezP5PcV/nY2z6IwYcdZ6hHt1YPOaAfRIM5a6Wr18407cZpx0hOysbhM= X-Google-Smtp-Source: AGHT+IEtNrPBcSyqGZZnDLBEg+cxYbGo3RSOg3xz8lC9cOiauWkZaAkBaPfo4SIdnCTTCnH+XxMOOw== X-Received: by 2002:a05:6a20:3c8e:b0:1a7:89bd:9e8d with SMTP id b14-20020a056a203c8e00b001a789bd9e8dmr12355925pzj.7.1713255854107; Tue, 16 Apr 2024 01:24:14 -0700 (PDT) Received: from sunil-laptop ([106.51.187.230]) by smtp.gmail.com with ESMTPSA id az21-20020a17090b029500b002a0187d84f0sm8458211pjb.20.2024.04.16.01.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 01:24:13 -0700 (PDT) Date: Tue, 16 Apr 2024 13:54:04 +0530 From: Sunil V L To: Bjorn Helgaas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, acpica-devel@lists.linux.dev, Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Robert Moore , Haibo1 Xu , Conor Dooley , Andrew Jones , Atish Kumar Patra , Andrei Warkentin , Marc Zyngier , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [RFC PATCH v4 03/20] PCI: Make pci_create_root_bus() declare its reliance on MSI domains Message-ID: References: <20240415170113.662318-4-sunilvl@ventanamicro.com> <20240415231523.GA139682@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240415231523.GA139682@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240416_012426_231469_EE0CB998 X-CRM114-Status: GOOD ( 28.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Bjorn, On Mon, Apr 15, 2024 at 06:15:23PM -0500, Bjorn Helgaas wrote: > On Mon, Apr 15, 2024 at 10:30:56PM +0530, Sunil V L wrote: > > Similar to commit 9ec37efb8783 ("PCI/MSI: Make > > pci_host_common_probe() declare its reliance on MSI domains"), declare > > this dependency for PCI probe in ACPI based flow. > > > > This is required especially for RISC-V platforms where MSI controller > > can be absent. However, setting this for all architectures seem to cause > > issues on non RISC-V architectures [1]. Hence, enabled this only for > > RISC-V. > > > > [1] - https://lore.kernel.org/oe-lkp/202403041047.791cb18e-oliver.sang@intel.com > > > > Signed-off-by: Sunil V L > > --- > > drivers/pci/probe.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > > index 1325fbae2f28..e09915bee2ee 100644 > > --- a/drivers/pci/probe.c > > +++ b/drivers/pci/probe.c > > @@ -3048,6 +3048,9 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, > > bridge->sysdata = sysdata; > > bridge->busnr = bus; > > bridge->ops = ops; > > +#ifdef CONFIG_RISCV > > + bridge->msi_domain = true; > > +#endif > > Ugh. I looked at [1], but that's not a very good justification for > this #ifdef. The fault mentioned in [1] would need to be fixed, but > not this way. > Thank you again for the feedback! I agree. This is due to my limitation with knowledge and resources to debug the issue happening on non-UEFI x86 system with some particular PCIe RC. Also, I was worried that we get into a rat hole of assumptions/quirks with various architecture/PCIe RC combinations. For ex: I think the issue is, somehow MSI domain is not set at the time of PCI host bridge registration in pci_register_host_bridge() causing PCI_BUS_FLAGS_NO_MSI to be set. This causes pci_alloc_irq_vectors() to fail. In portdrv.c, pcie_init_service_irqs() doesn't switch to INTx handling if MSI can not be used. It switches only if pcie_pme_no_msi() returns true. I couldn't find who actually sets up MSI domain bit late on this platform so that it somehow worked when we didn't set this flag. Unfortunately, I don't have system to root cause and fix this issue with confidence. Also, I don't know if any other architectures have similar issues which are not caught yet. Hence, I thought it may be better just restrict the change to RISC-V. Let me know your thoughts. If there are better ways, I will be happy to update. Thanks, Sunil _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel