Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1799303rdd; Thu, 11 Jan 2024 09:31:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEk0ceVRzJnJqnkucvEJpNeAQZeqlOItPK4WLU/0+6dTnnoo0lPrWv0yDnvL2pp7mzWtmZz X-Received: by 2002:a05:6402:36f:b0:557:153e:58cb with SMTP id s15-20020a056402036f00b00557153e58cbmr1199663edw.16.1704994308393; Thu, 11 Jan 2024 09:31:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704994308; cv=none; d=google.com; s=arc-20160816; b=Ap2/xZ/jE4kOtbeJEfqJIQNkGmlXVqSeBgBqdtMRWEnodIinYhrgPK3+h+vneElNRo k/xZldYccNM6aF3vj5l9fblW9EKGXQpnCuHvAS8+ZaPkHnEE1qyD+J0cvxrQSbBeCVBl /jgZurQlOiCBREwLPlTFYOwucDarHiAkv7Zr8ApPEtesdGSxCUKEJ1YWPfGC/S5rLn0R kqKnSzCWrHogJyggktzsjajvEtUIO/Gk87qT+cKNRRQUUwmxwSCoin/DkVOLq+zRv3sc 0OeYD4VpRlYQqu1kmgelx0ZzsapVhmFaB2nDigBTZ654TgYYYDr+CgGm7yewU9aJa12b f2aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vCyuaIJbrqGBCk22+YMkIu6qR/stMIcMM27KXEvI2H4=; fh=unnL0m/FxeAVs31jqO98SejxTvZgMqr/NEM2I3MYZCg=; b=cvRGdyFlWj8M7ZMVwBko5oZV4zuyE0uiiVpfru+glcN8p4vFRmlw17hojdYLw9VhMD gFPKykG006dxu0TcCeQdATeVcvN+Qvs8SV9IRYQ7ucHwWXRCJ4Snc0sVwAuakIqNoj0j 8/Vok3dbVphajLxXdd6ZWny6JiA8x4TsUDOg+UC4OsqPrKko7JMVZP1poS/j/8uMkbVJ LlCzUrfXo0cFZY1SofXKR/obEEnEhd1J3julz+3ZW/9qQMKVzn/3sZ+LHYuwFO33l4S/ yxeJJ6zXQmyHvPP6okCdLddyddbIDp8JE3LOnwt6yrDzl3llooTzmsRY7Rfg4w9eyMc9 BvCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="D/0K89YN"; spf=pass (google.com: domain of linux-kernel+bounces-23935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ds5-20020a0564021cc500b0054c392acb7asi704401edb.281.2024.01.11.09.31.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 09:31:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="D/0K89YN"; spf=pass (google.com: domain of linux-kernel+bounces-23935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2B2A01F23E07 for ; Thu, 11 Jan 2024 17:31:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F13EE53819; Thu, 11 Jan 2024 17:31:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D/0K89YN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CFB110A20; Thu, 11 Jan 2024 17:31:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1373BC433F1; Thu, 11 Jan 2024 17:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704994276; bh=z3f/odDTmvi8sV0yAYFsEU4ayXJE1gJP66VKYOAb/+c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D/0K89YNryWipcKZQDcwm9mKjge8TqgqpVv+2H6jUVz0wQRfOYFQWeCfVVpuE8yUF 20I3mPDisNUeI7MfwGczoWH7GLwfkdJtfi3y06pY8N1h3SHdLIm+Dbp+ndfUEHymjB ovC+S4CC6RCr99fH8EN1PIufe4wzNWYV0Cyts0d8oTQuo5hr6ilDd8dtEMnqcdXnQV asgYIR3RAy2JRuC7bLILDzeduqSaol+0G7Nx8pD8li6RP7r8CNCN/+BnvkDPEyfPiL wU7G6kH6pbkd3P13CYy30aZfvzVUyCC84/sWB9iYjoqAKAktWmBkmTQN8jVwybuRQK p29hu3lf6/kvg== Date: Thu, 11 Jan 2024 17:31:10 +0000 From: Conor Dooley To: Jason-JH Lin =?utf-8?B?KOael+edv+elpSk=?= Cc: "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , Singo Chang =?utf-8?B?KOW8teiIiOWciyk=?= , "linux-mediatek@lists.infradead.org" , Johnson Wang =?utf-8?B?KOeOi+iBlumRqyk=?= , "linux-media@vger.kernel.org" , "chunkuang.hu@kernel.org" , "devicetree@vger.kernel.org" , Jason-ch Chen =?utf-8?B?KOmZs+W7uuixqik=?= , Shawn Sung =?utf-8?B?KOWui+WtneismSk=?= , Nancy Lin =?utf-8?B?KOael+aso+ieoik=?= , "conor+dt@kernel.org" , Project_Global_Chrome_Upstream_Group , "linux-arm-kernel@lists.infradead.org" , "krzysztof.kozlowski+dt@linaro.org" , "matthias.bgg@gmail.com" , "jassisinghbrar@gmail.com" , "angelogioacchino.delregno@collabora.com" Subject: Re: [PATCH v2 2/4] dt-bindings: mailbox: mediatek: gce-mailbox: Add reference to gce-props.yaml Message-ID: <20240111-anthology-dock-c60d28ac7f1c@spud> References: <20240110063532.14124-1-jason-jh.lin@mediatek.com> <20240110063532.14124-3-jason-jh.lin@mediatek.com> <20240110-grumbling-tattling-0202fc5e21f2@spud> <8c4004d5b6f68dc096aaf2a537e429c310b60c08.camel@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QW5q1ZGC+crOHGMg" Content-Disposition: inline In-Reply-To: <8c4004d5b6f68dc096aaf2a537e429c310b60c08.camel@mediatek.com> --QW5q1ZGC+crOHGMg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 10, 2024 at 04:36:20PM +0000, Jason-JH Lin (=E6=9E=97=E7=9D=BF= =E7=A5=A5) wrote: > Hi Conor, >=20 > Thanks for the reviews. >=20 > On Wed, 2024-01-10 at 10:36 +0000, Conor Dooley wrote: > > On Wed, Jan 10, 2024 at 02:35:30PM +0800, Jason-JH.Lin wrote: > > > 1. Add "Provider" to the title to make it clearer. > > > 2. Add reference to gce-props.yaml for adding mediatek,gce-events > > > property. > >=20 > > I can see this from the diff. There's still no explanation here as to > > why the mailbox provider needs to have a gce-event id. NAK until you > > can > > explain that. > >=20 > Sorry for missing the reason in commit message, I'll add it in the next > version. >=20 > There are 2 reasons why the mailbox provider needs gce-events: > 1. The mailbox provider here is CMDQ mailbox driver. It configures GCE > hardware register by CPU directly. If we want to set the default value > from 0 to 1 for specific gce-events during the initialization of CMDQ > driver. We need to tell CMDQ driver what gce-events need to be set and > I think such GCE hardware setting can get from its device node. Why would someone want to set it to 1 or 0? At what level will that vary? Per SoC? Per board? Something else? > 2. We'll have the secure CMDQ mailbox driver in the future patch [1]. > It will request or reserve a mailbox channel, which is a dedicate GCE > thread, as a secure IRQ handler. This GCE thread executes a looping > instruction set that keeps waiting for the gce-event set from another > GCE thread in the secure world. So we also need to tell the CMDQ driver > what gce-event need to be waited. Ditto here, what level does this vary at? Do different SoCs or different boards/platforms dictate the value? Could this channel be determined from the soc-specific compatible? In other words, please explain in your commit message why this requires a property and is not detectable from any existing mechanism. From reading this I don't know what is preventing the secure mailbox channel =66rom picking a "random" unused channel. Thanks, Conor. > [1] cmdq_sec_irq_notify_start() is where the GCE thread is requested to > prepare a looping instruction set to wait for the gce-event. > -=20 > https://patchwork.kernel.org/project/linux-mediatek/patch/20231222045228.= 27826-9-jason-jh.lin@mediatek.com/ >=20 > Regards, > Jason-JH.Lin >=20 > > Cheers, > > Conor. > >=20 > > >=20 > > > Signed-off-by: Jason-JH.Lin > > > --- > > > .../devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml | 6 > > > ++++-- > > > 1 file changed, 4 insertions(+), 2 deletions(-) > > >=20 > > > diff --git > > > a/Documentation/devicetree/bindings/mailbox/mediatek,gce- > > > mailbox.yaml > > > b/Documentation/devicetree/bindings/mailbox/mediatek,gce- > > > mailbox.yaml > > > index cef9d7601398..728dc93117a6 100644 > > > --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce- > > > mailbox.yaml > > > +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce- > > > mailbox.yaml > > > @@ -4,7 +4,7 @@ > > > $id:=20 > > > http://devicetree.org/schemas/mailbox/mediatek,gce-mailbox.yaml# > > > $schema: http://devicetree.org/meta-schemas/core.yaml# > > > =20 > > > -title: Mediatek Global Command Engine Mailbox > > > +title: MediaTek Global Command Engine Mailbox Provider > > > =20 > > > maintainers: > > > - Houlong Wei > > > @@ -57,6 +57,8 @@ required: > > > - clocks > > > =20 > > > allOf: > > > + - $ref: mediatek,gce-props.yaml > > > + > > > - if: > > > not: > > > properties: > > > @@ -67,7 +69,7 @@ allOf: > > > required: > > > - clock-names > > > =20 > > > -additionalProperties: false > > > +unevaluatedProperties: false > > > =20 > > > examples: > > > - | > > > --=20 > > > 2.18.0 > > >=20 --QW5q1ZGC+crOHGMg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZaAl3gAKCRB4tDGHoIJi 0t/LAQCI0RfsupQbS0ZgyeRCcDU8ETflHOhbgCzGZesvWIxDzwEAmfV2pBcTpwM2 4/y9NkmnC5ZZaHe6S2NooLECB1DA9AA= =Z03v -----END PGP SIGNATURE----- --QW5q1ZGC+crOHGMg--