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 <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3391710
Reviewed-by: Mark Zhang <markz@nvidia.com>
Reviewed-by: Jason Li (SW-TEGRA) <jasl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit 9fe7ed7ccbbcd06275851f5b8f3bdefedba2e56c)
Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3398633
This commit is contained in:
Jon Hunter
2025-06-25 10:18:55 +01:00
parent ef4c7b0620
commit 16dc39665d
+1 -5
View File
@@ -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 <linux/arm-smccc.h>
#include <linux/errno.h>
#include <linux/jiffies.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/tee_drv.h>
#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);