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 CE428C433F5 for ; Fri, 7 Jan 2022 21:33:34 +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: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:References: List-Owner; bh=5Czzn4dRQQQv+IFGarmnN0DBqoM6vl7sVl3TieDs4cQ=; b=DE7ijENfoIJRnN +a/S7hNy4ItOgOeriq5ZMCCb3OLd5WKgHYVUHsMK7BcIamzDZOd8d/y2uJRznbx1oTI1h6OXgtZxG Xy5GT7PW/XqgruMHtxHIfzQ6YEfi2oNOsPDdx/ckrewyeevGAbdjCMSn8Z9LvmHdZpLpFQxdfjuTG KlxKa6hxkTR0hi/r6BRMgRJPAHYSsU3knSZVBSISXLeSGrx6Rm0zRnqBkuqynIeM+vqS9ilv3HwmF qHGlnghsCCygQUUHHnPLbmZx537w5NeaPhr56A/jKesZQqNJ9xyb9tgLoDLtt0RdEgIUxZY+6MlHu xRqzqwNOA1gloAuyhXFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5wqW-005I3z-9b; Fri, 07 Jan 2022 21:32:24 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5wqS-005I32-Ng for linux-arm-kernel@lists.infradead.org; Fri, 07 Jan 2022 21:32:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0882BB82297; Fri, 7 Jan 2022 21:32:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D9C5C36AE5; Fri, 7 Jan 2022 21:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641591137; bh=+t2R3Ohhw3NiS9KLcOjXJS2woaFIxKyK3u0Q/DHZ/GM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=i65h0dWbwVgUwYFF4nVDOEanxTZdVhPWXcj0DbHGipm3udK+Oqgll1aYjtVA2ZxPX TlpJ4x1lw+jYMF+HZe58TFTsCLpbr0X/5/DZCCorrBar8mm86mvQ7uTY3+HFajuT0j dIflf78nw+evvXuJm1frhlgXN+pyK8xGsqA2ygyjxxTnzhIHEeJ7qnYmO87IZv2GsS PyRUc1Jg8oj7XJdNDQoGkM/U/xPdMudNhN2AnOUdVuEao/MOLMcvAhkQZQp6zxS7qz xklgfwPqW0FO0bJ5Xs964TS5niJrz7qsI1tjOiAsPR7Qkf07FGhYMdfrOAQzAob+Sv Heq3GD6eOELpg== Date: Fri, 7 Jan 2022 15:32:16 -0600 From: Bjorn Helgaas To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Thomas Petazzoni , Lorenzo Pieralisi , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Marek =?iso-8859-1?Q?Beh=FAn?= , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/15] PCI: mvebu: Disallow mapping interrupts on emulated bridges Message-ID: <20220107213216.GA403555@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211125124605.25915-6-pali@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220107_133220_934030_C54F9BFE X-CRM114-Status: GOOD ( 22.41 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 25, 2021 at 01:45:55PM +0100, Pali Roh=E1r wrote: > Interrupt support on mvebu emulated bridges is not implemented yet. Is this mvebu-specific, or is aardvar also affected? > So properly indicate return value to callers that they cannot request > interrupts from emulated bridge. Pet peeve: descriptions that say "do this *properly*". As though the previous authors were just ignorant or intentionally did something *improperly* :) > Signed-off-by: Pali Roh=E1r > Cc: stable@vger.kernel.org > --- > drivers/pci/controller/pci-mvebu.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > = > diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/= pci-mvebu.c > index 19c6ee298442..a3df352d440e 100644 > --- a/drivers/pci/controller/pci-mvebu.c > +++ b/drivers/pci/controller/pci-mvebu.c > @@ -705,6 +705,15 @@ static struct pci_ops mvebu_pcie_ops =3D { > .write =3D mvebu_pcie_wr_conf, > }; > = > +static int mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) > +{ > + /* Interrupt support on mvebu emulated bridges is not implemented yet */ > + if (dev->bus->number =3D=3D 0) > + return 0; /* Proper return code 0 =3D=3D NO_IRQ */ > + > + return of_irq_parse_and_map_pci(dev, slot, pin); Is this something that could be done with a .read_base() op, e.g., make PCI_INTERRUPT_PIN contain zero (PCI_INTERRUPT_UNKNOWN)? > +} > + > static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev, > const struct resource *res, > resource_size_t start, > @@ -1119,6 +1128,7 @@ static int mvebu_pcie_probe(struct platform_device = *pdev) > bridge->sysdata =3D pcie; > bridge->ops =3D &mvebu_pcie_ops; > bridge->align_resource =3D mvebu_pcie_align_resource; > + bridge->map_irq =3D mvebu_pcie_map_irq; I assume this means INTx doesn't work for some devices? Which ones? I guess anything on the root bus? But INTx for devices *below* these emulated Root Ports *does* work? > return pci_host_probe(bridge); > } > -- = > 2.20.1 > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel