configure/module_mutex: adapt to kernel 5.12
The module_mutex is internal to the module loader since kernel commit 922f2a7c. Signed-off-by: Gal Hammer <gal.hammer@huawei.com> Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com> Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
committed by
Robert Baldyga
parent
b263dec467
commit
fea5e72d8c
32
configure.d/1_module_mutex.conf
Normal file
32
configure.d/1_module_mutex.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright(c) 2022 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
. $(dirname $3)/conf_framework
|
||||
|
||||
|
||||
check() {
|
||||
cur_name=$(basename $2)
|
||||
config_file_path=$1
|
||||
if compile_module $cur_name "mutex_lock(&module_mutex);" "linux/module.h"
|
||||
then
|
||||
echo $cur_name 1 >> $config_file_path
|
||||
else
|
||||
echo $cur_name 2 >> $config_file_path
|
||||
fi
|
||||
}
|
||||
|
||||
apply() {
|
||||
case "$1" in
|
||||
"1")
|
||||
add_define "MODULE_MUTEX_SUPPORTED 1" ;;
|
||||
"2")
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
esac
|
||||
}
|
||||
|
||||
conf_run $@
|
||||
Reference in New Issue
Block a user