Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1120203pxa; Fri, 28 Aug 2020 04:26:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLARilh/5XuAeFB0A8LrvNOywKd3+OqtouumZFiU+dgMBCmlQZPiRjckIJQEpu1CfJuLg0 X-Received: by 2002:a17:907:72c8:: with SMTP id du8mr1208194ejc.237.1598613986316; Fri, 28 Aug 2020 04:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598613986; cv=none; d=google.com; s=arc-20160816; b=OT1Y+ec7TWYVm+o9mvYGNw5eNIoTmelKu1BQ3+f6iP/LQIjoBqFiZfYfltsL/eJXT6 L25HLPng8MDf3vlQ7pBolwJvhJGKeFktudINbhY2tcjzvwMuG2n5KyOtkfBlj1MEzE8a FNoQrrf0ZCM/o72x0bhRteBnsxAafZH9cEsvij8LPFZviEVItiw7skqIftaqjiFb7uej Sq6R3Be/jmL5FhLyXqRtSz3ancRB6t9KsbqhiycCFe2Al5MwjXCllqpHn854nru0LY62 YQTTImZuRWpqvKK2yGFd0d9bLaQeVtPl2sI/XW5boqPNsVCQfhJC80r1ikUhZk9haVUo hskQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m3Olz5ULzNuVPgO7jec5WIMFzYWWyuvWYedoMCg4L/g=; b=yTn3V+EoB6UXZ5NPXijmGQwe4vIScnUNjayMs91rWIB6Dg42wBKltoLqFM2t1SC0yS +kxIkoZ/Gv4O6BGNs/096ClZewmLASkrCYTkvRg75bGJjC0Zao7PdkqPLNBjb6uX9VOl KIfiiAAsaaLvfRkugZe0zRW1hQsJkfKh9uPiXeTR6AO1mRlOko8doWnYwV4JTt3PYj2t +ZWreyg/NQfliEA6oXdAEAg2Nx8aCuLItkVTVqlaPHI9+raaPq0MsnoGmm4RWmh5XxgK mYjumS8msz/ZMa5zhWSxfZRToI/dRcsW4SSqAj2N4R0Tk0e+/oTHn7u3Vgj5sjyjDhXU GrLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si446581ejj.277.2020.08.28.04.26.03; Fri, 28 Aug 2020 04:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729219AbgH1LXn (ORCPT + 99 others); Fri, 28 Aug 2020 07:23:43 -0400 Received: from foss.arm.com ([217.140.110.172]:46836 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729178AbgH1LWs (ORCPT ); Fri, 28 Aug 2020 07:22:48 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 10BC931B; Fri, 28 Aug 2020 04:21:52 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 03F763F66B; Fri, 28 Aug 2020 04:21:47 -0700 (PDT) Date: Fri, 28 Aug 2020 12:21:42 +0100 From: Lorenzo Pieralisi To: Bjorn Helgaas Cc: Thomas Gleixner , LKML , x86@kernel.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, Haiyang Zhang , Jon Derrick , Lu Baolu , Wei Liu , "K. Y. Srinivasan" , Stephen Hemminger , Steve Wahl , Dimitri Sivanich , Russ Anderson , linux-pci@vger.kernel.org, Bjorn Helgaas , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Marc Zyngier , Greg Kroah-Hartman , "Rafael J. Wysocki" , Megha Dey , Jason Gunthorpe , Dave Jiang , Alex Williamson , Jacob Pan , Baolu Lu , Kevin Tian , Dan Williams , Rob Herring Subject: Re: [patch V2 34/46] PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable Message-ID: <20200828112142.GA14208@e121166-lin.cambridge.arm.com> References: <20200826112333.992429909@linutronix.de> <20200827182040.GA2049623@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200827182040.GA2049623@bjorn-Precision-5520> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 01:20:40PM -0500, Bjorn Helgaas wrote: [...] > And I can't figure out what's special about tegra, rcar, and xilinx > that makes them need it as well. Is there something I could grep for > to identify them? Is there a way to convert them so they don't need > it? I think DT binding and related firmware support are needed to setup the MSI IRQ domains correctly, there is nothing special about tegra, rcar and xilinx AFAIK (well, all native host controllers MSI handling is *special* just to be polite but let's gloss over this for the time being). struct msi_controller, to answer the first question. I have doubts about pci_mvebu too, they do allocate an msi_controller but without methods so it looks pretty much useless. Hyper-V code too seems questionable, maybe there is room for more clean-ups. Lorenzo > > --- a/include/linux/msi.h > > +++ b/include/linux/msi.h > > @@ -193,17 +193,38 @@ void pci_msi_mask_irq(struct irq_data *d > > void pci_msi_unmask_irq(struct irq_data *data); > > > > /* > > - * The arch hooks to setup up msi irqs. Those functions are > > - * implemented as weak symbols so that they /can/ be overriden by > > - * architecture specific code if needed. > > + * The arch hooks to setup up msi irqs. Default functions are implemented > > s/msi/MSI/ to match the one below. > > > + * as weak symbols so that they /can/ be overriden by architecture specific > > + * code if needed. These hooks must be enabled by the architecture or by > > + * drivers which depend on them via msi_controller based MSI handling.