Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp245989pxb; Mon, 13 Sep 2021 18:14:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+YqPeA/pxPcU6B0nHGx9+DA6y6skoRW7kzb79MTywHop7fTLILB7LkAwQb1kHPyQmima4 X-Received: by 2002:a05:6402:222b:: with SMTP id cr11mr16674478edb.392.1631582066250; Mon, 13 Sep 2021 18:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631582066; cv=none; d=google.com; s=arc-20160816; b=E9KiD4pt7vjL/nGl23GVfkOyt7Kcgab/6d+UVsj16Z/l6ZNgdeGbMdygLj5phoHEMY mPouGXsqubHR49VswwFogAM5qD4OSCMJZA6LSy/H4tVxYsnyNBZCc9B+qfimIVSi0YK8 15j8s82QJp7J0FPOHwh0UpaB1s63JZmvkzo5aKBa4WaIS9vXr3OI0GPg3fwZNsWqn7sm il+FDOXzkAHGbmRYA8jP17dZS1az4+hE+74aKjCK04GEEo3CfkJ73zaX/9rGMGTseeaH p06fbrQvzgCu1pI7W/xhK6G/oOrWKdz689jCg3V0FTr9sf+eLD6qbxu9sdJc6SaKmxmo UGxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=najwMMgXa9IKRCpV9R0rG93YrtEsqlbJHKkPHeoMBtw=; b=bjXXe4R3HOcWduAhgeXLbNuKuWYByEeKCTS0UPYw3pPnzblbqFhwjiHH6VJLRwSbCo jMQ4N4HeR4e8PlVyFRqD+WnokkZ4FHbeZzpKTAP2aRodm612Ms3kRKWYpua/WQmfPrv/ iawA6VERQsOLvv3dCE8MtZGTJirlEjn+XEo7voUmpAWwFokT5b6HhaewIvCIP5PsYYfq LAKB58a2J4P+GhHRECGThWceBO1Nxf0VONLKhTtYoGK/5xdjMDL7heEoslRJM4dzDEAF 9JGtIDCUnM+JnRbhTztkhS4NzMjUjaH19wENLbYR2jI55YBZ+nb86eH5bCNUzCwzjrxs LC3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cQTLUA+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si1895042edf.614.2021.09.13.18.14.02; Mon, 13 Sep 2021 18:14:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cQTLUA+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345208AbhIMVO5 (ORCPT + 99 others); Mon, 13 Sep 2021 17:14:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:50148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242414AbhIMVOz (ORCPT ); Mon, 13 Sep 2021 17:14:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F77F61106; Mon, 13 Sep 2021 21:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631567619; bh=6bBOSpmFHVH8Qs5P5gI5GuYG8hzXlKUcmyfIz3ggF4M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cQTLUA+kYUvv9TQe+NNR/OOuVCFwTEaAwdXuY6aHKIsxLZEjtAmWrO/wdanYs7TXq nlY9tjv01obSerK+moN8oELVwwhz3AUnkgdK7TsHqesHWrKMtlQKCww8bjNeWDrQ6I IzX7J5d2sqGrrT/fHRMCdKWzg4RXj5M0TOfBktNzRP2CDvJniZUgwz4Rn7dVxW7UVT eM7qRcqg78u5Dnf5D2iu1zFuP+/jFsmBo22jD15I10E3wUluR8efhL2iYiZyZKCxE8 bZG+0SlZwNo2QFfqV2Ga6CtR6JJc992YefucB8I2c/QmjNIqCvxzjVxEZGF+74V0IN OT/c04qQYnhIw== Received: by mail-ed1-f41.google.com with SMTP id g21so16417897edw.4; Mon, 13 Sep 2021 14:13:39 -0700 (PDT) X-Gm-Message-State: AOAM530iMoq6p8YS19eizFVteQ+G8P8Vjcqvbm8EiCNIHbK2LHvHbDF0 NLsDf2WsW4Ufi6JnOGJTZvdaLlqyty3eRvRN5A== X-Received: by 2002:aa7:ca45:: with SMTP id j5mr4084233edt.6.1631567617603; Mon, 13 Sep 2021 14:13:37 -0700 (PDT) MIME-Version: 1.0 References: <20210913182550.264165-1-maz@kernel.org> <20210913182550.264165-3-maz@kernel.org> In-Reply-To: <20210913182550.264165-3-maz@kernel.org> From: Rob Herring Date: Mon, 13 Sep 2021 16:13:26 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 02/10] of/irq: Allow matching of an interrupt-map local to an interrupt controller To: Marc Zyngier Cc: devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , PCI , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Alyssa Rosenzweig , Stan Skowronek , Mark Kettenis , Sven Peter , Hector Martin , Robin Murphy , Android Kernel Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2021 at 1:26 PM Marc Zyngier wrote: > > of_irq_parse_raw() has a baked assumption that if a node has an > interrupt-controller property, it cannot possibly also have an > interrupt-map property (the latter being ignored). > > This seems to be an odd behaviour, and there are no reason why s/are/is/ > we should avoid supporting this use case. This is specially > useful when a PCI root port acts as an interrupt controller for > PCI endpoints, such as this: > > pcie0: pcie@690000000 { > [...] > port00: pci@0,0 { > device_type = "pci"; > [...] > #address-cells = <3>; > > interrupt-controller; > #interrupt-cells = <1>; > > interrupt-map-mask = <0 0 0 7>; > interrupt-map = <0 0 0 1 &port00 0 0 0 0>, > <0 0 0 2 &port00 0 0 0 1>, > <0 0 0 3 &port00 0 0 0 2>, > <0 0 0 4 &port00 0 0 0 3>; > }; > }; > > Handle it by detecting that we have an interrupt-map early in the > parsing, and special case the situation where the phandle in the > interrupt map refers to the current node (which is the interesting > case here). > > Signed-off-by: Marc Zyngier > --- > drivers/of/irq.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) Reviewed-by: Rob Herring