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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 76987C2BA83 for ; Sat, 15 Feb 2020 10:36:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 46F9C2083B for ; Sat, 15 Feb 2020 10:36:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rHV7YYzW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="AmmUqJL5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46F9C2083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k3oP0J/V9fNTI320tbFsiW80JT+dNfzkFayFPZTWd8w=; b=rHV7YYzW6mhZBz YENIRF9hjvfa+g1wkXHwugf+5g5WCtMclq07saymZQgzAIFpeDzT+7QDv1/Y9DeFEYh1PoNIcMal9 mSVZr0TM/rtMu+RlENoxdwCY32sV05riJzN4iDzCOO04BtErtTgm7wwZiyWVCJH+txVpFhtODkiL3 tJz4i4SKzZ8oeQNryotEV5XdPy12cUNaLHG5tZQ3OprJ15qGx4l3K4WDufyIR78HIdsuwx3741FlT NHchjCm5NfhKhUc3un7Z9wZx+JIxr9AJpzlc5Z/i1b7JZdorzV/JC/RXQoXLsDuQxQBstnjsQmunw xmqDz0luMNZvw4mW6N/Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2uoV-0006PW-Gy; Sat, 15 Feb 2020 10:36:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2uoS-0006PC-Fh for linux-arm-kernel@lists.infradead.org; Sat, 15 Feb 2020 10:36:42 +0000 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 B280F2083B; Sat, 15 Feb 2020 10:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581762999; bh=5YkV4uYVH10wCnyRijcEs1e3QeLeB2ohGnC0ChbJrhI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AmmUqJL5Z3hpRt/N9ljehOySU7J1Qv+2BRKBdCrzxgRl3fmZkXzn4OoPbOQfdI+70 kXmUZPtDDF/7NZxe6vZoC7hLTsjGZ28iCF/gLNPRpLZS4yceohK8okLyBiK3YLaxZR /TIXu0uCpdPjvnISQwOyt1PbvAeW0th4ZwNOt8M4= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=big-swifty.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j2uoQ-005Qs9-09; Sat, 15 Feb 2020 10:36:38 +0000 Date: Sat, 15 Feb 2020 10:36:36 +0000 Message-ID: <867e0o6ssr.wl-maz@kernel.org> From: Marc Zyngier To: Ard Biesheuvel Subject: Re: [PATCH 2/3] pci: designware: add separate driver for the MSI part of the RC In-Reply-To: References: <20170821192907.8695-3-ard.biesheuvel@linaro.org> <1581728065-5862-1-git-send-email-alan.mikhak@sifive.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: ardb@kernel.org, alan.mikhak@sifive.com, Joao.Pinto@synopsys.com, bhelgaas@google.com, graeme.gregory@linaro.org, jingoohan1@gmail.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, leif@nuviainc.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200215_023640_563972_F15D6937 X-CRM114-Status: GOOD ( 19.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joao Pinto , Graeme Gregory , Jingoo Han , Alan Mikhak , linux-pci , Bjorn Helgaas , Leif Lindholm , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 15 Feb 2020 09:35:56 +0000, Ard Biesheuvel wrote: > > (updated some email addresses in cc, including my own) > > On Sat, 15 Feb 2020 at 01:54, Alan Mikhak wrote: > > > > Hi.. > > > > What is the right approach for adding MSI support for the generic > > Linux PCI host driver? > > > > I came across this patch which seems to address a similar > > situation. It seems to have been dropped in v3 of the patchset > > with the explanation "drop MSI patch [for now], since it > > turns out we may not need it". > > > > [PATCH 2/3] pci: designware: add separate driver for the MSI part of the RC > > https://lore.kernel.org/linux-pci/20170821192907.8695-3-ard.biesheuvel@linaro.org/ > > > > [PATCH v2 2/3] pci: designware: add separate driver for the MSI part of the RC > > https://lore.kernel.org/linux-pci/20170824184321.19432-3-ard.biesheuvel@linaro.org/ > > > > [PATCH v3 0/2] pci: add support for firmware initialized designware RCs > > https://lore.kernel.org/linux-pci/20170828180437.2646-1-ard.biesheuvel@linaro.org/ > > > > For the platform in question, it turned out that we could use the MSI > block of the core's GIC interrupt controller directly, which is a much > better solution. > > In general, turning MSIs into wired interrupts is not a great idea, > since the whole point of MSIs is that they are sufficiently similar to > other DMA transactions to ensure that the interrupt won't arrive > before the related memory transactions have completed. > > If your interrupt controller does not have this capability, then yes, > you are stuck with this little widget that decodes an inbound write to > a magic address and turns it into a wired interrupt. I can only second this. It is much better to have a generic block implementing MSI *in a non multiplexed way*, for multiple reasons: - the interrupt vs DMA race that Ard mentions above, - MSIs are very often used to describe the state of per-CPU queues. If you multiplex MSIs behind a single multiplexing interrupt, it is always the same CPU that gets interrupted, and you don't benefit from having multiple queues at all. Even if you have to implement the support as a bunch of wired interrupts, there is still a lot of value in keeping a 1:1 mapping between MSIs and wires. Thanks, M. -- Jazz is not dead, it just smells funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel