mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
06bea3dbfe
Lockdep is initialized at compile time now. Get rid of lockdep_init(). Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Krinkin <krinkin.m.u@gmail.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: mm-commits@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
29 lines
575 B
C
29 lines
575 B
C
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
#include <linux/compiler.h>
|
|
#include <linux/lockdep.h>
|
|
#include <unistd.h>
|
|
#include <sys/syscall.h>
|
|
|
|
static __thread struct task_struct current_obj;
|
|
|
|
/* lockdep wants these */
|
|
bool debug_locks = true;
|
|
bool debug_locks_silent;
|
|
|
|
__attribute__((destructor)) static void liblockdep_exit(void)
|
|
{
|
|
debug_check_no_locks_held();
|
|
}
|
|
|
|
struct task_struct *__curr(void)
|
|
{
|
|
if (current_obj.pid == 0) {
|
|
/* Makes lockdep output pretty */
|
|
prctl(PR_GET_NAME, current_obj.comm);
|
|
current_obj.pid = syscall(__NR_gettid);
|
|
}
|
|
|
|
return ¤t_obj;
|
|
}
|