Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2189272lqb; Mon, 27 May 2024 10:36:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX85tkSBpuoW2sgnfFn0Zfkikewds9VxFzoZjbOhbz1UMI242z/Jvoxf+SjxRliqQw252wyP6TOOG1cxbVNsHwt1tg86RrjpvmvhlM6rQ== X-Google-Smtp-Source: AGHT+IGDbAJIZTbYUvbT1xlX9nS38mrqZb5Z2dre6OSu08TL3fE9xisWCPztUXMMejAIXvh7PMGh X-Received: by 2002:a05:6102:2383:b0:48a:382d:3c1b with SMTP id ada2fe7eead31-48a3854761fmr7165375137.13.1716831405742; Mon, 27 May 2024 10:36:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716831405; cv=pass; d=google.com; s=arc-20160816; b=TBflBeyMsfHbYbvzhm2Msgy4EhxiiMQ+4G3NY8mAc4OhFr4q1Vc2pdKuwg0FozXHDX rEZCwwZ5dcXfaQdt48qEnnibKs/JRwSpC039Wr7xNGsrrbj2i9YQkQugL2s3j6H9prox gX5iJbwTysiOxpubO0UlCNrJugyzPoqKDivu0XZSov2otnkSyNXn8q5wb4RlQFfk9jpn 59+yctncaf6BBeaa1HmL0aXsx1kb1JcHz3cgMOY1agUxVN/lScFVV/fwjIb/66PkZLmv 2BCV8SCWO3Cewh2QOiyFUJMmA6D2T7Xl6Vh4avlTAM3VZ9A4Rn4Vux0ARPMSkXUqC2Js NClw== ARC-Message-Signature: i=2; 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=iDkdkxzJ9auxG+/FKRL7xr2TfsBW506+9aGLABAn4NQ=; fh=cEXE9ppLbun3NYNnmo5MHGI/OlKdHpnDJ47vR6Gvf4I=; b=v3eANhcc6huc4GhQgywM/EEtHhZ70nnYLYy6hLWqJx0Jkr4StujD4TE82jY5t5/6JZ iNiBvQohyVly4KdDXUVzDZRLP/3Z5F5w2kcdHvVukRwHbiGAFZ0O4bkplx8Gx/ndZ5mt IIQcHem2b+F/9d/AS5HyuBDoLZtQKBLkYnbAdBtxLrbheUtvthnOMHC2W3lrNOCaip4o nOB0kCco9iq7hJrHZwjrLwkHhzxpXDxY7CzPzl73pCObXan3cfTm2UDIvigMLG3MbnIn Btw2yyxh2o+wcJBiG+K93X0YTJm3U1Ex8cRY0zJy88wuLvNA1Pjz4betc57v3mOlU2rs BmUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zye5Y2M6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191295-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191295-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd3d38dsi937450485a.441.2024.05.27.10.36.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191295-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zye5Y2M6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191295-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191295-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0E5511C21CF8 for ; Mon, 27 May 2024 17:36:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65BA515EFD8; Mon, 27 May 2024 17:36:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zye5Y2M6" 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 82A65155CA7; Mon, 27 May 2024 17:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716831396; cv=none; b=brk9GU7njMqS/ewnsMM6F4wpnjiaa9y+Cg1mz+WMpAD/cbrI0rv8XJyGuujSxjGLlOkdnAQwpI/IOtndYJhvwM7pPXAcdp6usBgsB4mmqxuwlxNJVioddf8xkG8oM67RAKRv3cCJ20Xk38l50qIvLE4n17gVvse2hv2Nt8OawGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716831396; c=relaxed/simple; bh=9azP1CoqBgVzc1Ap21svaHMHj3h571dn+Ed1pu/oZnU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aYHidXGuyuZWREnIDnL9codf0XWE0sbFgQ5w2ioHXynLgYFt/swTLI1vPc2uVN7f0qTg9E5ph8EONYwlio26QXI53vKJDQalIR5dIO8VZlvRCCeH2w4ukMDpFPoSaDX8FthNfsPiS8rsEyb06zH4JphtyyKTZUdgJfhN0J6MN8E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Zye5Y2M6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1853C2BBFC; Mon, 27 May 2024 17:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716831396; bh=9azP1CoqBgVzc1Ap21svaHMHj3h571dn+Ed1pu/oZnU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Zye5Y2M6ZcwVdvsk5HTNp16+CzXgCstjS1xb9IxfH4+tcOhW0sR7W9u0/bCC4mRr+ yh8xka7Oj//VwikLVjQ/a1J4ULjGTAZR9BTXzaaC9Me/U9cttPvRwq7JjYeYOfPFgM wTD2X1BPGVI+HcaQPOyatPyo7ZOBJGU3RCDci8lR7XNQNGJHNWl01ouq3JAhpN+9le Q5n83MV6Wji9XSwh+MP/R4TGaf8fKV4ZgmQNI+Bmw6J1/8UwKih+cIF2qDRgHmiuwT BPIdf5HQfXTu7gZbMcD9YJVjWtMlb0TD7JiU+9nG/dX2WpeqV9d8iRMiYwWzGH7DVH +Ou4bN2/Bejtg== Date: Mon, 27 May 2024 18:36:30 +0100 From: Conor Dooley To: "Jason-JH.Lin" Cc: Jassi Brar , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Chun-Kuang Hu , AngeloGioacchino Del Regno , Conor Dooley , Jason-ch Chen , Singo Chang , Nancy Lin , Shawn Sung , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH RESEND,v6 2/8] dt-bindings: mailbox: Add property for CMDQ secure driver Message-ID: <20240527-bullion-slapping-d35fcddb56d5@spud> References: <20240526144443.14345-1-jason-jh.lin@mediatek.com> <20240526144443.14345-3-jason-jh.lin@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="gfL6Eu9ihKM1A1EB" Content-Disposition: inline In-Reply-To: <20240526144443.14345-3-jason-jh.lin@mediatek.com> --gfL6Eu9ihKM1A1EB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 26, 2024 at 10:44:37PM +0800, Jason-JH.Lin wrote: > 1. Add mboxes property to define a GCE loopping thread as a secure IRQ > handler. > The CMDQ secure driver requests a mbox channel and sends a looping > command to the GCE thread. The looping command will wait for a secure > packet done event signal from secure world and then jump back to the > first instuction. Each time it waits for an event, it notifies the > CMDQ driver to perform the same action as the IRQ handler. >=20 > 2. Add gce-events property from gce-props.yaml to define a > secure packet done signal in secure world. > There are 1024 events IDs for GCE to use to execute instructions in > the specific event happened. These events could be signaled by HW or SW > and their value would be different in different SoC because of HW event > IDs distribution range from 0 to 1023. > If we set a static event ID: 855 for mt8188, it might be conflict the > event ID original set in mt8195. Two different SoCs, two different compatibles, no problem. I'm almost certain you previously told me that the firmware changing could result in a different event ID, but I see no mention of that here. The commit messages makes it seem like this can be determined by the compatible, so either give me a commit message that explains why the compatible is not sufficient or drop the patch. > So we define an event ID that will be set when GCE runs to the end of > secure cmdq packet in the secure world. >=20 > This can reduce the latency of software communication between normal > world and secure world. In addition, we can also remove the complex > logic after the secure packet done in the secure world. >=20 > Signed-off-by: Jason-JH.Lin > Signed-off-by: Hsiao Chien Sung > --- > .../devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailb= ox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.ya= ml > index cef9d7601398..6e5e848d61d9 100644 > --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml > +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml > @@ -49,6 +49,10 @@ properties: > items: > - const: gce > =20 > + mboxes: > + items: > + - description: GCE looping thread as a secure IRQ handler Why is this needed? It's going to be a reference to itself, right? Why can't you just reserve a channel in the driver? Thanks, Conor. > + > required: > - compatible > - "#mbox-cells" > @@ -57,6 +61,8 @@ required: > - clocks > =20 > allOf: > + - $ref: /schemas/mailbox/mediatek,gce-props.yaml# > + > - if: > not: > properties: > @@ -67,7 +73,7 @@ allOf: > required: > - clock-names > =20 > -additionalProperties: false > +unevaluatedProperties: false > =20 > examples: > - | > --=20 > 2.18.0 >=20 --gfL6Eu9ihKM1A1EB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZlTEngAKCRB4tDGHoIJi 0to1AQDxMdlkCNTKNL4Cai++qtW6p5V+CLhlWwb1OMH0cnYOqgEArzOexHmWlxUE 80S67d+XuFdcAciAe/PNG2Dd7EsXdwA= =ITK7 -----END PGP SIGNATURE----- --gfL6Eu9ihKM1A1EB--