From 367d896dafe1b5f49bee75d3a419b9eb9936ae26 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Fri, 31 Jan 2014 15:30:54 -0800 Subject: tools/liblockdep: Fix initialization code path This makes initialization actually happen. Without it, initialization is always skipped due to an incorrect conditional statement. Signed-off-by: Ira W. Snyder Signed-off-by: Sasha Levin --- tools/lib/lockdep/preload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c index f8465a811aa5..23bd69cb5ade 100644 --- a/tools/lib/lockdep/preload.c +++ b/tools/lib/lockdep/preload.c @@ -418,7 +418,7 @@ int pthread_rwlock_unlock(pthread_rwlock_t *rwlock) __attribute__((constructor)) static void init_preload(void) { - if (__init_state != done) + if (__init_state == done) return; #ifndef __GLIBC__ -- cgit v1.2.3 From 75759827bbe78e53330de2c5e061ecec7fa6f86e Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Fri, 31 Jan 2014 13:35:31 -0800 Subject: tools/liblockdep: Fix include of asm/hash.h Commit 71ae8aac ("lib: introduce arch optimized hash library") added an include to for setting up an architecture specific fast hash. This patch mirrors the fix used for perf, titled "tools: perf: util: fix include for non x86 architectures". Signed-off-by: Ira W. Snyder Signed-off-by: Sasha Levin --- tools/lib/lockdep/uinclude/asm/hash.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tools/lib/lockdep/uinclude/asm/hash.h diff --git a/tools/lib/lockdep/uinclude/asm/hash.h b/tools/lib/lockdep/uinclude/asm/hash.h new file mode 100644 index 000000000000..d82b170bb216 --- /dev/null +++ b/tools/lib/lockdep/uinclude/asm/hash.h @@ -0,0 +1,6 @@ +#ifndef __ASM_GENERIC_HASH_H +#define __ASM_GENERIC_HASH_H + +/* Stub */ + +#endif /* __ASM_GENERIC_HASH_H */ -- cgit v1.2.3 From aef5976fc52a497ac8161f54164c786c771d3ae8 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Fri, 31 Jan 2014 13:35:32 -0800 Subject: tools/liblockdep: Add include directory to allow tests to compile All of the programs in the tests directory require the liblockdep/mutex.h header in order to compile. Add the include directory to the compiler options so that the tests can be built with the provided Makefile. Signed-off-by: Ira W. Snyder Signed-off-by: Sasha Levin --- tools/lib/lockdep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile index da8b7aa3d351..e8dd7497f57a 100644 --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile @@ -112,7 +112,7 @@ export Q VERBOSE LIBLOCKDEP_VERSION = $(LL_VERSION).$(LL_PATCHLEVEL).$(LL_EXTRAVERSION) -INCLUDES = -I. -I/usr/local/include -I./uinclude $(CONFIG_INCLUDES) +INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES) # Set compile option CFLAGS if not set elsewhere CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g -- cgit v1.2.3 From 1ddc1ffa2f8219e0c55c7f800048533e1ce8dee5 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Wed, 5 Feb 2014 17:53:13 -0500 Subject: tools/liblockdep: Mark runtests.sh as executable runtests.sh is used to run the sanity tests for liblockdep and should be set +x. Signed-off-by: Sasha Levin --- tools/lib/lockdep/run_tests.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/lib/lockdep/run_tests.sh diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From 9e3513b7af9ef3b6225f539181c2d94328bd18f7 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Wed, 5 Feb 2014 17:58:37 -0500 Subject: tools/liblockdep: Add a stub for new rcu_is_watching Stub out rcu_is_watching(), prevents build error with the updated tree. Signed-off-by: Sasha Levin --- tools/lib/lockdep/uinclude/linux/rcu.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/lib/lockdep/uinclude/linux/rcu.h b/tools/lib/lockdep/uinclude/linux/rcu.h index 4c99fcb5da27..042ee8e463c9 100644 --- a/tools/lib/lockdep/uinclude/linux/rcu.h +++ b/tools/lib/lockdep/uinclude/linux/rcu.h @@ -13,4 +13,9 @@ static inline int rcu_is_cpu_idle(void) return 1; } +static inline bool rcu_is_watching(void) +{ + return false; +} + #endif -- cgit v1.2.3 From 7b8853419d3344b06cff64b4dc926805698eeba5 Mon Sep 17 00:00:00 2001 From: Wang Nan Date: Sat, 8 Feb 2014 09:43:40 +0800 Subject: tools/liblockdep: Use realpath for srctree and objtree If BUILD_SRC or CURDIR contains tailing '/', the file names passed to gcc will contain '//'. It will be contained .o's in debuginfo, then confuse debugedit: https://bugzilla.redhat.com/show_bug.cgi?id=304121 This patch uses realpath command to makesure potential tailing '/'s are removed. Signed-off-by: Wang Nan Cc: Ingo Molnar Cc: Andrew Morton Cc: Geng Hui Signed-off-by: Sasha Levin --- tools/lib/lockdep/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile index e8dd7497f57a..07b0b7542511 100644 --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile @@ -87,8 +87,8 @@ endif # BUILD_SRC # We process the rest of the Makefile if this is the final invocation of make ifeq ($(skip-makefile),) -srctree := $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR)) -objtree := $(CURDIR) +srctree := $(realpath $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR))) +objtree := $(realpath $(CURDIR)) src := $(srctree) obj := $(objtree) -- cgit v1.2.3