Received: by 10.223.176.5 with SMTP id f5csp2987155wra; Mon, 5 Feb 2018 13:38:34 -0800 (PST) X-Google-Smtp-Source: AH8x2276dfjUfaUp7FAykT+RT8X2CGH8k7sTtUltsgpB/5mwx/t/a6N6ctZVqd2/FzBgEsXLlKJ/ X-Received: by 10.99.99.198 with SMTP id x189mr158260pgb.248.1517866714657; Mon, 05 Feb 2018 13:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517866714; cv=none; d=google.com; s=arc-20160816; b=0B7Ul8hqkc/KPn+l0MTVOF8kgdzmB0eIiq4LCW1d2uFIz+jDFzPpqN1SdhdDTrBSX0 Gf5s+frEQPHaTj8xAgi2g42oSEC2qc0Zl6pIuFA4zVwYS8Iydsjs8vmn4akQmtgExTat IT1XQtEL9Nj7lQd06x3JN1GbOW6FN5fc89TL2pph9lAUNjxacdx1pCMqiA09Ebb59eKH zHEOHZvBiXwwT5+8TT/i+6upmAbYmky/Auupz0BtHhRTx+9Egguy25X7vKU1V8bXOIcD zg54CDSBo1uUi7t8hkoR+seOqM9rIVRdXS0F9Nb/3v9/ixASVGCbDRD59MdqODwcHpeE Drng== 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=wlWdQnXA/R6EvB9p00KDo/ce7s6SnIrhdbE1Ako1vPA=; b=kiayu/+ZphLlvqCODNIauABQ1TI3NTm6Eh43HEhQXh5n6snNViOZQIlihT7sNmTlSp JyUQqV5Eqg0a13zxUFjbf+bD24uyeVLQVDOIUoJjCvh2IIRVXk+UvL54qt0txWtVAZEr miTVR3kjwx94Xdzw8LgdI5WaE8rmKJc0ttE5j0zlR2r03dyVtQhxke2jEjxuYD3ek/ed fQLYHKoEcBLVGnMX3no1rPgCBKYTT+X/wthc6O0k7lgmYBxIVXoQyeLUfTza194Mdcks nEi6YwR4QLQAr9z71h9siMi9uKebNEzM2oSjZpgmfE5o8gDg1PiljxQ/e9sGIU2ZaCZ0 /64A== 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 n128si3238825pgn.752.2018.02.05.13.38.20; Mon, 05 Feb 2018 13:38:34 -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 S1752391AbeBEVhQ (ORCPT + 99 others); Mon, 5 Feb 2018 16:37:16 -0500 Received: from gate.crashing.org ([63.228.1.57]:38925 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358AbeBEVhH (ORCPT ); Mon, 5 Feb 2018 16:37:07 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w15LaPiV016847; Mon, 5 Feb 2018 15:36:26 -0600 Message-ID: <1517866584.2312.140.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 , Rob Herring Cc: "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 08:36:24 +1100 In-Reply-To: <1517563970.24622.9.camel@mtkswgap22> References: <31c765c53e85e41bfc001d110d69e46c9967f4e7.1516961656.git.ryder.lee@mediatek.com> <1517563970.24622.9.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 Fri, 2018-02-02 at 17:32 +0800, Ryder Lee wrote: > On Wed, 2018-01-31 at 10:02 -0600, Rob Herring wrote: > > On Wed, Jan 31, 2018 at 1:41 AM, 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. I don't really understand the problem explanation here. Something doesn't look right as you shouldn't have to change that function, but I just don't get what you a Cheers, Ben.