Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2055934rdf; Mon, 6 Nov 2023 03:36:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkpiVOH8aoSmHxNkRs3voHWXtlgD2upIWVvaxTHMYcBCAPns5Nut2wew6pO/noCYpFOqhn X-Received: by 2002:a17:902:ea12:b0:1cc:5920:1d2a with SMTP id s18-20020a170902ea1200b001cc59201d2amr21071696plg.13.1699270595746; Mon, 06 Nov 2023 03:36:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699270595; cv=none; d=google.com; s=arc-20160816; b=SCEHLdlVxGaW/QyBKShdByjHO9qFtZ1C/oX55xrBTM3PveJfde+8FcZEuHwSkeH4Nv DWUioH03m2XbOYGYGeLVeVegctK9b/7cHUdFbh4DTzhezxK2Y08FE1Uo2Im69kDIBXKA Y0VFstJq4GcrezI9h+GJf+0blTshs+qJdfXnYRr1aTzqu9J1JxHmCd46D90C6cqA8GKw u3OK4ImEb+9kWaZ2jo1vGAobnoVbl2T2/n60pLZ9IuBn2gLHBruFgNT18fuktAx0SnI2 77fmUOc79IkWtwUl0iCHjedMRCdJbPGPx9nUnB+UiouJa+a5ZX1abo/f4oQ9q3QwcOct tNTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=kMFExozfjKwzh9t80cyAj6LkJh2SbKYnP6pafPmnR48=; fh=umym6x6pMbUlgAQvh1mFvYpEEuatA/S8mtQ9rK3iINc=; b=jSA2NM6y5YLNY4jkeIpkYMfWIX4NMcMIjnhT6nMTE1Gf+2nRn/R3fZYTZnnEPS7Ivz mJxLMgnQVq1DIKtadTE47/JyLPfv5/BIKyac2SvxlFXgJQ3j2SEO29+Y7aWSJy/M/uoo UOGGgibhaf67VSRAzPsdPXUDGRMCWhqngiG/4NLdReA0OKUkptDUGPMWB9MIbrzckXen FFTlwG9tD75GC5x8iC6oJq8ge3HivPZe2uJCqYIzlN6y9jjVqCm0uSoPrhsENhSRgrZB VbqKYRfCs9zmhQ611TzEdcqeTyzWFi/WZlE8/gPBSzJdXZ3jJ2RohxSQdWW/L089NZrE ffGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cRiY+eu6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id r21-20020a170902c7d500b001c9bcb6f00asi7342849pla.528.2023.11.06.03.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 03:36:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cRiY+eu6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 423788077F90; Mon, 6 Nov 2023 03:35:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbjKFLfg (ORCPT + 99 others); Mon, 6 Nov 2023 06:35:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbjKFLfe (ORCPT ); Mon, 6 Nov 2023 06:35:34 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFCDABE; Mon, 6 Nov 2023 03:35:31 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 832BAC433C7; Mon, 6 Nov 2023 11:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699270531; bh=fI4NKuZ1uY8mqL9yZ9YNJndkjv1j7nVGFqh2pflGyYI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cRiY+eu6yXREipoxzeem9UkMf7DbKLyTEsBhihxAIIk9nQ7OhutANlrX0EN63aFg8 ZSOLFibjhi2PMsmJgXzpwOvA3yqj+aXKhPs5qY42O3Uubyo3b9ra3w1ryHOdHG+HiZ lHOvlA1VxBzJlQ/bT8UqOpfVLA184ZKyXm6dfKOVjFk5US/uhLcvJeH9TagyH2mwcu 9b39ZbgDKTEhKmjrt0MJvhXN1mZbmQCjYEQL13faJBplEzfT8BihvSFWhGl8cQUWBC bWSHz+fQSNq7mqI8jiAcEbQjHnTmI/qTbh4GYesnI1QXEQSU6GqcBjGWWa/rNB3tBe ESW6CSQ0mYtcg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qzxtA-00AkGy-HO; Mon, 06 Nov 2023 11:35:28 +0000 Date: Mon, 06 Nov 2023 11:35:27 +0000 Message-ID: <86fs1j15ds.wl-maz@kernel.org> From: Marc Zyngier To: Thomas Gleixner , Bjorn Helgaas Cc: Sunil V L , 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, linux-serial@vger.kernel.org, Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Greg Kroah-Hartman , Jiri Slaby , Conor Dooley , Andrew Jones , Atish Kumar Patra , Haibo Xu Subject: Re: [RFC PATCH v2 13/21] irqchip: riscv-intc: Add ACPI support for AIA In-Reply-To: <87jzr82c3h.ffs@tglx> References: <20231026165150.GA1825130@bhelgaas> <87jzr82c3h.ffs@tglx> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tglx@linutronix.de, helgaas@kernel.org, sunilvl@ventanamicro.com, 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, linux-serial@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com, anup@brainfault.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, conor.dooley@microchip.com, ajones@ventanamicro.com, atishp@rivosinc.com, haibo1.xu@intel.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 03:35:44 -0800 (PST) On Fri, 27 Oct 2023 18:45:38 +0100, Thomas Gleixner wrote: > > On Thu, Oct 26 2023 at 11:51, Bjorn Helgaas wrote: > > On Thu, Oct 26, 2023 at 01:53:36AM +0530, Sunil V L wrote: > >> The RINTC subtype structure in MADT also has information about other > >> interrupt controllers like MMIO. So, save those information and provide > >> interfaces to retrieve them when required by corresponding drivers. > > > >> @@ -218,7 +306,19 @@ static int __init riscv_intc_acpi_init(union acpi_subtable_headers *header, > > > >> + * MSI controller (IMSIC) in RISC-V is optional. So, unless > >> + * IMSIC is discovered, set system wide MSI support as > >> + * unsupported. Once IMSIC is probed, MSI support will be set. > >> + */ > >> + pci_no_msi(); > > > > It doesn't seem like we should have to tell the PCI core about > > functionality we *don't* have. > > > > I would think IMSIC would be detected before enumerating PCI devices > > that might use it, and if we *haven't* found an IMSIC by the time we > > get to pci_register_host_bridge(), would/should we set > > PCI_BUS_FLAGS_NO_MSI there? > > > > I see Thomas is cc'd; he'd have better insight. > > I was not really involved with this bus and MSI domain logic. Marc > should know. CC'ed. The canonical way of doing this is by the platform expressing that there is no linkage between the PCIe RC and the MSI controller. If there is no MSI domain associated with the RC, then by extension the endpoints don't get one either. There are additional quirks linked to the msi_domain host bridge property, allowing the host bridge driver to indicate that it isn't in charge of MSIs, but that a third party may provide it (in which case a MSI irq domain will be associated with it). In any case, slapping a pci_no_msi() call in an irqchip driver is gross and most probably a sign that this is going in the wrong direction, specially as this is platform-wide. The only cases I'd expect this function to be called are: - Platform or firmware explicitly disallowing MSIs - pci=nomsi on the command line none of which are the business of an irqchip driver. HTH, M. -- Without deviation from the norm, progress is not possible.