aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/lockdep
AgeCommit message (Collapse)AuthorFilesLines
2016-12-11make use of make variable CURDIR instead of calling pwdUwe Kleine-König1-1/+1
make already provides the current working directory in a variable, so make use of it instead of forking a shell. Also replace usage of PWD by CURDIR. PWD is provided by most shells, but not all, so this makes the build system more robust. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2016-03-30tools/lib/lockdep: Fix unsupported 'basename -s' in run_tests.shSedat Dilek1-4/+8
Here on Ubuntu/precise I have GNU/coreutils v8.13 installed where 'basename -s' is not supported. The result is that run_tests.sh is not done properly. How to reproduce: $ cd $BUILD_DIR $ LC_ALL=C make -C tools/ liblockdep $ cd tools/lib/lockdep/ $ LC_ALL=C ./run_tests.sh basename: invalid option -- 's' Try `basename --help' for more information. ... timeout: failed to run command `./tests/': Permission denied FAILED! rm: cannot remove `tests/': Is a directory Due to unsupported basename the tests programs are not generated and cannot be removed. Fix this by doing a compatible basename invocation and check for the existence of generated tests programs. For more details see this LKML thread: http://marc.info/?t=145906667300001&r=1&w=2 Signed-off-by: Sedat Dilek <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> (maintainer:LIBLOCKDEP) Cc: Shuah Khan <[email protected]> Cc: Theodore Ts'o <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: linux-fsdevel <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-02-29tools/lib/lockdep: Fix link creation warningIngo Molnar1-1/+1
This warning triggers if the .so library has already been linked: triton:~/tip/tools/lib/lockdep> make CC common.o CC lockdep.o CC rbtree.o LD liblockdep-in.o LD liblockdep.a ln: failed to create symbolic link ‘liblockdep.so’: File exists LD liblockdep.so.4.5.0-rc6 Overwrite the link. Cc: Alfredo Alvarez Fernandez <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-02-29tools/lib/lockdep: Add tests for AA and ABBA lockingAlfredo Alvarez Fernandez3-4/+63
Add test for AA and 2 threaded ABBA locking. Rename AA.c to ABA.c since it was implementing an ABA instead of a pure AA. Now both cases are covered. The expected output for AA.c is that the process blocks and lockdep reports a deadlock. ABBA_2threads.c differs from ABBA.c in that lockdep keeps separate chains of held locks per task. This can lead to different behaviour regarding lock detection. The expected output for this test is that the process blocks and lockdep reports a circular locking dependency. These tests found a lockdep bug - fixed by the next commit. Signed-off-by: Alfredo Alvarez Fernandez <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/1455864533-7536-3-git-send-email-alfredoalvarezernandez@gmail.com Signed-off-by: Ingo Molnar <[email protected]>
2016-02-29tools/lib/lockdep: Add userspace version of READ_ONCE()Alfredo Alvarez Fernandez1-0/+1
This was added to the kernel code in <1658d35ead5d> ("list: Use READ_ONCE() when testing for empty lists"). There's nothing special we need to do about it in userspace. Signed-off-by: Alfredo Alvarez Fernandez <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/1455864533-7536-2-git-send-email-alfredoalvarezernandez@gmail.com Signed-off-by: Ingo Molnar <[email protected]>
2016-02-29tools/lib/lockdep: Fix the build on recent kernelsIngo Molnar1-0/+6
The following upstream commit: 4a389810bc3c ("kernel/locking/lockdep.c: convert hash tables to hlists") broke the tools/lib/lockdep build. Add trivial RCU wrappers to fix it. These wrappers should probably be moved into their own header file. Cc: Andrew Morton <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Krinkin <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2016-02-09locking/lockdep: Eliminate lockdep_init()Andrey Ryabinin3-8/+0
Lockdep is initialized at compile time now. Get rid of lockdep_init(). Signed-off-by: Andrey Ryabinin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Krinkin <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-01-11tools lockdep: Add *.cmd files clean upJiri Olsa1-1/+1
Add *.cmd files to be removed within clean target. Reported-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Cc: David Ahern <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2015-11-09Merge branch 'liblockdep-fixes' of ↵Ingo Molnar4-2/+7
git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux into locking/urgent Pull liblockdep fixes from Sasha Levin: " ... three fixes for liblockdep. Just keeping up with kernel code changes and new gcc versions." Signed-off-by: Ingo Molnar <[email protected]>
2015-11-06tools/liblockdep: explicitly declare lockdep API we call from liblockdepSasha Levin2-1/+4
It seems that newer gcc complains about lack of explicit declaration for some of the API we use, add it in. Signed-off-by: Sasha Levin <[email protected]>
2015-11-06tools/liblockdep: add userspace versions of WRITE_ONCE and RCU_INIT_POINTERSasha Levin1-0/+2
These were added to the kernel code in cee34d88c ("lockdep: Fix a race between /proc/lock_stat and module unload"). There's nothing special we need to do about them in userspace. Signed-off-by: Sasha Levin <[email protected]>
2015-11-06tools/liblockdep: remove task argument from debug_check_no_locks_heldSasha Levin1-1/+1
The tas argument was removed from the kernel code in 1b1d2fb4 ("lockdep: remove task argument from debug_check_no_locks_held"). Remove it in loblockdep too. Signed-off-by: Sasha Levin <[email protected]>
2015-09-28tools build: Build fixdep helper from perf and basic libsJiri Olsa1-1/+3
Adding the fixdep target into the Makefile.include to ease up building of fixdep helper, that needs to be built before we dive in to the build itself. The user can invoke the fixdep target to build the helper. Signed-off-by: Jiri Olsa <[email protected]> Cc: David Ahern <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2015-09-28tools build: Add Makefile.includeJiri Olsa1-1/+1
To ease up build framework code setup for users. More shared code will be added in the following patches. Signed-off-by: Jiri Olsa <[email protected]> Cc: David Ahern <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2015-08-25tools/liblockdep: Use the rbtree header provided by common tools headersSasha Levin2-2/+1
Recent changes to rbtree.h may break compilation. There is no reason to use a liblockdep specific header to begin with, so we'll use the one shared with all other tools/. Signed-off-by: Sasha Levin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2015-08-25tools/liblockdep: Correct macro for WARNSasha Levin1-1/+1
As Peter Zijlstra pointed out, the varargs for WARN() are optional, so we need to correctly handle the case where they don't exist. This would cause a compilation error. Signed-off-by: Sasha Levin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2015-05-13tools/liblockdep: Fix compilation errorEunbong Song1-0/+3
Recent changes to kernel/locking/lockdep.c broke the liblockdep build. Fix that. Signed-off-by: Eunbong Song <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2015-05-13tools/liblockdep: Fix linker error in case of cross compileEunbong Song1-1/+2
If we try to cross compile liblockdep, even if we set the CROSS_COMPILE variable the linker error can occur because LD is not set with CROSS_COMPILE. This patch adds "LD" can be set automatically with CROSS_COMPILE variable so fixes linker error problem. Signed-off-by: Eunbong Song <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2015-02-26Merge tag 'v4.0-rc1' into perf/core, to refresh the treeIngo Molnar2-1/+2
Signed-off-by: Ingo Molnar <[email protected]>
2015-02-12tools lib lockdep: Use tools build frameworkJiri Olsa2-109/+24
Move the lockdep library building under tools build framework. Signed-off-by: Jiri Olsa <[email protected]> Cc: Alexis Berlemont <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Corey Ashford <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: S. Lockwood-Childs <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2015-01-29tools/liblockdep: don't include host headersBaruch Siach1-1/+1
Adding host headers to include path may cause unexpected surprises when cross compiling. Remove /usr/local/include from the default include path. Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2015-01-29tools/liblockdep: ignore generated .so fileBaruch Siach1-0/+1
Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-12-19tools/liblockdep: Fix debug_check thinko in mutex destroyKirill Smelkov1-2/+2
In mutex destroy code currently we pass to debug_check_no_locks_freed() [mem_from, mem_end) address region. But debug_check_no_locks_freed() accepts mem_from, mem_*len* i.e. second parameter is region length, not end address. And it was always so, starting from 2006 (fbb9ce95 "lockdep: core"). Fix it, or else on a mutex destroy we wrongly check much-wider-than-mutex region and can find not-yet-released other locks there and wrongly report BUGs on them. Signed-off-by: Kirill Smelkov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-07-07tools/liblockdep: Account for bitfield changes in lockdeps lock_acquireS. Lockwood-Childs3-14/+14
Commit fb9edbe984 shortened held_lock->check from a 2-bit field to a 1-bit field. Make liblockdep compatible with the new definition by passing check=1 to lock_acquire() calls, rather than the old value check=2 (which inadvertently disabled checks by overflowing to 0). Without this fix, several of the test cases in liblockdep run_tests.sh were failing. Signed-off-by: S. Lockwood-Childs <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-07-07tools/liblockdep: Remove debug print left over from developmentSasha Levin1-2/+0
Remove a debug print in init_preload() which was left over from development and isn't usefull at all currently. It was also causing false positive test results. Reported-by: S. Lockwood-Childs <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-07-07tools/liblockdep: Fix comparison of a boolean value with a value of 2zhangdianfang1-1/+1
Comparison of a boolean value (!__init_state) with a value of 2 (done) as currently happens in the code is unlikely to succeed and causes repeated initialization of the pthread function pointers. Instead, remove boolean comparison so that we would initialize said function pointers only once. Ref: https://bugzilla.kernel.org/show_bug.cgi?id=76741 Cc: Jean Delvare <[email protected]> Reported-by: David Binderman <[email protected]> Signed-off-by: Dianfang Zhang <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-06-03Merge branch 'perf-core-for-linus' of ↵Linus Torvalds3-66/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next Pull perf updates from Ingo Molnar: "The tooling changes maintained by Jiri Olsa until Arnaldo is on vacation: User visible changes: - Add -F option for specifying output fields (Namhyung Kim) - Propagate exit status of a command line workload for record command (Namhyung Kim) - Use tid for finding thread (Namhyung Kim) - Clarify the output of perf sched map plus small sched command fixes (Dongsheng Yang) - Wire up perf_regs and unwind support for ARM64 (Jean Pihet) - Factor hists statistics counts processing which in turn also fixes several bugs in TUI report command (Namhyung Kim) - Add --percentage option to control absolute/relative percentage output (Namhyung Kim) - Add --list-cmds to 'kmem', 'mem', 'lock' and 'sched', for use by completion scripts (Ramkumar Ramachandra) Development/infrastructure changes and fixes: - Android related fixes for pager and map dso resolving (Michael Lentine) - Add libdw DWARF post unwind support for ARM (Jean Pihet) - Consolidate types.h for ARM and ARM64 (Jean Pihet) - Fix possible null pointer dereference in session.c (Masanari Iida) - Cleanup, remove unused variables in map_switch_event() (Dongsheng Yang) - Remove nr_state_machine_bugs in perf latency (Dongsheng Yang) - Remove usage of trace_sched_wakeup(.success) (Peter Zijlstra) - Cleanups for perf.h header (Jiri Olsa) - Consolidate types.h and export.h within tools (Borislav Petkov) - Move u64_swap union to its single user's header, evsel.h (Borislav Petkov) - Fix for s390 to properly parse tracepoints plus test code (Alexander Yarygin) - Handle EINTR error for readn/writen (Namhyung Kim) - Add a test case for hists filtering (Namhyung Kim) - Share map_groups among threads of the same group (Arnaldo Carvalho de Melo, Jiri Olsa) - Making some code (cpu node map and report parse callchain callback) global to be usable by upcomming changes (Don Zickus) - Fix pmu object compilation error (Jiri Olsa) Kernel side changes: - intrusive uprobes fixes from Oleg Nesterov. Since the interface is admin-only, and the bug only affects user-space ("any probed jmp/call can kill the application"), we queued these fixes via the development tree, as a special exception. - more fuzzer motivated race fixes and related refactoring and robustization. - allow PMU drivers to be built as modules. (No actual module yet, because the x86 Intel uncore module wasn't ready in time for this)" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits) perf tools: Add automatic remapping of Android libraries perf tools: Add cat as fallback pager perf tests: Add a testcase for histogram output sorting perf tests: Factor out print_hists_*() perf tools: Introduce reset_output_field() perf tools: Get rid of obsolete hist_entry__sort_list perf hists: Reset width of output fields with header length perf tools: Skip elided sort entries perf top: Add --fields option to specify output fields perf report/tui: Fix a bug when --fields/sort is given perf tools: Add ->sort() member to struct sort_entry perf report: Add -F option to specify output fields perf tools: Call perf_hpp__init() before setting up GUI browsers perf tools: Consolidate management of default sort orders perf tools: Allow hpp fields to be sort keys perf ui: Get rid of callback from __hpp__fmt() perf tools: Consolidate output field handling to hpp format routines perf tools: Use hpp formats to sort final output perf tools: Support event grouping in hpp ->sort() perf tools: Use hpp formats to sort hist entries ...
2014-05-08tools/liblockdep: Remove all build files when doing make cleanSasha Levin1-1/+1
We forgot to remove the shared library with the version number when 'make clean' ran, fix the clean pattern. Signed-off-by: Sasha Levin <[email protected]>
2014-05-08tools/liblockdep: Build liblockdep from tools/MakefileS. Lockwood-Childs1-2/+1
add targets to build liblockdep with make -C tools liblockdep like the way other stuff under tools/ can be built Signed-off-by: S. Lockwood-Childs <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-05-01tools: Consolidate types.hBorislav Petkov1-58/+0
Combine all definitions into a common tools/include/linux/types.h and kill the wild growth elsewhere. Move DECLARE_BITMAP to its proper bitmap.h header. Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Rusty Russell <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Jiri Olsa <[email protected]>
2014-05-01tools: Unify export.hBorislav Petkov2-8/+1
So tools/ has been growing three, at a different stage of their development export.h headers and so we should unite into one. Add tools/include/ to the include path of virtio and liblockdep to pick the shared header now. Signed-off-by: Borislav Petkov <[email protected]> Acked-by: Rusty Russell <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jiri Olsa <[email protected]>
2014-04-01tools/liblockdep: Add proper versioning to the shared objSasha Levin1-11/+4
Add proper versioning to the shared obj so that distros would be able to ship this lib without having to worry about versioning. Suggested-by: Josh Boyer <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-04-01tools/liblockdep: Ignore asmlinkage and visibleSasha Levin1-0/+3
Commit 63f9a7fde7 "asmlinkage: Make lockdep_sys_exit asmlinkage" has added asmlinkage annotation to lockdep_sys_exit, which broke build of liblockdep. Since we don't need asmlinkage in liblockep, just ignore it. Reported-by: Eunbong Song <[email protected]> Reported-by: Robin Hack <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-02-26tools/liblockdep: Use realpath for srctree and objtreeWang Nan1-2/+2
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 <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Geng Hui <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-02-26tools/liblockdep: Add a stub for new rcu_is_watchingSasha Levin1-0/+5
Stub out rcu_is_watching(), prevents build error with the updated tree. Signed-off-by: Sasha Levin <[email protected]>
2014-02-26tools/liblockdep: Mark runtests.sh as executableSasha Levin1-0/+0
runtests.sh is used to run the sanity tests for liblockdep and should be set +x. Signed-off-by: Sasha Levin <[email protected]>
2014-02-26tools/liblockdep: Add include directory to allow tests to compileIra W. Snyder1-1/+1
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 <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-02-26tools/liblockdep: Fix include of asm/hash.hIra W. Snyder1-0/+6
Commit 71ae8aac ("lib: introduce arch optimized hash library") added an include to <linux/hash.h> 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 <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2014-02-26tools/liblockdep: Fix initialization code pathIra W. Snyder1-1/+1
This makes initialization actually happen. Without it, initialization is always skipped due to an incorrect conditional statement. Signed-off-by: Ira W. Snyder <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
2013-11-27liblockdep: Add the 'lockdep' user-space utilitySasha Levin1-0/+3
This is a simple wrapper to make using liblockdep on existing applications much easier. After running 'make && make install', it becomes quite simple to test things with liblockdep. For example, to try it on perf: lockdep perf No other integration required. Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] [ Changed it to load ./liblockdep.so, so it can be tested in situ. ] Signed-off-by: Ingo Molnar <[email protected]>
2013-11-27liblockdep: Support using LD_PRELOADSasha Levin1-0/+447
This allows lockdep to be used without being compiled in the original program. Usage is quite simple: LD_PRELOAD=/path/to/liblockdep.so /path/to/my/program And magically, you'll have lockdep checking in your program! Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2013-11-27liblockdep: Add pthread_rwlock_t test suiteSasha Levin1-0/+13
A simple test to make sure we handle rwlocks correctly. Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2013-11-27liblockdep: Add public headers for pthread_rwlock_t implementationSasha Levin1-0/+86
Both pthreads and lockdep support dealing with rwlocks, so here's the liblockdep implementation for those. Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2013-11-27liblockdep: Add pthread_mutex_t test suiteSasha Levin10-0/+158
This is a rather simple and basic test suite to test common locking issues. Beyond tests, it also shows how to use the library. Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2013-11-27liblockdep: Add public headers for pthread_mutex_t implementationSasha Levin2-0/+120
These headers provide the same API as their pthread mutex counterparts. The design here is to allow to easily switch to liblockdep lock validation just by adding a "liblockdep_" to pthread_mutex_*() calls, which means that it's easy to integrate liblockdep into existing codebases. Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2013-11-27liblockdep: Wrap kernel/locking/lockdep.c to allow usage from userspaceSasha Levin40-0/+720
kernel/locking/lockdep.c deals with validating locking scenarios for various architectures supported by the kernel. There isn't anything kernel specific going on in lockdep, and when we compare userspace to other architectures that don't have to deal with irqs such as s390, they become all too similar. We wrap kernel/locking/lockdep.c and include/linux/lockdep.h with several headers which allow us to build and use lockdep from userspace. We don't touch the kernel code itself which means that any work done on lockdep in the kernel will automatically benefit userspace lockdep as well! Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>