Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2545517lqb; Tue, 28 May 2024 03:25:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUaqPbD8efy0zkN6lFMrkLX63Bi9yiriqxyx5k9DqUbyCjGtm9hdlcg7B+Mtbbd+T6XOWgCW03/tQ4kpgArN89APubtc3TQqTpOswf0Tw== X-Google-Smtp-Source: AGHT+IHAh7aaERWeRqNFH9fd1ssao+K+x+75WCXifgHc/O+hXxQpdpV+RBLaIw9NU+ReuXgDtBQB X-Received: by 2002:a05:620a:219a:b0:792:beac:88f4 with SMTP id af79cd13be357-794ab08324bmr1335227985a.18.1716891948350; Tue, 28 May 2024 03:25:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716891948; cv=pass; d=google.com; s=arc-20160816; b=Ooagy4TLc+qocgce47GYNlSRh6Vgo8bQnv4Vbq19Lq5NYS/qwHzyunURYnc4v2HBBR 437FGNIjKg9r6SbbjNR0QB5Zv0VZqDAHG/I9dq8oesKSAYCw+9grme+RbOG7MXJQeZ6G RPQjkctmRwuJzc5cebrX/jsUa9nKCMJUcVZwE1RzHSE7ZBzP7xJJ/MuBdib030dY0Y+v 1qyX10Oe0GsuOCwnBBzsw2EQ+nTA2eVtJimYQiR6SW39leEbk/KC+EZ9ahvthtHrtypi yehYPotqX10cNpAPShqZ9zPK80fjQKhXGQrI3zW9fz9l+h21DBVF7p3nUsvy/zcTHyL5 6tuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ss0uTaTdZp3DaN6/DsqZWgLEgceO+pZ6s67L1L6r0xM=; fh=+Oqfc304Xt9+3TQLA0mTwZ9Tl6SyzVeWJEzT/JXjgJM=; b=M9LMSRJO3AIOnAamkmM7LIVvdsUr+hUmY9M/tlCrWq6uk1Lyy9A+raVWl1D9dBjK98 /JgFMsxUnSsPKMpmypYOG+gI0zFTz4V8/N/1bFsGvzD0/v8ezsl2ryuQGFUajk90JhdC d2pYuUeWzZjXVG05ONGwlT3znGXMdN81ID/U5Df+mMFf9ITxd+FRnBcOCs3cPUQ4f+I6 CNbpxkQyLz1nzlxBdPiV3uyd3ekylME/xs3iXsSWJSJ7qMo8r1Z1VTXMp4ydaoto3mpv v+vCfcCFa511jH6+/248h5oCDoub/8iVJ2kJrPX2hHDKU0x4NBniVZT1ElvqKy3rNl2N 9ZaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=s8mN3T2R; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-192111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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-794abd0aae7si984507585a.306.2024.05.28.03.25.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 03:25:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192111-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=@collabora.com header.s=mail header.b=s8mN3T2R; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-192111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 15BCD1C22B9E for ; Tue, 28 May 2024 10:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C7F0616C87A; Tue, 28 May 2024 10:24:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="s8mN3T2R" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 78F5016C857; Tue, 28 May 2024 10:24:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716891895; cv=none; b=jYUXPea/HyJ8vBvxU6ewrf1moRqS9lLjh7IuBQd2uwzt06/JBYc7KAaeMzghd1pRJ9uG333Dg6U94fbjsDcQBN6dtcMAR9C1aTC+KtBeVNBwj5K8yHZwhKde8o8GUh9lrcinAdt++dvAQ0wj78r3Q0s/4RkKta7ist1KwbcRV2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716891895; c=relaxed/simple; bh=3ozJkRbRnqcBMiG82KQYzYUrYBmNg5J09V7+FZcUdyI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UM66ZvF6u/813m65cViO72op4PVHgB3rbFLclZRJnLYpZoQs5FvLrujzXKjQuF3dsUJB11dXzaVdLM1kM6e/LXVEm1U2wZBJV3v+I3ZGo7ZWDWVPF79nICKGKPe1fAlBEDpbBlskZWX8koIeNLEoytcGBjH0BD3zchXTOESeI2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=s8mN3T2R; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1716891891; bh=3ozJkRbRnqcBMiG82KQYzYUrYBmNg5J09V7+FZcUdyI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=s8mN3T2RTRaFj0NmkozsR2LG+4RPMKanCLADbo180l85bH6IVkqVCCiswIW65g6Ui rSi7D36NVMhui/P3AyoWRH3maXdhhxQ4y+cDCGswrkBk4dlXEO1jEEKile8xcG9ry/ qh8vmsrNhzBusjCZwZPY9zZz7B3EXjr0hWm+vgJcE6k5aGXCIqVle0kvM3wDDLBMlJ lIa4pro8b1wvBw/Y919SkmeM12EsmrRGCvkl8xLVWpcciu7DXj0CobA2khLLQzNB4p 700lTsL5iRaQX1dyzbhswDTid3cYyAKMsjTpOw9xZZb91ZR7riyilJ/Vgl6z2Q0eps 4fX8t5IxwM4TQ== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id A61BE3782160; Tue, 28 May 2024 10:24:50 +0000 (UTC) Message-ID: Date: Tue, 28 May 2024 12:24:50 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 2/8] dt-bindings: mailbox: Add property for CMDQ secure driver To: "Jason-JH.Lin" , Jassi Brar , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Chun-Kuang Hu Cc: 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 References: <20240525230810.24623-1-jason-jh.lin@mediatek.com> <20240525230810.24623-3-jason-jh.lin@mediatek.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20240525230810.24623-3-jason-jh.lin@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 26/05/24 01:08, Jason-JH.Lin ha scritto: > 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. > > 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. > So we define an event ID that will be set when GCE runs to the end of > secure cmdq packet in the secure world. > > 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. > Hello Jason, Is this looping thread SoC specific, board specific or firmware specific? Thanks, Angelo > 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(-) > > diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml > 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 > > + mboxes: > + items: > + - description: GCE looping thread as a secure IRQ handler > + > required: > - compatible > - "#mbox-cells" > @@ -57,6 +61,8 @@ required: > - clocks > > allOf: > + - $ref: /schemas/mailbox/mediatek,gce-props.yaml# > + > - if: > not: > properties: > @@ -67,7 +73,7 @@ allOf: > required: > - clock-names > > -additionalProperties: false > +unevaluatedProperties: false > > examples: > - |