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 1B5E8C3DA5D for ; Thu, 25 Jul 2024 07:48:00 +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-Transfer-Encoding:Content-Type:MIME-Version:References: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:List-Owner; bh=KpBq3z07GcYsJy4O1z5Daz2Py/Pecj57NPa35Ml6XIM=; b=arau/kNSvNNO215fr1fn1orRtm HHcLWwdD2UDLcEbA9fjngJPhsyeqLpRBSKYigGjal6g/rgmQDdPEyikiIBNFYevlr1jybq9imMH5h asmcydNudWnU1JjeM1vJu+FFhaoffIFqX+or70nSyzd68PWDImmS+T4Ec72S3n/DRVzBivtk3tRpv LUUYTqISbxutdaHyk1MLBytT1nMuximf3eL042kop3O/4laxUav2H5emXpaUEWQiY0qYDfQDVzr1X FgA1sxEau+Q1Mnl+dwjQZeNET51D+aJtxcbMV7Arpy5FUE78V1zXx9yM8fTH2u2Pzy6zKX6ltCEFK REIISK3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWtCP-00000000Dhb-2cO0; Thu, 25 Jul 2024 07:47:41 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWtC1-00000000Dba-0d4z for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2024 07:47:18 +0000 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fc569440e1so5714795ad.3 for ; Thu, 25 Jul 2024 00:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721893636; x=1722498436; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=KpBq3z07GcYsJy4O1z5Daz2Py/Pecj57NPa35Ml6XIM=; b=Edt9ZAaw5NF5OYQxpZ9wvhqWorzbeG4p5h8D8fy4AZb3v8HYt1wMYucq9dDwJb9Rq1 X/2J+a1XbeV3XwF0dMflnIwaBo1+IAw372jHiDUB/5vA1trQvkX/Mo9DjDJst0mGcJnt FDDYysAUIpWTgZeznPWsKJLv7exVAev3Or9iYjEOJPDQFKFYx660p4/3NTXMMcKsJyW4 I4R+WxwiDHNxk7QGt4iVrmrSn/cGqCg36/uZ+EJhBqdEeVKBNhU1QxcYH9D8/XHNditG Xdmd0s+6XJbIznE/xSKiXcsGQf2ZiZwqEuU5waFGdcgj8hGyLO04gbfCgfmpBrYjKibA rFgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721893636; x=1722498436; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KpBq3z07GcYsJy4O1z5Daz2Py/Pecj57NPa35Ml6XIM=; b=S+ltUoHU3MlKMYvS4YAhB/qWoa+DMMjPQo8GOuoz/pb6smf5jzlRFv5jAJVwlv3jLn I/yHIRzlFsUduqg8kntYaXiabfTBK4YJ61KkBgjoRmWZJOqQ59FnFTOQuAyd28Npy3ff AFr8AvMqYVFaTky4vovxTiG+HzgeQ8KpC2LyF0/xQraaAEFI196YbC1jdvpsb6szH30l +yQAdBVXPUgbynTBWtIJPr9kEUXrN3xnrfEaN/jimL58bbIvszE5qLUrYX/lWmkvZe4E ZmBS0RJUcmYvgw0sjJX2miklhHYrt1trgVmP7US8dfl+4aaZ+9JuoziEY2s1hdzQaR5R FvnA== X-Forwarded-Encrypted: i=1; AJvYcCWZq3S9fmWe6QlqVZISbBMeHZBkUFDStWR1zyPbwj+rOiD0XS0Ma3sJvyYZOQuSnVNWkO8cbvFgL3rlPgmZLdc4+Bl+R2HUfJsp8n9fhYYf8RXbJiQ= X-Gm-Message-State: AOJu0YzNi2mgT8+goEBQth4Du4Tp3yeM8BcAL7Hk1Pu+g4UubVhxFH/W J9bEOgmtepXCRWEKiN/D2kPG6Ywd1VI31ui+ju1Rd/CQ57Sa/Nn8pazppL4g4g== X-Google-Smtp-Source: AGHT+IEvPiQ4tXStL2sFA0d8J9F5uD2IHeouCkAncAwEO9kDbAu69BWI3aENx7hEAk7hZ0kx2c3RbA== X-Received: by 2002:a17:903:2343:b0:1fd:5e91:2b13 with SMTP id d9443c01a7336-1fed3870cdbmr20396675ad.1.1721893635894; Thu, 25 Jul 2024 00:47:15 -0700 (PDT) Received: from thinkpad ([2409:40f4:1015:1102:1950:b07b:3704:5364]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7f6dc27sm7688855ad.237.2024.07.25.00.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 00:47:15 -0700 (PDT) Date: Thu, 25 Jul 2024 13:17:08 +0530 From: Manivannan Sadhasivam 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: <20240725074708.GB2770@thinkpad> References: <20240724065048.285838-1-s-vadapalli@ti.com> <20240724161916.GG3349@thinkpad> <69f8c45c-29b4-4090-8034-8c5a19efa4f8@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <69f8c45c-29b4-4090-8034-8c5a19efa4f8@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_004717_215312_FA7DF6F8 X-CRM114-Status: GOOD ( 19.90 ) 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 On Thu, Jul 25, 2024 at 10:50:13AM +0530, Siddharth Vadapalli wrote: > On Wed, Jul 24, 2024 at 09:49:16PM +0530, Manivannan Sadhasivam wrote: > > On Wed, Jul 24, 2024 at 12:20:48PM +0530, Siddharth Vadapalli wrote: > > > Since the configuration of Legacy Interrupts (INTx) is not supported, set > > > the .map_irq and .swizzle_irq callbacks to NULL. This fixes the error: > > > of_irq_parse_pci: failed with rc=-22 > > > due to the absence of Legacy Interrupts in the device-tree. > > > > > > > Do you really need to set 'swizzle_irq' to NULL? pci_assign_irq() will bail out > > if 'map_irq' is set to NULL. > > While 'swizzle_irq' won't be invoked if 'map_irq' is NULL, having a > non-NULL 'swizzle_irq' (pci_common_swizzle in this case) with a NULL > 'map_irq' seems inconsistent to me though the code-path may never invoke > it. Wouldn't a non-NULL 'swizzle_irq' imply that Legacy Interrupts are > supported, while a NULL 'map_irq' indicates that they aren't? Since they > are always described in pairs, whether it is in the initial commit that > added support for the Cadence PCIe Host controller (used by pci-j721e.c): > https://github.com/torvalds/linux/commit/1b79c5284439 > OR the commit which moved the shared 'map_irq' and 'swizzle_irq' defaults > from all the host drivers into the common 'devm_of_pci_bridge_init()' > function: > https://github.com/torvalds/linux/commit/b64aa11eb2dd > I have set both of them to NULL for the sake of consistency. > Since both callbacks are populated in the pci/of driver, this consistency won't be visible in the controller drivers. From the functionality pov, setting both callbacks to NULL is *not* required to disable INTx, right? - Mani -- மணிவண்ணன் சதாசிவம்