From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98E7DC433E0 for ; Wed, 3 Feb 2021 16:50:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D2A764F7E for ; Wed, 3 Feb 2021 16:50:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbhBCQu2 (ORCPT ); Wed, 3 Feb 2021 11:50:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:49768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbhBCQuX (ORCPT ); Wed, 3 Feb 2021 11:50:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C697A64F7C; Wed, 3 Feb 2021 16:49:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612370983; bh=9XENJ0HnM6JyUCLfiAwRo4hmqvm8LiTUr0z15OUhUK8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NpNvTOhhYlckCnP+jzFvqG15tQE0qUzvjEEY16Sko8o+bYSpuUdOb67RV63OlglFR zyQles57FiJZ/Nzf3P2IJy58SvUHMmb323PO+UT4D/IqWG48r6+mdc2hBFPMK6+uJ8 Hxch/dipnDemgDJKvw0r1M1Wz2Vb0F9BoLJRsjgnPBIObLM5L3o5HyxRLVnMoOZhDr xnc43guWEi71Xtc5ziwutkHmzkb8XCWajwB1PfVhOKYWsD2Qa3nTdl+gCQeqdx5Qd6 FEc3ycxF6J04OA0G9WSLpA4M0OIuLFHKH50OrqNWAumA44IFytqhlMBEuGlXqQjW6N Rhyi78rPsXFog== Received: by mail-ed1-f49.google.com with SMTP id c6so432241ede.0; Wed, 03 Feb 2021 08:49:42 -0800 (PST) X-Gm-Message-State: AOAM530/nYFYQOlKuU1FAthvjCEdatoAsqrFw9Bp3sCwLsbsWyq9PI7z T5JDG9wVWAGRhM65DEPNC96vPPSH7CCtywGl/g== X-Google-Smtp-Source: ABdhPJxMmS6b6aSLwPk/md2549ocqhvcpGA3RF/qCBD0XqRCNO3D7pGtanOod4uSX09SicOxfSQwgUx1C9osglS4Oq0= X-Received: by 2002:a05:6402:6c7:: with SMTP id n7mr3971188edy.289.1612370981263; Wed, 03 Feb 2021 08:49:41 -0800 (PST) MIME-Version: 1.0 References: <91e3405245c89f134676449cf3822285798d2ed2.1612189652.git.michal.simek@xilinx.com> <210b0e5a-767b-c285-62e2-23de19bd3cf1@xilinx.com> <20210203144344.4e261aea@slackpad.fritz.box> In-Reply-To: <20210203144344.4e261aea@slackpad.fritz.box> From: Rob Herring Date: Wed, 3 Feb 2021 10:49:29 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: dts: zynq: Add address-cells property to interrupt controllers To: Andre Przywara Cc: Michal Simek , "linux-kernel@vger.kernel.org" , Michal Simek , git , devicetree@vger.kernel.org, linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 3, 2021 at 8:44 AM Andre Przywara wrote: > > On Wed, 3 Feb 2021 15:15:19 +0100 > Michal Simek wrote: > > > On 2/3/21 3:12 PM, Rob Herring wrote: > > > On Wed, Feb 3, 2021 at 1:01 AM Michal Simek wrote: > > >> > > >> > > >> > > >> On 2/1/21 6:41 PM, Rob Herring wrote: > > >>> On Mon, Feb 1, 2021 at 8:27 AM Michal Simek wrote: > > >>>> > > >>>> The commit 3eb619b2f7d8 ("scripts/dtc: Update to upstream version > > >>>> v1.6.0-11-g9d7888cbf19c") updated dtc version which also contained DTC > > >>>> commit > > >>>> "81e0919a3e21 checks: Add interrupt provider test" > > >>>> where reasons for this checking are mentioned as > > >>>> "A missing #address-cells property is less critical, but creates > > >>>> ambiguities when used in interrupt-map properties, so warn about this as > > >>>> well now." > > >>>> > > >>>> Add address-cells property to gic and gpio nodes to get rid of this warning. > > >>>> The similar change has been done for ZynqMP too. > > >>> > > >>> FYI, we're going to make this check dependent on having an > > >>> interrupt-map property. So adding these isn't necessary. > > >> > > >> Good to know. Is there going to be report if interrupt-map doesn't > > >> exist? Which can end up with reverting these changes? > > > > > > You mean a warning if '#address-cells' is present and interrupt-map is > > > not? No, that would cause lots of warnings. > > > > yep. > > Why would we do that? That sounds dangerous and would be broken if the > IRQ controller is in a generic .dtsi (as it usually is), but the > interrupt map is only in *some* of the board .dts files. > > What is the problem of just putting #address-cells = <0>; in the > IRQ controller node, after checking that there currently no interrupt > maps in use and no IRQ children? And be safe for good? That's 16 bytes > in the DTB, IIUC. Because I don't think we need a bunch of warning fix patches to add these everywhere. Also, the need for #address-cells pretty much makes no sense on any modern system. It is a relic from days when the bus (address) topology and interrupt topology were related. > Because otherwise we have that lovely ambiguity between the > implicit default #address-cells = 2; and the assumed default of 0. > > And that's why I think we also cannot *automatically* add an #ac = <0>; > property, because that would change behaviour. I'd rather try to limit where we assume the default of 2. My guess is that's only some combination of old PowerPC and/or Sparc and no FDT based DT. Rob From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81450C433E0 for ; Wed, 3 Feb 2021 16:50:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16CB964F7C for ; Wed, 3 Feb 2021 16:50:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16CB964F7C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bIj11tTu59/ElLqIFcmJTGcqNkeV9MYOsJ/1DjPQdv4=; b=yKa4RgcMlHobUvdGkAGSexmVf t8VL7ydwVYnaMpWRRPnPaXV7l7RCqpbucOV1xG8/2OHw1FJ/NvJDtyo4O3GhGZhyJOxYN0eGvX3WA i6h30Bt3RdbrbsqM0dhIhF2A7oa1TtwGlh8XyaHV+qlXSYZxRJAnbPxbHWM/cIfalELkaTP5BXz1w TjrRS31PgPur7E85fOzZj4ZmY1dHQPVXJSkHlaLvKCGb2WWWP8ffTWGagOQTxQF/Hvs5E6MmwpNF0 htmQEPsrsBMItxE1SQt+HBUxTZcyoFnvRtailN7WemnPlWMJxj2VX85lyKkBhIpFp0YmgiVZ7/Cpz N7hDpKmnA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7LLd-0003OV-RO; Wed, 03 Feb 2021 16:49:45 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7LLb-0003O1-UK for linux-arm-kernel@lists.infradead.org; Wed, 03 Feb 2021 16:49:44 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D1EF164F87 for ; Wed, 3 Feb 2021 16:49:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612370983; bh=9XENJ0HnM6JyUCLfiAwRo4hmqvm8LiTUr0z15OUhUK8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NpNvTOhhYlckCnP+jzFvqG15tQE0qUzvjEEY16Sko8o+bYSpuUdOb67RV63OlglFR zyQles57FiJZ/Nzf3P2IJy58SvUHMmb323PO+UT4D/IqWG48r6+mdc2hBFPMK6+uJ8 Hxch/dipnDemgDJKvw0r1M1Wz2Vb0F9BoLJRsjgnPBIObLM5L3o5HyxRLVnMoOZhDr xnc43guWEi71Xtc5ziwutkHmzkb8XCWajwB1PfVhOKYWsD2Qa3nTdl+gCQeqdx5Qd6 FEc3ycxF6J04OA0G9WSLpA4M0OIuLFHKH50OrqNWAumA44IFytqhlMBEuGlXqQjW6N Rhyi78rPsXFog== Received: by mail-ed1-f51.google.com with SMTP id l12so402909edt.3 for ; Wed, 03 Feb 2021 08:49:42 -0800 (PST) X-Gm-Message-State: AOAM530I/uQ5NhQQE70CRvGG4igUrYhoPMLk9kNMbIqcFIqY0Pl0Y6Iz KIcXfQhMbdQtRWr+NOGJNwvBYKzWConyad8low== X-Google-Smtp-Source: ABdhPJxMmS6b6aSLwPk/md2549ocqhvcpGA3RF/qCBD0XqRCNO3D7pGtanOod4uSX09SicOxfSQwgUx1C9osglS4Oq0= X-Received: by 2002:a05:6402:6c7:: with SMTP id n7mr3971188edy.289.1612370981263; Wed, 03 Feb 2021 08:49:41 -0800 (PST) MIME-Version: 1.0 References: <91e3405245c89f134676449cf3822285798d2ed2.1612189652.git.michal.simek@xilinx.com> <210b0e5a-767b-c285-62e2-23de19bd3cf1@xilinx.com> <20210203144344.4e261aea@slackpad.fritz.box> In-Reply-To: <20210203144344.4e261aea@slackpad.fritz.box> From: Rob Herring Date: Wed, 3 Feb 2021 10:49:29 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: dts: zynq: Add address-cells property to interrupt controllers To: Andre Przywara X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210203_114944_117850_AB864FC6 X-CRM114-Status: GOOD ( 25.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Michal Simek , Michal Simek , "linux-kernel@vger.kernel.org" , git , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 3, 2021 at 8:44 AM Andre Przywara wrote: > > On Wed, 3 Feb 2021 15:15:19 +0100 > Michal Simek wrote: > > > On 2/3/21 3:12 PM, Rob Herring wrote: > > > On Wed, Feb 3, 2021 at 1:01 AM Michal Simek wrote: > > >> > > >> > > >> > > >> On 2/1/21 6:41 PM, Rob Herring wrote: > > >>> On Mon, Feb 1, 2021 at 8:27 AM Michal Simek wrote: > > >>>> > > >>>> The commit 3eb619b2f7d8 ("scripts/dtc: Update to upstream version > > >>>> v1.6.0-11-g9d7888cbf19c") updated dtc version which also contained DTC > > >>>> commit > > >>>> "81e0919a3e21 checks: Add interrupt provider test" > > >>>> where reasons for this checking are mentioned as > > >>>> "A missing #address-cells property is less critical, but creates > > >>>> ambiguities when used in interrupt-map properties, so warn about this as > > >>>> well now." > > >>>> > > >>>> Add address-cells property to gic and gpio nodes to get rid of this warning. > > >>>> The similar change has been done for ZynqMP too. > > >>> > > >>> FYI, we're going to make this check dependent on having an > > >>> interrupt-map property. So adding these isn't necessary. > > >> > > >> Good to know. Is there going to be report if interrupt-map doesn't > > >> exist? Which can end up with reverting these changes? > > > > > > You mean a warning if '#address-cells' is present and interrupt-map is > > > not? No, that would cause lots of warnings. > > > > yep. > > Why would we do that? That sounds dangerous and would be broken if the > IRQ controller is in a generic .dtsi (as it usually is), but the > interrupt map is only in *some* of the board .dts files. > > What is the problem of just putting #address-cells = <0>; in the > IRQ controller node, after checking that there currently no interrupt > maps in use and no IRQ children? And be safe for good? That's 16 bytes > in the DTB, IIUC. Because I don't think we need a bunch of warning fix patches to add these everywhere. Also, the need for #address-cells pretty much makes no sense on any modern system. It is a relic from days when the bus (address) topology and interrupt topology were related. > Because otherwise we have that lovely ambiguity between the > implicit default #address-cells = 2; and the assumed default of 0. > > And that's why I think we also cannot *automatically* add an #ac = <0>; > property, because that would change behaviour. I'd rather try to limit where we assume the default of 2. My guess is that's only some combination of old PowerPC and/or Sparc and no FDT based DT. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel