Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp192105imn; Fri, 29 Jul 2022 04:15:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sipEI7v9Od7s2ebb/MQbexFRo9Zs1Al/0HvC7zo5t7IeQqTL1iSeHZXK3DzddWwxXsq7eI X-Received: by 2002:a17:906:98c9:b0:72b:40de:9afe with SMTP id zd9-20020a17090698c900b0072b40de9afemr2579333ejb.620.1659093351704; Fri, 29 Jul 2022 04:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659093351; cv=none; d=google.com; s=arc-20160816; b=i+Szuz4vmFXOav/TWOi39dVy8myeui5Eihn6+Kw/JKS3VXmCwMutkO8LPil9Dd5S5R CUohYmjP0ntY5wU6ASVQ8YHalDxJnXT1pwvEtfBlQo4X38Bk5vopmyR6PfJg7M32QH6o 1VmxDSGVl1COk46unCfHGgiSn4xikTT5cjHe2fmuZEh3IS7Ttn2JO7bj2IAU700i9OKh E9cG5Kh4UPrE1VY4dOjrcYIFOTAH4yUfQV1wtTVy7QEYw9PJ0YQBjjmud1jmghpKW3IH YsW9j+r2M17uE9oRA17FGdx2np1gwI5t0R42Yxr0NXbyDroEMPhnUVzsEMnufiXsgGMi aFaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wkHP7wcCP+GaRcmldEaMLuAlKfO8py6/p1VJ4Q7aty4=; b=hwjUJx7pBm1XDvs5l+RW6lHBmGmLdrmJlT27nXG0e4GroI0TnEMFOv+odLahbmBJMy hak72I9gVV/3IaPbFOnIo7O6USL/M/apb7FthwY8fToFulzN9PQRjxV85g0TlYBXVVYr 0eozrSYxy07rSUHkQbLj6sl6oXvtIAZS79AzwXpBSJ5cv+r0wOaOHHzFg24QiO24hLNT nnjv5RUl9Si9Vw8wbnxkHVDpOiLw11jMlZGkPQiRMqeer8HwB8yoGvvtEaxcP9lVgpWH oxzZj51vGKJPkyokYZO+/WJ6XGV9j/3om4O1HPz29IkWrW1PZK1x3J6anGURRsWGd4fE OEWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb14-20020a0564020d0e00b0043bc19efc0bsi3076600edb.136.2022.07.29.04.15.20; Fri, 29 Jul 2022 04:15:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235779AbiG2LK6 (ORCPT + 99 others); Fri, 29 Jul 2022 07:10:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235625AbiG2LK4 (ORCPT ); Fri, 29 Jul 2022 07:10:56 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BC01A7AC0E; Fri, 29 Jul 2022 04:10:54 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0E1F21063; Fri, 29 Jul 2022 04:10:55 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A3C13F73D; Fri, 29 Jul 2022 04:10:53 -0700 (PDT) Date: Fri, 29 Jul 2022 12:10:51 +0100 From: Sudeep Holla To: Jassi Brar Cc: Rob Herring , Krzysztof Kozlowski , Sudeep Holla , Jassi Brar , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH] dt-bindings: mailbox: arm,mhu: Make secure interrupt optional Message-ID: <20220729111051.5me4vklrzskvsj4w@bogus> References: <20220728190810.1290857-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 28, 2022 at 04:07:45PM -0500, Jassi Brar wrote: > On Thu, Jul 28, 2022 at 3:17 PM Jassi Brar wrote: > > > > On Thu, Jul 28, 2022 at 2:08 PM Rob Herring wrote: > > > > > > The secure interrupt is only useful to secure world, therefore for NS > > > users it shouldn't be required. Make it optional. > > > > > > This fixes a warning on Arm Juno board: > > > > > > mhu@2b1f0000: interrupts: [[0, 36, 4], [0, 35, 4]] is too short > > > > > > Signed-off-by: Rob Herring > > > --- > > > Documentation/devicetree/bindings/mailbox/arm,mhu.yaml | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml b/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml > > > index bd49c201477d..d9a4f4a02d7c 100644 > > > --- a/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml > > > +++ b/Documentation/devicetree/bindings/mailbox/arm,mhu.yaml > > > @@ -57,6 +57,7 @@ properties: > > > maxItems: 1 > > > > > > interrupts: > > > + minItems: 2 > > > items: > > > - description: low-priority non-secure > > > - description: high-priority non-secure > > > > > Do we also want to specify that only the secure-irq is optional > > because irqs are directly mapped onto channels in the driver, and only > > omitting the secure (last) irq will work. > > > I could learn why specifying secure irq isn't desirable? > No non-secure client node would ask for that secure irq/channel, which > will simply lay unused. > Did you mean would or wouldn't ? Anyways I can insert a module that requests this channel and bring down the system as accessing anything configure secure from non-secure side on Juno results in system hang/error. > The programming of the secure channel doesn't care if the mode is > indeed secure. It all relies on providing accurate information in the > device tree :- the controller provides secure and non-secure channels > but only non-secure channels are _used_ in non-secure mode. > In general w.r.t the MHU IP may be yes. But if the secure side configures it as secure only and claims the channel which is the case on Juno, any attempt to access the same from non-secure side is fatal. > index f6c55877fbd94..004b1566be74d 100644 > --- a/arch/arm64/boot/dts/arm/juno-base.dtsi > +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi > @@ -26,7 +26,8 @@ mailbox: mhu@2b1f0000 { > compatible = "arm,mhu", "arm,primecell"; > reg = <0x0 0x2b1f0000 0x0 0x1000>; > interrupts = , > - ; > + , > + ; > interrupt-names = "mhu_lpri_rx", > "mhu_hpri_rx"; > #mbox-cells = <1>; > > If this works for you, I could submit a proper patch. > No this doesn't work IMO. Yes standalone everything looks fine, but you can insert a module requesting this channel and bring down the system. So I am not for this change. -- Regards, Sudeep