Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp263194lqh; Thu, 30 May 2024 23:56:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWc3yWQ8c3RfM+Ma+s+lPEeGX3orX9pdWDviZk4N8bP8rqB/61Zu38yj4ubaU/Rd1zzqddrFQo5n4Oh0XIuIyWy0JyoHlextoLSoMhODg== X-Google-Smtp-Source: AGHT+IHNA+7aeYiJkJ2Ug05eR4GKaNnA/ElcjihyN5zJlE2nJfrCY1UAwxD5R+C6fvE0wwUEpsWY X-Received: by 2002:a05:6a00:993:b0:6f8:e3ed:d299 with SMTP id d2e1a72fcca58-702478c7054mr1127916b3a.27.1717138589730; Thu, 30 May 2024 23:56:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717138589; cv=pass; d=google.com; s=arc-20160816; b=SoG4HXEX2nm0VFFMPSkH8APjkk35dhGkLmF2K4m+leDsLsWzs/wmBF77wamOpcUswe j5DDmvJiIB8AYDPkZFoYoNPEekafiRLZ8PK91wgzFZ5BoLwmCquzFaenRO32LB0TO0uP AT3KC/xBiL6nhcXegub6/Pq/bwLDtjrHhoBkR/FfBcooQCERiVGoxLPVGcffy7XRUhhp oawYhDCWiJoxxpZziSgggSGIsiedJibuu2+84fMCTPPhFOmPBkv9h2wDhMmungYvOaek 4SlLK1RLWQdsGXMtOkXEepU0yxAkd5USPzOhBTC5XxL5ib/5Y95u5tryJwx/g6cqU8wP 01hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=UmmGEIEiP+RXWcqXsFf6qa0SBKaXKreUvEwc8aJmwc8=; fh=CY4Pcswk5CBG92y83eibPpohhhfRjcKMEvDx0bNzdMc=; b=l4YM66G7d2IoTsbDA7X+6U3z37OJPxcdlDDv1qsOfEFBvlMgX+ZNJTFydqBI98kHGT FQkVAVKpUqcNxdn+tFeUNqMdOGqvyn+5XfQmY8iMxLx+OIYrOjb8P57kUW4t8EhwFZ1d W37phq/VjLGMVtzps+GPArwL/NrXjNuFX4GdnSypTI+Vsdn71g9bm4Wdrk+sIjnIpTJo 4TTrwbZFbZn9Qu8Hd3X6d1qz5CShSh/u9hM2UdIWMV9rWsfe9555JCQVw2LptTN6Ap+R MwB29Kz/Wei0VtfUtbHKRWQ/ORLbP18CFlAuK8Y+N/WOP9djQVb/hFKKizc9hOK1vACv 8q8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ns1sVLA7; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-196374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-702423dcd63si1033055b3a.24.2024.05.30.23.56.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 23:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ns1sVLA7; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-196374-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196374-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 08186B24BBE for ; Fri, 31 May 2024 06:56:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C0F280C0B; Fri, 31 May 2024 06:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ns1sVLA7" Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D63A7FBAE for ; Fri, 31 May 2024 06:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717138573; cv=none; b=RPzF+mj38dCbe0+Btb7NUF10LcwPB+CFlipbQpOpt0bIgTRhjoz3e+V520vidTpiGW3WzDJnrkn8RkaiuYeL6nEIg8GIM4YJ7QkgdUNlT6zGpb2F3EovDcrVmZl+DrYeTOZURJFYqdFpBPMliwTYZxCQ4cA05znU82THrANqI+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717138573; c=relaxed/simple; bh=rDjU5whvSyy64bLjX3EGuXwyqnk2V2gqwwhRXFsUETA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KJOA1nKgePWY4UzLJIBMGgvRfuh01SLB3NaS0amtX7oFmDBezJNrOjxpT2mKItjwV1PgWVqUxKjvNVA7gwEgEFjesOFg20Yh5hAI37heGe9xN/1Ho7tc92k1xCQhqLX45eybwrmdoeLGMdTqClb9ZjeiY+Nuz2mxDBtyQId5oZ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Ns1sVLA7; arc=none smtp.client-ip=209.85.160.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-24c10207d15so825616fac.2 for ; Thu, 30 May 2024 23:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717138570; x=1717743370; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UmmGEIEiP+RXWcqXsFf6qa0SBKaXKreUvEwc8aJmwc8=; b=Ns1sVLA757IUcl5uaoIapMZII//mkRPvI9si+oftZ5cqQhEdRb8KCsMf/icAldqiDr 2TSmL2pUDulhSniM05awV2sjYWePoRfOFk7aFxBt0aGFWH5otyCbXMRJzvl9hltli6h+ OseHAtScgKbhAAmS6NqoR3S9Ok4u9/4ldjK8zgVr0Dp962ZVd6d6GRhHVfYkDKgy8AUR mxfL94Kfr+tQEbhdXjmdVemWlAxCJ2eM7n1Lfjy94X2nhn80pTRCqYUbnAP6U6xeoaud QPCEYBIeomwn3S1jvKA82JOUPBbJs2q9zjHrOcjfW5ejBD7ImuPasYrTtTQAUA57TGGC l1TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717138570; x=1717743370; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UmmGEIEiP+RXWcqXsFf6qa0SBKaXKreUvEwc8aJmwc8=; b=nSw0nBX3YArhM3PSQmsttFr/uPZIlV0OD9x9e9NrkjbfiYCGuz5cPbsBRZVNdqET5U 7MifxdvBsvS/WcKlVIR/1x5chKbmyLB8aYnvnnnXVCeygZxBPjQT9i7d3kjshQaR8RXi Ln9SzZejAEI9RNLaT9T2sGT3SnNK/HlsdZj10lLmmQRfOv5mujXsh2kYvBfVj6hBk6w1 ymn943X8K1cub/kxY2LnzHUPYXO9HLp/GmO+R6U/s2sEMydgyE7zUj6VsnjE2yqhSgBn Twsn5jo+ms6i41dZpgDwPfCWHexC93iI+vymwRZU4eOHjbll6Hr3vZcIXNM8rjf9FTKK lMtw== X-Forwarded-Encrypted: i=1; AJvYcCWVTYNjFpxKkWWvepCy2IOby5SWp9+0Ee7HtypDne/Owt/cCazllb/ijCUURrKbqEoEc7N2sWOfA0MufvGQ1nGEAf1MC8LlJgez4SjU X-Gm-Message-State: AOJu0YzgGe98vD2Kww+m4OI3a93jZOvlKvxV/kNKWtljzDwDG01DZBq9 Oa3jGfQchaILYKaTaY8wIIZ1I6R8e9DOI4CGiMsfqOg+zIFNe1C7U8Svyt0VXQxD9XxXpGHBjur aDj4JjTSLXZiEPkT5vJYxc98T0g/NbeNVu8zKHl+Xe4khG88PP28= X-Received: by 2002:a05:6870:724a:b0:250:8255:e793 with SMTP id 586e51a60fabf-2508b993d50mr1295191fac.23.1717138570065; Thu, 30 May 2024 23:56:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240507020037.14009-1-gavin.liu@mediatek.com> <929512b561536d4ddfaeda518f2ce306b899f3a9.camel@mediatek.com> In-Reply-To: From: Jens Wiklander Date: Fri, 31 May 2024 08:55:58 +0200 Message-ID: Subject: Re: [PATCH v3] optee: add timeout value to optee_notif_wait() to support timeout To: Sumit Garg Cc: =?UTF-8?B?R2F2aW4gTGl1ICjlionlk7Llu7cp?= , "matthias.bgg@gmail.com" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "op-tee@lists.trustedfirmware.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 23, 2024 at 9:35=E2=80=AFAM Sumit Garg = wrote: > > On Tue, 21 May 2024 at 14:16, Gavin Liu (=E5=8A=89=E5=93=B2=E5=BB=B7) wrote: > > > > Hi, Sumit, > > > > The corresponding OPTEE-OS pull request and change is here. > > > > https://github.com/OP-TEE/optee_os/pull/6641 > > As this is an ABI change where I see backwards compatibility is > maintained. However, the forwards compatibility requires this change > to be backported to stable releases. So for the next version please CC > stable ML. > > > > > On Mon, 2024-05-20 at 16:16 +0530, Sumit Garg wrote: > > > > > > External email : Please do not click links or open attachments until > > > you have verified the sender or the content. > > > Hi, > > > > > > On Tue, 7 May 2024 at 07:31, gavin.liu > > > wrote: > > > > > > > > From: Gavin Liu > > > > > > > > Add timeout value to support self waking when timeout to avoid > > > waiting > > > > indefinitely. > > > > > > > > Signed-off-by: Gavin Liu > > > > --- > > > > change in v3: > > > > 1. change the comment in optee_rpc_cmd.h > > > > 2. add macro for "TEE_ERROR_TIMEOUT" > > > > 3. change from "TEEC_ERROR_BUSY" to "TEE_ERROR_TIMEOUT" > > > > --- > > > > drivers/tee/optee/notif.c | 9 +++++++-- > > > > drivers/tee/optee/optee_private.h | 5 ++++- > > > > drivers/tee/optee/optee_rpc_cmd.h | 1 + > > > > drivers/tee/optee/rpc.c | 10 ++++++++-- > > > > 4 files changed, 20 insertions(+), 5 deletions(-) > > > > > > FWIW: > > Reviewed-by: Sumit Garg I'm picking up this. Thanks, Jens