From 16dc39665d27d2bcbc337bb15d95db7295d00bca Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 25 Jun 2025 10:18:55 +0100 Subject: [PATCH] Revert "NVIDIA: SAUCE: WAR: tee: optee: Add timeout in wq_sleep()" This reverts commit db18e862162e778023211f7a54ec265af15f6fd1. Upstream commit 14ca6401d870 ("optee: add timeout value to optee_notif_wait() to support timeout") added a timeout value to optee_notif_wait() and so we can drop this change in favour of the upstream commit. Bug 3978993 Bug 4777800 Change-Id: Ic27dfde895455c91b443aad35d07dbc6d9aef328 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3391710 Reviewed-by: Mark Zhang Reviewed-by: Jason Li (SW-TEGRA) GVS: buildbot_gerritrpt (cherry picked from commit 9fe7ed7ccbbcd06275851f5b8f3bdefedba2e56c) Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3398633 --- drivers/tee/optee/notif.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tee/optee/notif.c b/drivers/tee/optee/notif.c index 74894c517151..05212842b0a5 100644 --- a/drivers/tee/optee/notif.c +++ b/drivers/tee/optee/notif.c @@ -1,21 +1,17 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015-2021, Linaro Limited - * Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include -#include #include #include #include #include "optee_private.h" -#define SLEEP_TIMEOUT (msecs_to_jiffies(100)) - struct notif_entry { struct list_head link; struct completion c; @@ -74,7 +70,7 @@ int optee_notif_wait(struct optee *optee, u_int key) * Unlock temporarily and wait for completion. */ spin_unlock_irqrestore(&optee->notif.lock, flags); - (void)wait_for_completion_timeout(&entry->c, SLEEP_TIMEOUT); + wait_for_completion(&entry->c); spin_lock_irqsave(&optee->notif.lock, flags); list_del(&entry->link);