Received: by 10.223.176.5 with SMTP id f5csp206628wra; Mon, 5 Feb 2018 20:07:04 -0800 (PST) X-Google-Smtp-Source: AH8x2243gY1Ri/IMOFakmCO5U1yT0tzl1GA3xYTah07TeNjxsim1eMGm1wAH87cKGdiuaQzLho+D X-Received: by 10.101.97.67 with SMTP id o3mr875839pgv.256.1517890024497; Mon, 05 Feb 2018 20:07:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517890024; cv=none; d=google.com; s=arc-20160816; b=N5i4F2SJEcBUhXf++6znizLrk8U2uZ7xHM6Uj2IWHWQcbc9N33CRDXXbqwX+BzXZjw 7H1634STTXtXoa6v/hW3MZ0TP7RzKUrZnCXScq4SJmETCEI3gEYGApTOrWxYCItLU5n1 AMPtTHEDnwnr2Smv/VOIL2DZwUCxUdVqIyQg+rCklbNDFLvxp7EXJe5pLnHBa2haei85 UcHMqzHjbnTlevd76nP7crKLofQhO/L8ZaM1OQIQqfvImoehRkkj590qVfJkBlcK+cEt jsXnEgA5/7FjCvTMBnVZZEPUYpxM4YlqYETqZl1nkbCN62M9AAwwMPXatu+0rN+nmt27 3G0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=WuKSBCcoFM+R+p+tWGqhE4CGG3vEH5/4NbQB09DR/sw=; b=bzP1nThsEGl7iSVgS2pE80dB6+yQyMvFx7V20WQSsiw/pPpo4dBN6rSRmkfPoej1+D h21mYiBfh4Q68Y9kb4FFs2iB3mvUbS/u7ZRsBKhXIs3bmXq6SZ+skLYH/zY0dyiWSn73 Fb4HIIJ1Bnuou4TPPJFSvrYC81dfLpI6EcrNLa/j1dlvgO9KhDzV/ofawFHx8XUUrcRY hIJdjexDqJT5fY/R/lk/33hGknEXcW8KC6LKL5E6bfSoY2zkTSlFvktrEIp6eqew8C3E 5xpZHdl/5yhXXSCLqRxmC4arRQ7tEfHnni1703ZeHkratEGOtPa52SSa2f3soptzxnbD 6hog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v184si1268327pgb.832.2018.02.05.20.06.50; Mon, 05 Feb 2018 20:07:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752327AbeBFEGJ (ORCPT + 99 others); Mon, 5 Feb 2018 23:06:09 -0500 Received: from gate.crashing.org ([63.228.1.57]:36825 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752155AbeBFEGD (ORCPT ); Mon, 5 Feb 2018 23:06:03 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w16454nF001739; Mon, 5 Feb 2018 22:05:05 -0600 Message-ID: <1517889903.2312.151.camel@kernel.crashing.org> Subject: Re: [PATCH 1/2] of_pci_irq: add a check to fallback to standard device tree parsing From: Benjamin Herrenschmidt To: Ryder Lee Cc: Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Lorenzo Pieralisi , Arnd Bergmann , "linux-kernel@vger.kernel.org" , linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, Bjorn Helgaas , Frank Rowand , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Date: Tue, 06 Feb 2018 15:05:03 +1100 In-Reply-To: <1517884738.16010.27.camel@mtkswgap22> References: <31c765c53e85e41bfc001d110d69e46c9967f4e7.1516961656.git.ryder.lee@mediatek.com> <1517563970.24622.9.camel@mtkswgap22> <1517866584.2312.140.camel@kernel.crashing.org> <1517884738.16010.27.camel@mtkswgap22> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.4 (3.26.4-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-02-06 at 10:38 +0800, Ryder Lee wrote: > > I think the code should look at the bridge address <0x0800 ...> we list > in bindings for resolving interrupts in this case, but it seems like it > use the 'pdev->defvn << 8' which is not really we want and will lead to > mismatch. > > interrupt-map-mask = <0xf800 0 0 7>; > interrupt-map = <0x0000 0 0 1 ...>, > <0x0000 0 0 2 ...>, > <0x0000 0 0 3 ...>, > <0x0000 0 0 4 ...>, > > 0x0800 0 0 1 ...>, > 0x0800 0 0 2 ...>, > 0x0800 0 0 3 ...>, > 0x0800 0 0 4 ...>; > ... > pcie@1,0 { > reg = <0x0800 0 0 0 0>; > ... > }; > > > Or, alternatively, we could add a interrupt-map property in both child > and root node to solve this. The below example is my original version as > I don't want to change that function either. The code looks at devfn because it's meant to work for PCI including when the devices dont have a device node in the DT. What I'm trying to figure out is what is it that your parent and children are representing here. Which is/are the root complex ? What is the actual topology as visible on the PCIe bus (is lspci output basically) and how does that map to your representation ? > interrupt-map-mask = <0xf800 0 0 0>; > interrupt-map = <0x0000 0 0 0 ...>, > 0x0800 0 0 0 ...>; > ... > pcie@1,0 { > reg = <0x0800 0 0 0 0>; > #interrupt-cells = <1>; > interrupt-map-mask = <0 0 0 0>; > interrupt-map = <0 0 0 0 ...>; > ... > }; > > However, I can't find any other similar case in documentation. > > Thanks.