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 989BFC3DA4A for ; Fri, 9 Aug 2024 05:34:23 +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=Rpcp7sNOdXCekWfh56WPO6OMCeZXKdG+njZ3Axxp7Y8=; b=ogj7lOFvtc4zleypgnjVYRgdYr 7JGpzS3Pfl8bzSBuy+XkHLABzkudrjUBBPNmoFde0bvqVon5UKd7RinPffWZYm81kyKtP2rE7GV4V mNDRB6C8JCJe8EbBjgbpiFRzHsrdAYou9lAP4RpAHKUBs+Oz9iLrxkcw+FsUKxdMt0fuPiEw5w7wt tamXXBarjPfltECupEmNgjrB14vtlUz2vJXEOjccdT2qhWr3utLg/dMzjkDMXJWaVhwkpYueHwKry cEBXLLxQaUTw7izmSL002fhRJjWMrE6vPpydaspIzfMpC6pc/odHpavBN3rQ+Kci91EojrsYj0x8c n/veoXMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1scIGJ-0000000AIvn-3MYE; Fri, 09 Aug 2024 05:34:03 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1scIFW-0000000AIql-11TU for linux-arm-kernel@lists.infradead.org; Fri, 09 Aug 2024 05:33:15 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-70d18112b60so1118408b3a.1 for ; Thu, 08 Aug 2024 22:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723181593; x=1723786393; 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=Rpcp7sNOdXCekWfh56WPO6OMCeZXKdG+njZ3Axxp7Y8=; b=nze+umXKf6iNyqfqVf0oTh6dVlYSQU/rozH++tDcudB3ksqFdl1O6cE8NRBW/CAtqI mZBZsea8hj87jrRjq2jz4btpBDKpXWIxGa75psXs7VSCmURP2EbeGQJ098sxFGHjMSFu VGFTIa0qkINS7JBOdxEApZrwU1iyqMqLqpsCUBfSwhwhcoSCiCrekrFXtmoFMH/+OCiV txM7eWmcjwBrqn3h5kuiSe2RZBBv+wzLuOBHo/YqHCHQC3KB/L5qPEYut32JUWDGLos8 TENBTmALDjs0B1hePvkDzYxVwvTIdm9tUMPOGsxIiHu2tO5+K4tJDip2CchY6cTqp/bD eWqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723181593; x=1723786393; 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=Rpcp7sNOdXCekWfh56WPO6OMCeZXKdG+njZ3Axxp7Y8=; b=otGJ+xSPDxGA5stKQgw0cGzRQgTcPyZg40zCjDfR/Nyloz9CZ7FQ1YGa0KC5r9xTQr qtzNaSE3T0m3pjCCiujIxaodm/9rLch/cE/vGhgQTaYcDyjPvu7JBrUxjqplDAQGqy6L lWDEJ7vHLrNIMPHk7zCZoMAk40szweTXYnj9e26GXdSIlwsA/75b1EkKnHk/rjANR3Xx dLgG3+ocm10i63iAxX9QlZRQ7af29V0PpY6YMS5pqiozOcyfY0K101m2odKQpeVj2F0S WyYnQPiHbGVfLdvoTOCnPqe2Avy3BUVWcbyS9nBhyNIsUhaXOdu2jFhPnnVRIUz+3hNM 1QSA== X-Forwarded-Encrypted: i=1; AJvYcCXlzeLDzThlcRe5rJRwvkoWDmi+i4kgoOewGh7IarLc4BUxFUnvq2TTuHWlzYSFeRAEeRlBswXfGN49CDKmthargn3JEKcoBkOm7O7RFgAKSkLZf+Q= X-Gm-Message-State: AOJu0Yw7SkVvPrPlk33Yf35J1YPjTX+OfOA3yRo3gcizm81J6XMGiEVG LnmAmlah/etS4Krz3lJ0Io0DXuBXoAvIsFz2+Jy8AqeQs+2y1QZGNtPO4ioJCg== X-Google-Smtp-Source: AGHT+IHjsR+odVk/XFoa4hO6BfS6oiJfnTEktUyDC4vLxB+lplkufKntidsEa0rknzxBQC+JIgXZTA== X-Received: by 2002:a05:6a00:b8e:b0:70d:2a1b:422c with SMTP id d2e1a72fcca58-710dcd5c457mr847790b3a.7.1723181592792; Thu, 08 Aug 2024 22:33:12 -0700 (PDT) Received: from thinkpad ([117.213.100.70]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-710cb2e7416sm1934529b3a.158.2024.08.08.22.33.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 22:33:12 -0700 (PDT) Date: Fri, 9 Aug 2024 11:03:04 +0530 From: Manivannan Sadhasivam To: Andrew Halaney Cc: Rob Herring , Siddharth Vadapalli , bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, 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, srk@ti.com Subject: Re: [PATCH] PCI: j721e: Set .map_irq and .swizzle_irq to NULL Message-ID: <20240809053304.GB2826@thinkpad> References: <20240724065048.285838-1-s-vadapalli@ti.com> <20240724161916.GG3349@thinkpad> <20240725042001.GC2317@thinkpad> <93e864fb-cf52-4cc0-84a0-d689dd829afb@ti.com> <20240726115609.GF2628@thinkpad> <20240805164519.GF7274@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240808_223314_313886_7B003EF7 X-CRM114-Status: GOOD ( 33.64 ) 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, Aug 08, 2024 at 03:56:10PM -0500, Andrew Halaney wrote: [...] > > There's a lot of history and the interrupt parsing is fragile due to > > all the "interesting" DT interrupt hierarchies. So while I think it > > would work, that's just a guess. I'm open to trying it and seeing. > > Would something like this be what you're imagining? If so I can post a > patch if this patch is a dead end: > > diff --git a/drivers/pci/of.c b/drivers/pci/of.c > index dacea3fc5128..4e4ecaa95599 100644 > --- a/drivers/pci/of.c > +++ b/drivers/pci/of.c > @@ -512,6 +512,10 @@ static int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args * > if (ppnode == NULL) { > rc = -EINVAL; > goto err; > + } else if (!of_get_property(ppnode, "interrupt-map", NULL)) { > + /* No interrupt-map on a host bridge means we're done here */ > + rc = -ENOENT; > + goto err; > } > } else { > /* We found a P2P bridge, check if it has a node */ > This is a reasonable change if the parent is the host bridge. But if parent is a PCI bridge node (note the else condition), then of_irq_parse_raw() will get called and we will hit the same issue. IMO, either we need to fix of_irq_parse_raw() or come up with another implementation that does the right thing i.e., travese upto the host bridge and check for the 'interrupt-map'. Currently it goes till the top level interrupt controller. > I must admit that you being nervous has me being nervous since I'm not all > that familiar with PCI... but if y'all think this is ok then I'm for it. > I'm sure I'm not picturing all the cases here so would appreciate > some scrutiny. > > You still end up with warnings, which kind of sucks, since as I > understand it the lack of INTx interrupts on this platform is > *intentional*: > > [ 3.342548] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits > [ 3.346716] pcieport 0000:00:00.0: of_irq_parse_pci: no interrupt-map found, INTx interrupts not available > [ 3.346721] PCI: OF: of_irq_parse_pci: possibly some PCI slots don't have level triggered interrupts capability > I propose to demote these prints to debug as these are not warnings by any means. > You could have a combo of both this patch (to indicate that a specific driver (even further > limited to a match data based on compatible) doesn't support these) as well as > the above diff (to improve the message printed in the situation where a driver > *does* claim to support these interrupts but fails to describe them properly). > Again, I don't think we need to have the change in the driver. DT already indicated that there is no INTx support, so why should driver duplicate the same info? - Mani -- மணிவண்ணன் சதாசிவம்