Commit 3a27bbb2 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by jiayingbao
Browse files

platform/x86/intel/vsec: Use mutex for ida_alloc() and ida_free()

mainline inclusion
from mainline-v6.3-rc1
commit 9a90ea7d
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8WOEC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9a90ea7d378486aa358330dafc7e8c3b27de4d84



-------------------------------------

ID alloc and free functions don't have in built protection for parallel
invocation of ida_alloc() and ida_free(). With the current flow in the
vsec driver, there is no such scenario. But add mutex protection for
potential future changes.

Intel-SIG: commit 9a90ea7d platform/x86/intel/vsec: Use mutex for ida_alloc() and ida_free().
Backport Intel_vsec bus update as TPMI driver dependency.

Suggested-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20230207125821.3837799-1-srinivas.pandruvada@linux.intel.com


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
[ Yingbao Jia: amend commit log ]
Signed-off-by: default avatarYingbao Jia <yingbao.jia@intel.com>
parent a863d685
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment