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 662BDC433EF for ; Tue, 11 Jan 2022 21:47: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=bhDp2ojLpIbZNMuNvyQNlGgpL6vzkbyLJzuwMVnffXY=; b=SpJeUhmF94fPPw 52NR+uVEYBUJEIQ/XcxXeEk5NqiGwzwIwZcDTrqigwpqqk6ps97IQZ0COC0rKd0suJgBHgpj8NtcV 2eIqjMnMMrLtEknalUsUpzbz1eYHucXbU8cb9uqQpt0ne83hQb60K3MeiLAmk9cdPEGX9f7f32TI4 TgsOlSnIMgjBjyfyN0c3xB11QNUJ6vWQkgr0cWJmS2fFWjUKXgrRkneCE4PKG4JnJrk8MNjv/DHFv 2nUJoDgbh5JOgMmSW2I5hYVFl18gMdoWlpKdjbDITNZfwEXldUewFEiLiQdMZaIib9+iMn5zEZxQL 3rgxaNrcFSGqg55SgIJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7Oy9-000FLu-0E; Tue, 11 Jan 2022 21:46:17 +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 1n7Oy4-000FLL-Uu for linux-arm-kernel@lists.infradead.org; Tue, 11 Jan 2022 21:46:14 +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 AB33CB81D51; Tue, 11 Jan 2022 21:46:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D999C36AE9; Tue, 11 Jan 2022 21:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641937570; bh=XNEfESj08xbpQ9h2hTKb/Pu9WAZg5VvTWzJOGQNAOC4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=hrPlCKr2Cgo8R910eadJlHVlOQja6nGt1WhCOdCaXCFbaY87edhU/MmAMX/v1PJsc gLQc0SVeHdbiE+O2eRDoMKPl75FAH+9KQyJDGXovCKyCiyadNi8gEHpPonHamnVox+ G04I153V4JR+wMjH4pxqMpmy15qR5o2IrbvHn9FFW8B65WXFhkGXUhvSFYkIGy6yh3 hA4WQhIs2poE1DZrZ30e2kEEHb/WlABHuWYKlp5c9+auiqcRV0NWB+f+CloLsF44oi sHcF3MxaFbGuuaZJXqMhu2E3SIyauijaeJkHkWIKSXHFM6YfsjF2RAKLje4z0h4GaE X5ke9q8yP4zfw== Date: Tue, 11 Jan 2022 15:46:08 -0600 From: Bjorn Helgaas To: Rob Herring Cc: Lorenzo Pieralisi , Jonathan Hunter , Thierry Reding , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Tiezhu Yang , Jiaxun Yang , Huacai Chen , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH 19/19] PCI: Set bridge map_irq and swizzle_irq to default functions Message-ID: <20220111214608.GA169999@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200722022514.1283916-20-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220111_134613_300250_58388141 X-CRM114-Status: GOOD ( 19.10 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [-cc many, +cc iproc, loongson, tegra maintainers] On Tue, Jul 21, 2020 at 08:25:14PM -0600, Rob Herring wrote: > The majority of DT based host drivers use the default .map_irq() and > .swizzle_irq() functions, so let's initialize the function pointers to > the default and drop setting them in the host drivers. > > Drivers like iProc which don't support legacy interrupts need to set > .map_irq() back to NULL. Probably a dumb question... This patch removed all the ->swizzle_irq users in drivers/pci/, which is great -- IIUC swizzling is specified by the PCI-to-PCI Bridge Spec, r1.2, sec 9.1, and should not be device-specific. I assume the few remaining arch/ users (arm and alpha) are either bugs or workarounds for broken devices. My question is why we still have a few users of ->map_irq: loongson, tegra, iproc. Shouldn't this mapping be described somehow via DT? > diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c > index fc4e38fec928..97433beff6cf 100644 > --- a/drivers/pci/controller/pci-tegra.c > +++ b/drivers/pci/controller/pci-tegra.c > @@ -2709,7 +2709,6 @@ static int tegra_pcie_probe(struct platform_device *pdev) > > host->ops = &tegra_pcie_ops; > host->map_irq = tegra_pcie_map_irq; > - host->swizzle_irq = pci_common_swizzle; > > err = pci_host_probe(host); > if (err < 0) { > diff --git a/drivers/pci/controller/pcie-iproc-platform.c b/drivers/pci/controller/pcie-iproc-platform.c > index 7c10c1cb6f65..a956b0c18bd1 100644 > --- a/drivers/pci/controller/pcie-iproc-platform.c > +++ b/drivers/pci/controller/pcie-iproc-platform.c > @@ -99,9 +99,10 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev) > switch (pcie->type) { > case IPROC_PCIE_PAXC: > case IPROC_PCIE_PAXC_V2: > + pcie->map_irq = 0; > break; > default: > - pcie->map_irq = of_irq_parse_and_map_pci; > + break; > } > > ret = iproc_pcie_setup(pcie, &bridge->windows); > diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c > index e98dafd0fff4..905e93808243 100644 > --- a/drivers/pci/controller/pcie-iproc.c > +++ b/drivers/pci/controller/pcie-iproc.c > @@ -1526,7 +1526,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) > host->ops = &iproc_pcie_ops; > host->sysdata = pcie; > host->map_irq = pcie->map_irq; > - host->swizzle_irq = pci_common_swizzle; > > ret = pci_host_probe(host); > if (ret < 0) { drivers/pci/controller/pci-loongson.c: static int loongson_pci_probe(struct platform_device *pdev) { ... bridge->map_irq = loongson_map_irq; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel