Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1916301lqp; Tue, 16 Apr 2024 01:24:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2jJN2r0VxBlinKIqYcqSoAaLW/OtAnQf9AZjiKv4VQdhJSpg5Hk3B0z3TEAGX/dErMwiseYsgW163DR8ZShG7z1RuTgCPSodNQZJ6Xg== X-Google-Smtp-Source: AGHT+IHxSN0Js7Z0eJ+VgdtNgH2tqIR+wA9ppyJtwZkXf5xPsSFUcJ9qzXlmSZAcAp0Dzfopshlm X-Received: by 2002:a17:906:ef08:b0:a52:6e71:e770 with SMTP id f8-20020a170906ef0800b00a526e71e770mr4005583ejs.11.1713255867722; Tue, 16 Apr 2024 01:24:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713255867; cv=pass; d=google.com; s=arc-20160816; b=Lvc3PQR+lRboXqw6l1JrVCsZh24GjovjavVXITUFh4lEC5eJfPQvrUnnhwpsC1FAtO MSFvothapoA4uAJnRuUgIxdgdFCXtqsWSpiu+z/lBHIjuBFMdY6BUy/hkLX3M5MDGJ5H LDTeqTE4fN8Q6JS/1k5W3nHgeoegzv+ttvEchgNvjC3CacVvu00Y/5u82bljqDmrswZf pdD8iZasETKFSNrqKzUcrpVSjPNPRJxOobGfQP57NY6wBzsB0NKZXc3s+FDnCc8TLlvt z7UpaydnQ7SIjDKxoZhLJqLfvhtPLPxsEqZAz2O9UciBfVO3tfwpC6szDyRSYcJU+GG+ 6HFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=A8bGjiZPk9FOE86PWXYntaE4YFnpmEJwu/r5kYeeL8c=; fh=gLjTEPA1hq4HB86wye7dDC03mRHJpZajAadI1HanG7E=; b=kGG3tUx0mdYwlb95a6QCbGVJj7VVhGts0PF3l6C0TJeTCcZHdifEVBa6hH8Qk1cOGC 5DIE7QU1agDymXhWOZjPuB7NVeATxY8x2i3q0r8DYJnUvff9KACdiOlxBRDT/Ifs860H ua0Z/mEvgzPw9F1GshpoyBGmBe3DyoxDNT7I0VnCsQ0ZvVnepuL/c17RdMOlJLXbudL1 gnKdfdji3xmIY4U8zy99YFcuUxNv78zOSe2Hqv9iOVh/580AAf9htUKehr8KZlDvuyRZ P+ntxi+IJkx/JOMt4yEaIdSDXMGEigAufAeSll7e/02Pr9m5epBJLzHxzRHwnTV2cYU+ 2PPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XbrYob97; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-146494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146494-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qb11-20020a1709077e8b00b00a51b9000041si5795310ejc.436.2024.04.16.01.24.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 01:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XbrYob97; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-146494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146494-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4F2B01F23611 for ; Tue, 16 Apr 2024 08:24:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB1FC136E28; Tue, 16 Apr 2024 08:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="XbrYob97" Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7081139CFF for ; Tue, 16 Apr 2024 08:24:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713255856; cv=none; b=WYgRfqb43KybBo0u888qVU20TvU1r3cf4GaY2iFri+ti51K1PrYwNnvXiGhN960JnT3VABzwCAUo7etoxbmxz2QJNAZ8ShwMSS/4mPDyM7/NPvZGXAI8WQSdTiL+zDHhDU51+9m+/+YECLR0Yh8pUfRpA+dK3Mc7zhz5zOzxsTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713255856; c=relaxed/simple; bh=sze8yZb++qhFw0hrhcH+G01pDCr7nF4LIAaKF7TjURE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VmkrZL0xJHgNNIFIShnTV54KvzLwY0jpV1+B/FKFLpWW3HN5BehSt93Nm6GpG+IIi1atvbh9haqdw1CaTUaHBXyjvARpPuaSeaL+Y2PFyh2waWlB0OgBw23JPNXicil5kp6bpo4YAw6KCzW7HR7LJuHOmmTwUkxngVSypeUNegk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=XbrYob97; arc=none smtp.client-ip=209.85.210.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6ed691fb83eso3343764b3a.1 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=vger.kernel.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=XbrYob97QBqYx50iq2g1MgVkDOzbOWL4wwBIBB73kj0h70S1DDOfV4oxmfutQfzEyu k6U6QuApooGD07c6ilhNd/vQMWqSgnUeha5s/lhif070572flPVyXVFydCw7xA8i9G+4 6/CRKT2EahPZvJ/TkyGzaPcvJdRR51gvJykomAcxv/hsc1X7og6JEdUhcB057kdlYq0E HCi1SHxqAnXkuk6O3B1gy+Fzza8M5bqeTVyzorPgBPT+qvOWE1v/O+cPvWNcZ2OlO0u2 GZBqJsJTYJRko3cdaIsr8zLVRG6zybDRxpN3ygHvHCB/ZuaX3s+iw2SzDuhNGBVz8OYr 7jKA== 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=nsGsfQxxilY6aJ3kMM6yWTO/CUgJRiHxnweGoZXgYuaJm3QlArEVeHAtwFKqsABvbl ZY66jx9PYnmoavI1E2pfWJhB5V3LGcPv4w2p3VfU+9LgpkRQsI7+8e5e5HkezchFNCqQ L3poT9WkADfBoDOaMoHphsZ/hoJDy9aG2eS/JDGBeSNQByxvjnzkhuHpdbtBSfpbtmZE VJQrrXdgTsJpkkgnqxUXn98KI/mQXIRUd+hUgfpj+9rpKZBBzFE+TzF6NTZbURJxA8D/ dIzOllwpadYlcjx9m14JhMAO3rWwHcmRMxSyqZbN76nW17NzujN0yCTIeNWE9pTwSazl Qcwg== X-Forwarded-Encrypted: i=1; AJvYcCWFLJq8mnvEtYqR8DGxretY2t3IzWLL58FyHIkQeaOSq+rXQ/wig5+uMTEyNI0L5f7o3wMNRVZVECMUWRjYxDETV6y1nGV9I05dvasf X-Gm-Message-State: AOJu0YzeSHFGeyM0KmJEYI7NSW1XmBgumkaP/aZ4iPzHRm2UQQcxQFsk jQPG5M6v5gEZ/3AWHxJtOZYEo6vogRrp/RKHiCbD/mUo3+Q3hJWDUDen7XLK9JY= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240415231523.GA139682@bhelgaas> 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