Received: by 10.223.185.116 with SMTP id b49csp728641wrg; Fri, 23 Feb 2018 05:59:28 -0800 (PST) X-Google-Smtp-Source: AH8x226fydW9teqxOAGZlqBwPmttiHaJQuebpTGkhguhLRFOSnXSodrt9DlAY7RevXWpgQQFzIaA X-Received: by 2002:a17:902:ab84:: with SMTP id f4-v6mr1841608plr.239.1519394368183; Fri, 23 Feb 2018 05:59:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519394368; cv=none; d=google.com; s=arc-20160816; b=VM4C8VpLR6Akm2OhMnqQMITjjhnUTGzw9nng9TjMXFDoWkKcaDkKN2h45y1joi8qm6 XKw2CyYpoVkokKoup1EirXdzvZTl73toCdmCR3CXI5LhUEr9DU8SZ9pI2r5Hwr48mvSA vCwOy5QJ1+sEh5Di4XCtOZEmoq9QU1ZyAGEP8m6t08Ef6OTWm0a3jrDwpYOyHGOIipWz JXBbIZsa0muSYxz82x/d2X5ivojrnYNemDIV4Sr5cmr1HVuV3kK16/W+w0NWMNzyz+2D GacYml0lUg5bsT1GsSZiYCcf7y8Dto2SbMnxfAI/sad4ObKz/jFDUC7CnxmVNOs+aCSR fe+A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=siIeseGYqb8mxDowXwcqg071rLiLnyrvptxak8f4c9s=; b=bXpLsvA7PGbm9eHPhlNm6FPyXjsrjVSqgZyfpv8sqICcrxZ0PNnOi461tv12Zf10Gz wV/w2X5+RQFe9oAbOe+RTqq5519rq+c1G5MucHOqIb2tbpiMuRKOxVa/u/9mMD2YUR02 9Fu5wnP3g2juPYmmub1V9HIUFFCvX2O9F368HHkykjbxv7a9zw7XOhp8pnGL33vA1rGz TZyVLs084TTXqn31ZsTGBrIpz0TtqpdFq8fjiHPB/icczJJtprigXOmNOXyrts2S7FRC QoRF+Sx1O/7Fx4UuYi0Wf/+rlKmYWDEeNG2xgRlP6bYAIiBxT8SaUEsmXrYoXVTmobo5 Jh6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@prevas.dk header.s=ironport2 header.b=cnEZh2F3; 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 j15-v6si1861329pli.649.2018.02.23.05.59.13; Fri, 23 Feb 2018 05:59:28 -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; dkim=fail header.i=@prevas.dk header.s=ironport2 header.b=cnEZh2F3; 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 S1751455AbeBWN63 (ORCPT + 99 others); Fri, 23 Feb 2018 08:58:29 -0500 Received: from mail02.prevas.se ([62.95.78.10]:55192 "EHLO mail02.prevas.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbeBWN61 (ORCPT ); Fri, 23 Feb 2018 08:58:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=2923; q=dns/txt; s=ironport2; t=1519394307; x=1550930307; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=Sv6dRnXDahils/O4eg8yga8MvRemColIWlYM40v9SeI=; b=cnEZh2F3CJbKAWah8M6WCQQH5l993lJNFZ0pLXjALgVbZHQeF3CpazVa VZRo0K2sF4qHPWeRzDKOft7koEA9mxa5Z7RsKLnT1Y1ZrLMrkRLuXBR5l gJg14Tbta1QETOJp2f2MwP0/iGZp+f7WITXi3mEC5npCYY90IbwMFDEos s=; X-IronPort-AV: E=Sophos;i="5.47,383,1515452400"; d="scan'208";a="3118515" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Feb 2018 14:58:20 +0100 Received: from [172.16.11.22] (172.16.8.31) by smtp.prevas.se (172.16.8.103) with Microsoft SMTP Server (TLS) id 14.3.361.1; Fri, 23 Feb 2018 14:58:20 +0100 Subject: Re: [PATCH RFC v2 1/3] drivers: irqchip: pdc: Add PDC interrupt controller for QCOM SoCs To: Marc Zyngier , Lina Iyer , , CC: , , , , References: <20180202142200.6229-1-ilina@codeaurora.org> <20180202142200.6229-2-ilina@codeaurora.org> <02e2a5f9-8ecc-76b1-a3cc-c95b215e8fe1@prevas.dk> <8a482f9c-9d2c-cea9-137e-2ce367c0f903@arm.com> From: Rasmus Villemoes Message-ID: Date: Fri, 23 Feb 2018 14:58:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <8a482f9c-9d2c-cea9-137e-2ce367c0f903@arm.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.8.31] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-23 14:37, Marc Zyngier wrote: > Hi Rasmus, > > On 23/02/18 12:16, Rasmus Villemoes wrote: >> On 2018-02-02 15:58, Marc Zyngier wrote: >>> Why 3? Reading the DT binding, this is indeed set to 3 without any >>> reason. I'd suggest this becomes 2, encoding the pin number and the >>> trigger information, as the leading 0 is quite useless. Yes, I know >>> other examples in the kernel are using this 0, and that was a >>> consequence of retrofitting the omitted interrupt controllers (back in >>> the days of the stupid gic_arch_extn...). Don't do that. >>> >> >> Hi Marc >> >> I'm about to send out a new revision of the ls-extirq patchset, and >> thanks to you pointing me to these patches, I've read the comments on >> the various revisions of this series and tried to take those into >> account. But the above confused me, because in response to my first RFC >> (https://patchwork.kernel.org/patch/10102643/) we have >> >> On 2017-12-08 17:09, Marc Zyngier wrote: >>> On 08/12/17 15:11, Alexander Stein wrote: >>>> Hi Rasmus, >>>> >>>>> + >>>>> +Required properties: >>>>> +- compatible: should be "fsl,ls1021a-extirq" >>>>> +- interrupt-controller: Identifies the node as an interrupt controller >>>>> +- #interrupt-cells: Use the same format as specified by GIC in >> arm,gic.txt. >>>> >>>> Do you really need 3 interrupt-cells here? As you've written below >> you don't >>>> support PPI anyway the 1st flag might be dropped then. So support >> just 2 cells: >>>> * IRQ number (IRQ0 - IRQ5) >>>> * IRQ flags >>> >>> The convention for irqchip stacked on top of a GIC is to keep the >>> interrupt specifier the same. It makes the maintenance if the DT much >>> easier, and doesn't hurt at all. >> >> Personally, I'd actually prefer the simpler interrupt specifiers without >> a redundant 0. Maybe I'm just missing some difference between this case >> and the ls-extirq one? > The difference is that you're adding a new irqchip to an existing DT, > and you get some possible breakage. Maybe you'd be happy with the > breakage, that's your call (and the maintainer's). OK. In the ls1021a case, I actually think "breaking" any existing users if and when they move to the new driver/irqchip is a good thing: the power-on-reset value is such that the lines have the polarity inverted. So there could be some board with a device with either a EDGE_FALLING or LEVEL_LOW interrupt connected to one of the external interrupt lines, which is described in DT by "lying" and using the opposite flag. Changing #interrupt-cells prevents such (ab)users from just changing interrupt-parent and calling it a day. In the QC case, it is > old brand new, so no harm in doing the right thing from day one> > It is in the end an implementation decision, and you could go either way. Doing the right thing sounds nice, so I'll go with that :) Thanks, Rasmus