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 D96A2C3DA61 for ; Wed, 24 Jul 2024 16:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=OHoDuWSSF8zoPeXW8ujCqyNk0JNnnj1Zbr7Zaimb/yo=; b=3QLx6BDHRpEiOF mjsQArmksCi9X324WfT0gNE3ZVFXXdWHyKgTx9Tp62L9QdzMWx7tUi7h8hRqR/YzJWihC0rHniAGr 2SO3vIEQ26S4ftRbH2im+xIR40Ziwt04+SM587bMWstRdm+3LqH4/VwfEvR6lz1rHRVtaRyBIxAWQ T0af1dd0ENFs6c5Q4p88rtMUiXIbmIxCx3zekYekIm76RRhnOl64opy//gkjD8b9dWVATvoNpFLEd O/y6p2M2SlPVFzc6pQb0UfqkS+C3Tl4dyZwVDxssGrWdND7o8ZQciowOCWBI7HL2PW1rj7P6OrsQV hZbHMj5MxW2mdYFC9M6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWemB-0000000FvCk-2NT5; Wed, 24 Jul 2024 16:23:39 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWelh-0000000Fv3i-0GTI for linux-arm-kernel@lists.infradead.org; Wed, 24 Jul 2024 16:23:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E387C6123F; Wed, 24 Jul 2024 16:23:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F43CC4AF0F; Wed, 24 Jul 2024 16:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721838186; bh=waqtxyoI1c8LwddMZBPmTXS/fGoT0GGRjxIpfHuAGTE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Amma9G2nW50V4idQwZHsRJQYWpfXD3fdjfiSVG2jtopM2RgOoYk/qoeef1L2XaxaP XV1ZyR8z2JTO41LSEwUjL+YWrVBZzyRKiHdsvIWyd07pFtIRl+GDGb1X+c330FNfK8 qKN4Q80dtvBzJ9zs6RTQDS/MKo8E+dJC9wcJkxppqy75lvyI5YokxhvBFzNVzQSVqA 1VftM4LjtxTtcwEeiO3DrIF4z0TmKEdFhLPDL/FkATOFgZBBI5GU5K6w0NWcuY1QLT JcTswEgX5d9xmx14eJAwCiNLUe/izCfBKzKEuLOBBkrx4Q8N723mY75dMadSrw4Rcr l+BWqfGUWAX5w== Date: Wed, 24 Jul 2024 11:23:04 -0500 From: Bjorn Helgaas To: Siddharth Vadapalli Cc: bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, vigneshr@ti.com, kishon@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, ahalaney@redhat.com, srk@ti.com Subject: Re: [PATCH] PCI: j721e: Set .map_irq and .swizzle_irq to NULL Message-ID: <20240724162304.GA802428@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240724065048.285838-1-s-vadapalli@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240724_092309_225325_7457CA4F X-CRM114-Status: GOOD ( 23.20 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Subject should say something about why this change is needed, not just translate the C code to English. On Wed, Jul 24, 2024 at 12:20:48PM +0530, Siddharth Vadapalli wrote: > Since the configuration of Legacy Interrupts (INTx) is not supported, set I assume you mean J721E doesn't support INTx? > the .map_irq and .swizzle_irq callbacks to NULL. This fixes the error: > of_irq_parse_pci: failed with rc=-22 I guess this happens because devm_of_pci_bridge_init() initializes .map_irq and .swizzle_irq unconditionally? I'm not sure the default assumption should be that a host bridge supports INTx. Maybe .map_irq and .swizzle_irq should only be set when we discover some information about INTx routing, e.g., an ACPI _PRT or the corresponding DT properties. > due to the absence of Legacy Interrupts in the device-tree. > > Fixes: f3e25911a430 ("PCI: j721e: Add TI J721E PCIe driver") > Reported-by: Andrew Halaney > Signed-off-by: Siddharth Vadapalli > --- > > Hello, > > This patch is based on commit > 786c8248dbd3 Merge tag 'perf-tools-fixes-for-v6.11-2024-07-23' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools > of Mainline Linux. > > Patch has been tested on J784S4-EVM and J721e-EVM, both of which have > the PCIe Controller configured by the pci-j721e.c driver. > > Regards, > Siddharth. > > drivers/pci/controller/cadence/pci-j721e.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c > index 85718246016b..5372218849a8 100644 > --- a/drivers/pci/controller/cadence/pci-j721e.c > +++ b/drivers/pci/controller/cadence/pci-j721e.c > @@ -417,6 +417,10 @@ static int j721e_pcie_probe(struct platform_device *pdev) > if (!bridge) > return -ENOMEM; > > + /* Legacy interrupts are not supported */ Say "INTx" explicitly here instead of assuming "legacy" == "INTx". > + bridge->map_irq = NULL; > + bridge->swizzle_irq = NULL; > + > if (!data->byte_access_allowed) > bridge->ops = &cdns_ti_pcie_host_ops; > rc = pci_host_bridge_priv(bridge); > -- > 2.40.1 >