Received: by 10.213.65.68 with SMTP id h4csp86023imn; Thu, 15 Mar 2018 18:01:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELv3gLleGM9E3dHkhtJGepjFscd+bv18rphffB1E9fqbUyT+bXojcauddA4FP+0ktDYK7L3m X-Received: by 2002:a17:902:968c:: with SMTP id n12-v6mr10269122plp.371.1521162110322; Thu, 15 Mar 2018 18:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521162110; cv=none; d=google.com; s=arc-20160816; b=VOfQzdajzSCI56ygcZEmMhtSdXbBJLfleV3plY2gS0FNy6fxl1BAY15RIcSLdl5TPm 5cDaidlz7gqpa36xiAUkRP9JNcHep8BbkGYpol/1bQxv1BGmTxogkpW78m6sUeMrnE+Y asaGHLdwgHEZwlQh9i9t+21/z/z+ItLXpDPPIRD8M8vw8FtwxWQ4FoKqw/dch6VQ/D3c 83G/RCkX6sbP1fd6+DpDHkQEl29sotpiy/6lSQUl0iLniQJMNSmfyvvOmRKhB/x3WqGq HBVOFajQgktL+AvnryXY6BQwGzSTn1NyT5QnZHqvAd0fzCkMTKU0VNj0LHQ9vqk+MJDv c9dw== 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=ddtD3zONuEeht6NEEv9kRKZHtdiwGc+TpBsPyuoCKk8=; b=HS5s9mEKEpYs9qyC2WPKLufdym6qoHp2Sq9EMi1n9TNPHY/eNGHMvgLRKIgwl23l9n Q0kZtzLpKmc+R+3RtNgst6MCNnVyGVDd/Wigugg7rtKIJEiTveGnev4LqQwwWuHQi9jd ++2Npb1ryCg6j87D8brg8VRx1eGrNRJzC4FV3XsTyKw8M7FwD1QWDCDBneYGnjRtiM8I XE+rTT8U/a11g51sJNUPoxHvMUdvze9nBtS01PLJm7z3nP7z5ZhfC5J8JWPTs7wYhf9d SPjr1rmCU10nPmLESH9YTsaa16Z+jIcBmgyDox95MFqBxRIY7wEsblcaMnGa3STsnPDu rhrQ== 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 59-v6si4939699plf.596.2018.03.15.18.01.35; Thu, 15 Mar 2018 18:01:50 -0700 (PDT) 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 S932706AbeCPBAn (ORCPT + 99 others); Thu, 15 Mar 2018 21:00:43 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:50160 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751791AbeCPBAl (ORCPT ); Thu, 15 Mar 2018 21:00:41 -0400 X-UUID: 0deeee01abff4d12936bffaa8ab8c4b2-20180316 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1288501184; Fri, 16 Mar 2018 09:00:37 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 16 Mar 2018 08:58:09 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 16 Mar 2018 08:58:09 +0800 Message-ID: <1521161889.13458.1.camel@mtkswgap22> Subject: Re: [PATCH 1/2] of_pci_irq: add a check to fallback to standard device tree parsing From: Ryder Lee To: Lorenzo Pieralisi CC: Arnd Bergmann , Rob Herring , "Bjorn Helgaas" , Frank Rowand , Benjamin Herrenschmidt , , , , , Date: Fri, 16 Mar 2018 08:58:09 +0800 In-Reply-To: <20180315174329.GB22176@e107981-ln.cambridge.arm.com> References: <31c765c53e85e41bfc001d110d69e46c9967f4e7.1516961656.git.ryder.lee@mediatek.com> <20180315174329.GB22176@e107981-ln.cambridge.arm.com> 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 Thu, 2018-03-15 at 17:43 +0000, Lorenzo Pieralisi wrote: > On Wed, Jan 31, 2018 at 03:41:49PM +0800, Ryder Lee wrote: > > A root complex usually consist of a host bridge and multiple P2P bridges, > > and someone may express that in the form of a root node with many subnodes > > and list all four interrupts for each slot (child node) in the root node > > like this: > > > > pcie-controller { > > ... > > interrupt-map-mask = <0xf800 0 0 7>; > > interrupt-map = <0x0000 0 0 {INTx} &{interrupt parent} ...> > > 0x0800 0 0 {INTx} &{interrupt parent} ...>; > > > > pcie@0,0 { > > reg = <0x0000 0 0 0 0>; > > ... > > }; > > > > pcie@1,0 { > > reg = <0x0800 0 0 0 0>; > > ... > > }; > > }; > > > > As shown above, we'd like to propagate IRQs from a root port to the devices > > in the hierarchy below it in this way. However, it seems that the current > > parser couldn't handle such cases and will get something unexpected below: > > > > pcieport 0000:00:01.0: assign IRQ: got 213 > > igb 0000:01:00.0: assign IRQ: got 212 > > > > There is a device which is connected to 2nd slot, but the port doesn't share > > the same IRQ with its downstream devices. The problem here is that, if the > > loop found a P2P bridge, it wouldn't check whether the reg property exists > > in ppnode or not but just pass the subordinate devfn to of_irq_parse_raw(), > > thus the subsequent flow couldn't correctly resolve them. > > > > Fix this by adding a check to fallback to standard device tree parsing. > > > > Signed-off-by: Ryder Lee > > --- > > Please refer to the previous discussion thread: https://patchwork.ozlabs.org/patch/829108/ > > --- > > drivers/of/of_pci_irq.c | 14 ++++++++++++-- > > 1 file changed, 12 insertions(+), 2 deletions(-) > > Hi Ryder, > > from the thread discussion I gather I can drop this series from the PCI > queue and you will update the DT as agreed with Ben, that looks like > the most reasonable solution to the problem you are facing, please > let me know if there is anything I am missing. > > Thanks, > Lorenzo > Yes, please drop the series. Thanks