Received: by 10.223.176.5 with SMTP id f5csp223255wra; Mon, 5 Feb 2018 20:32:56 -0800 (PST) X-Google-Smtp-Source: AH8x227PwG5sNySFxrnVzLzJUvHwf40w2OjvXJMMp9v/I//nhOUMFs6leMpwdpcRZ8qz5PndxBRB X-Received: by 2002:a17:902:5e3:: with SMTP id f90-v6mr1120368plf.418.1517891575911; Mon, 05 Feb 2018 20:32:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517891575; cv=none; d=google.com; s=arc-20160816; b=KJGdWadqTowyhKJ/2cyUcSG8OKWveWtNnRCsVutEjyygg/Tt9yUziWu2hLKglsHKVl d6DEzGBirhORzijgZwwJFhJsCbkK9sM41zSRfhvREzE3IP2tHLtT6K3TRTvsuJyr0iV9 JzMQafOGLOyJvwByNEeF3BllMFkydL1d4a73T4NqlOYdE4W4tAXBJ8ZCaxDEgFdrO8tB J68lM9QJBKjrmkCNAtD7KHagP4pzqKCfYmZCD3/hwx6WYa9+JOR2/skzw3ukIJ3gYQ7o PPbUqJ88c4XjearQJ5nfXJ2SEbTsdc8u1fBT8wrJtYl5WkP9XN62kE/Ewt7+IXz3rPWy 6xFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=wHF8qzRtO4p4j1lr5L4L9LX9yV+Q7sqC62lO4Yy0EYI=; b=HKAuFCVu8LQ8l8CJyzn1k5MkQy8EH4swCDq00YbYMnuehCqkUmsftn3FJjFao00rvf J27nyhJqtNkfaDGvg5By/+Pk12ChWNxb8Kl1nrY8mWq5LOkdzS7jG2G5KerYbSoHejae gpMlUXBn9Kh7ijeVpLWRmgspd2+9YHoj9iXfLouMZcRzLr1tYw4NBInniHtl85Xc0L5G B+ubgiXV+xcj46AbRUr3SPvwhylUu7OBO6e8KhakXI0gHquf/3idoKVHXVqeboVmZcn1 RM5xEjfPWHs8K8Hr3u8I/WEV+4czOBmBygMHQ3DGTASYfgXk1tHgV5IB4KWN1SPLqhtO R90g== 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 f26si1194723pge.578.2018.02.05.20.32.41; Mon, 05 Feb 2018 20:32:55 -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 S1752430AbeBFEbZ (ORCPT + 99 others); Mon, 5 Feb 2018 23:31:25 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:49123 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752132AbeBFEbS (ORCPT ); Mon, 5 Feb 2018 23:31:18 -0500 X-UUID: 963e207655334e778e305d170991c098-20180206 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1774059907; Tue, 06 Feb 2018 12:31:13 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 6 Feb 2018 12:31:11 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 6 Feb 2018 12:31:11 +0800 Message-ID: <1517891471.20869.6.camel@mtkswgap22> Subject: Re: [PATCH 1/2] of_pci_irq: add a check to fallback to standard device tree parsing From: Ryder Lee To: Benjamin Herrenschmidt CC: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Lorenzo Pieralisi , Arnd Bergmann , , "linux-kernel@vger.kernel.org" , Rob Herring , , Bjorn Helgaas , Frank Rowand , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Date: Tue, 6 Feb 2018 12:31:11 +0800 In-Reply-To: <1517889903.2312.151.camel@kernel.crashing.org> 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> <1517889903.2312.151.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N 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 15:05 +1100, Benjamin Herrenschmidt wrote: > 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 ? This is a single root complex with 2 root port (children in DT). > What is the actual topology as visible on the PCIe bus (is lspci output > basically) and how does that map to your representation ? # lspci 00:00.0 Class 0604: 14c3:0801 //1st slot - pcie@0,0 00:01.0 Class 0604: 14c3:0801 //2nd slot - pcie@1,0 01:00.0 Class 0280: 14c3:7603 //A device which is connected to 1st slot 02:00.0 Class 0200: 8086:1521 //A 4 func device which is connected to 2nd slot 02:00.1 Class 0200: 8086:1521 02:00.2 Class 0200: 8086:1521 02:00.3 Class 0200: 8086:1521 > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek