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 48128C4345F for ; Thu, 18 Apr 2024 11:46:23 +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=2dYy10AHLC+qVHfGtq2rDT1TO02NpKVw3us/M7g4zqo=; b=sNYtjqE7WX/+Ff +giHJknJKdTaEzh+hK/tNNiLsxtSISLoCXFrq9s+ZeDNLklVI/+V4MnxZtAOxLLemV8H+jLzwJjn6 KJvuaXesHorX2/aMGVEtC0BoL+WuQXHEu36G0DeZgdkDjBCb1Nk6+jRCVjlEObY/G7I+prgQQda3Z SoE24/5g0Tc9T3FrN+pjeliyJWKfxU4CY2Pp9dlCPHYWIg/LvOWWKDgAj4MyZ+2cseEnKP2lOA7Mp wJuPhBy6uJilwvvbo7qa1rMU5RDeDMXSX2vz9BWgy0XEfBmrtNGvQYdcAizOAibKIXVvgLl+gtHmu pX1B5ounhKMQ0mSwmWwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxQDT-000000022mi-0LjV; Thu, 18 Apr 2024 11:46:11 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxQDP-000000022ld-06N5 for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2024 11:46:08 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1e852b2c780so6278965ad.1 for ; Thu, 18 Apr 2024 04:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1713440765; x=1714045565; 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=tse31PpId242mWCWoF9F68b2IO88pQ6rFBjaTyilK9M=; b=UvEng+BhsQI00F5NyWnH8TFLnUuHb9PLGQJQO1w79hnx1sm6Va2wobTeOjMTVpjd5g Ua+pLus+l5t4YWJkCfLbaLmSLAfxlic3tWZf4T9wnLQqWLHSGZHb/X5XniDH+o/HYwHU LWoLxdIR3mHTz1NJGO7mRNEHGYVB1NYeKnPcisnrl+BOxmnCEW1hWHOMLvRmv2K9FZO0 YMrsw959WgEheE99TRbgTVmt+M20Qlxvx5dWCTXmfwXlUyKhH/JicPS/pWMebB4bW518 GGq9CbqUByzp4miPgJst0+PZNpwa1f2im5yKevIsljZ1YZ45rwLirTJ6QoYIV1Dtluzh kNIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713440765; x=1714045565; 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=tse31PpId242mWCWoF9F68b2IO88pQ6rFBjaTyilK9M=; b=VIMgH3bfIpGbXpavDnB7gk4XPVNNGl0X1SjGKTHLE0iS4h2YECygiIxx40fteWCQxQ djgm6ZK0aj59cUmVDGtoe4H3PjWH1OkaXfYMHsosKyAOt9Y/7Utbh/eZUv8tOfSCwbEF xt74dgrHNgg3g1WnlkAwAb5OMY+xdkIdWaBR0S/FSELafrP5GiD4zVI40Lr3DpvFEybI yvA2edZtzE4ldBuXAtpfwIHgL/992Yq+H8Ini6m8hdcPO+D3HVJnav4ElBUI6Yd8B0UO mYPaJrLjeBjwR/UJ587XjH8Uri2Rdl/lnwFI21u0ppQXw/xXi0gU870EKbgxu2Ezqpf3 zvqw== X-Gm-Message-State: AOJu0Ywt3vfLDRgqiG4xHNu3zahn2cWETTjkbV8kepPeLigyJ3XwqoRg c1AIzeAZdQf03PJ/YmEpHPtMwHYNdINS4FFbqCGNjCgoLrtxLIIUNMEHh8LoBjw= X-Google-Smtp-Source: AGHT+IHRN0PX0++JRfnr2/T3yLJtW4R020dQU6g3OEB6EOIeUseXqxzCCZJlgMQ9PVF1Si/Jw1nqbQ== X-Received: by 2002:a17:902:ec90:b0:1e4:911b:7a6b with SMTP id x16-20020a170902ec9000b001e4911b7a6bmr3458551plg.61.1713440764817; Thu, 18 Apr 2024 04:46:04 -0700 (PDT) Received: from sunil-laptop ([106.51.189.72]) by smtp.gmail.com with ESMTPSA id x1-20020a170902ec8100b001e5cadbdf8csm1327734plg.37.2024.04.18.04.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 04:46:04 -0700 (PDT) Date: Thu, 18 Apr 2024 17:15:53 +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: <20240416204653.GA164172@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240418_044607_080508_30A191B9 X-CRM114-Status: GOOD ( 19.76 ) 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 Wed, Apr 17, 2024 at 09:03:13PM +0530, Sunil V L wrote: > > I think fundamentally there are two issues here. > > 1) MSI domain should have been setup properly when > pci_register_host_bridge() is called. I see that pci_arch_init() which > is supposed to get called early calls x86_create_pci_msi_domain(). > pci_register_host_bridge() also calls pci_set_bus_msi_domain() to setup > the MSI domain which can walk up to host bridge to find. So, not sure > why PCI_BUS_FLAGS_NO_MSI is getting set. Is there an issue in walking up > the tree? > I think I understand now why this is happening on X86. In X86, even though x86_create_pci_msi_domain() sets up the MSI domain, it never informs IRQ framework. Only later in pcibios_device_add(), the device's MSI domain will be set which is too late for this bridge logic. So, when pci_set_bus_msi_domain() is called from pci_register_host_bridge(), it will not get it. It works in RISC-V (I guess ARM64 as well) because, the irqchip driver for MSI controller registers using pci_msi_register_fwnode_provider(). But, if we set bridge->msi_domain = true in X86, it will disable MSI even though it supports MSI which is really bad. Please correct me if I am wrong with the analysis. If correct, what do you think the way forward if using CONFIG option is not good? I tried to register the domain in below commit but I don't feel it is a cleaner way. https://github.com/vlsunil/linux/commit/d6cf76f10c225c94fffb286b7a3e803a4e37df54 Thanks, Sunil _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel