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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BF0CC433ED for ; Tue, 18 May 2021 08:48:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 690A2610FA for ; Tue, 18 May 2021 08:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347578AbhERIta (ORCPT ); Tue, 18 May 2021 04:49:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:58384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241591AbhERIt1 (ORCPT ); Tue, 18 May 2021 04:49:27 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 85997610FA; Tue, 18 May 2021 08:48:09 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1livOZ-0021bJ-CE; Tue, 18 May 2021 09:48:07 +0100 Date: Tue, 18 May 2021 09:48:06 +0100 Message-ID: <87bl98v35l.wl-maz@kernel.org> From: Marc Zyngier To: Jean-Philippe Brucker Cc: bhelgaas@google.com, lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org Subject: Re: [PATCH] PCI/MSI: Fix MSIs for generic hosts that use device-tree's "msi-map" In-Reply-To: References: <20210510173129.750496-1-jean-philippe@linaro.org> <87r1ieo3cd.wl-maz@kernel.org> 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/27.1 (x86_64-pc-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: 62.31.163.78 X-SA-Exim-Rcpt-To: jean-philippe@linaro.org, bhelgaas@google.com, lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, 11 May 2021 15:12:08 +0100, Jean-Philippe Brucker wrote: > > Hi Marc, > > On Mon, May 10, 2021 at 07:23:14PM +0100, Marc Zyngier wrote: > > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > > > index 3a62d09b8869..275204646c68 100644 > > > --- a/drivers/pci/probe.c > > > +++ b/drivers/pci/probe.c > > > @@ -925,7 +925,8 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) > > > device_enable_async_suspend(bus->bridge); > > > pci_set_bus_of_node(bus); > > > pci_set_bus_msi_domain(bus); > > > - if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev)) > > > + if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev) && > > > + !pci_host_of_has_msi_map(parent)) > > > bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI; > > > > > > if (!parent) > > > > Do we need something similar for IORT, which implements a similar > > functionality to "msi-map"? My ACPI boxes seem to get their MSIs just > > fine though... > > I'm not seeing the issue either under ACPI on the fast model, because it > doesn't go through pci_host_common_probe(), and bridge->msi_domain is not > set: > > acpi_pci_root_add() > pci_acpi_scan_root() > acpi_pci_root_create() > pci_create_root_bus() > pci_register_host_bridge() > > It doesn't look like any ACPI platform can set bridge->msi_domain at the > moment. If they do flip the switch at some point, MSIs won't work and > we'll need something for IORT. But I'd leave it out for the moment. Fair enough, although there seem to be the opposite issue on some platforms that do not have any MSI to offer (see [1]). I guess we'll cross that bridge eventually. For this patch: Acked-by: Marc Zyngier M. [1] https://lore.kernel.org/r/b5a5a6d8-6ffc-8c5c-c5b1-fb4f5616069f@arm.com -- Without deviation from the norm, progress is not possible.