Skip to content

Commit 148b59c

Browse files
committed
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull liblockdep fixes from Ingo Molnar: "A handful of build fixes for liblockdep" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/liblockdep: Use realpath for srctree and objtree tools/liblockdep: Add a stub for new rcu_is_watching tools/liblockdep: Mark runtests.sh as executable tools/liblockdep: Add include directory to allow tests to compile tools/liblockdep: Fix include of asm/hash.h tools/liblockdep: Fix initialization code path
2 parents 7abd42e + 9b158f5 commit 148b59c

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

tools/lib/lockdep/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ endif # BUILD_SRC
8787
# We process the rest of the Makefile if this is the final invocation of make
8888
ifeq ($(skip-makefile),)
8989

90-
srctree := $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR))
91-
objtree := $(CURDIR)
90+
srctree := $(realpath $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR)))
91+
objtree := $(realpath $(CURDIR))
9292
src := $(srctree)
9393
obj := $(objtree)
9494

@@ -112,7 +112,7 @@ export Q VERBOSE
112112

113113
LIBLOCKDEP_VERSION = $(LL_VERSION).$(LL_PATCHLEVEL).$(LL_EXTRAVERSION)
114114

115-
INCLUDES = -I. -I/usr/local/include -I./uinclude $(CONFIG_INCLUDES)
115+
INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES)
116116

117117
# Set compile option CFLAGS if not set elsewhere
118118
CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g

tools/lib/lockdep/preload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ int pthread_rwlock_unlock(pthread_rwlock_t *rwlock)
418418

419419
__attribute__((constructor)) static void init_preload(void)
420420
{
421-
if (__init_state != done)
421+
if (__init_state == done)
422422
return;
423423

424424
#ifndef __GLIBC__

tools/lib/lockdep/run_tests.sh

100644100755
File mode changed.

tools/lib/lockdep/uinclude/asm/hash.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef __ASM_GENERIC_HASH_H
2+
#define __ASM_GENERIC_HASH_H
3+
4+
/* Stub */
5+
6+
#endif /* __ASM_GENERIC_HASH_H */

tools/lib/lockdep/uinclude/linux/rcu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@ static inline int rcu_is_cpu_idle(void)
1313
return 1;
1414
}
1515

16+
static inline bool rcu_is_watching(void)
17+
{
18+
return false;
19+
}
20+
1621
#endif

0 commit comments

Comments
 (0)