diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-05-27 08:40:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-27 08:40:10 -0400 |
commit | d563a6bb3d107bf62ec7cd852a142d7e93f0db79 (patch) | |
tree | 9902cb7c599126341a8fb32e572305c04fffb9c8 /tools | |
parent | 1fcb61c52bbdbbc46d132acf7dab9ad0eca433fe (diff) | |
parent | ba155e2d21f6bf05de86a78dbe5bfd8757604a65 (diff) |
Merge tag 'v4.1-rc5' into x86/mm, to refresh the tree before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/lockdep/Makefile | 3 | ||||
-rw-r--r-- | tools/lib/lockdep/uinclude/linux/kernel.h | 3 | ||||
-rw-r--r-- | tools/perf/Makefile | 2 | ||||
-rw-r--r-- | tools/testing/selftests/x86/Makefile | 53 | ||||
-rwxr-xr-x | tools/testing/selftests/x86/check_cc.sh | 16 | ||||
-rw-r--r-- | tools/testing/selftests/x86/run_x86_tests.sh | 13 | ||||
-rw-r--r-- | tools/testing/selftests/x86/trivial_32bit_program.c | 4 | ||||
-rw-r--r-- | tools/testing/selftests/x86/trivial_64bit_program.c | 18 | ||||
-rw-r--r-- | tools/thermal/tmon/Makefile | 8 | ||||
-rw-r--r-- | tools/vm/Makefile | 2 |
10 files changed, 76 insertions, 46 deletions
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile index 0c356fb65022..18ffccf00426 100644 --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile | |||
@@ -14,9 +14,10 @@ define allow-override | |||
14 | $(eval $(1) = $(2))) | 14 | $(eval $(1) = $(2))) |
15 | endef | 15 | endef |
16 | 16 | ||
17 | # Allow setting CC and AR, or setting CROSS_COMPILE as a prefix. | 17 | # Allow setting CC and AR and LD, or setting CROSS_COMPILE as a prefix. |
18 | $(call allow-override,CC,$(CROSS_COMPILE)gcc) | 18 | $(call allow-override,CC,$(CROSS_COMPILE)gcc) |
19 | $(call allow-override,AR,$(CROSS_COMPILE)ar) | 19 | $(call allow-override,AR,$(CROSS_COMPILE)ar) |
20 | $(call allow-override,LD,$(CROSS_COMPILE)ld) | ||
20 | 21 | ||
21 | INSTALL = install | 22 | INSTALL = install |
22 | 23 | ||
diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h index a11e3c357be7..cd2cc59a5da7 100644 --- a/tools/lib/lockdep/uinclude/linux/kernel.h +++ b/tools/lib/lockdep/uinclude/linux/kernel.h | |||
@@ -28,6 +28,9 @@ | |||
28 | #define __init | 28 | #define __init |
29 | #define noinline | 29 | #define noinline |
30 | #define list_add_tail_rcu list_add_tail | 30 | #define list_add_tail_rcu list_add_tail |
31 | #define list_for_each_entry_rcu list_for_each_entry | ||
32 | #define barrier() | ||
33 | #define synchronize_sched() | ||
31 | 34 | ||
32 | #ifndef CALLER_ADDR0 | 35 | #ifndef CALLER_ADDR0 |
33 | #define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) | 36 | #define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index c699dc35eef9..d31a7bbd7cee 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -24,7 +24,7 @@ unexport MAKEFLAGS | |||
24 | # (To override it, run 'make JOBS=1' and similar.) | 24 | # (To override it, run 'make JOBS=1' and similar.) |
25 | # | 25 | # |
26 | ifeq ($(JOBS),) | 26 | ifeq ($(JOBS),) |
27 | JOBS := $(shell egrep -c '^processor|^CPU' /proc/cpuinfo 2>/dev/null) | 27 | JOBS := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null) |
28 | ifeq ($(JOBS),0) | 28 | ifeq ($(JOBS),0) |
29 | JOBS := 1 | 29 | JOBS := 1 |
30 | endif | 30 | endif |
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index ddf63569df5a..5bdb781163d1 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile | |||
@@ -1,4 +1,8 @@ | |||
1 | .PHONY: all all_32 all_64 check_build32 clean run_tests | 1 | all: |
2 | |||
3 | include ../lib.mk | ||
4 | |||
5 | .PHONY: all all_32 all_64 warn_32bit_failure clean | ||
2 | 6 | ||
3 | TARGETS_C_BOTHBITS := sigreturn single_step_syscall | 7 | TARGETS_C_BOTHBITS := sigreturn single_step_syscall |
4 | 8 | ||
@@ -7,42 +11,47 @@ BINARIES_64 := $(TARGETS_C_BOTHBITS:%=%_64) | |||
7 | 11 | ||
8 | CFLAGS := -O2 -g -std=gnu99 -pthread -Wall | 12 | CFLAGS := -O2 -g -std=gnu99 -pthread -Wall |
9 | 13 | ||
10 | UNAME_P := $(shell uname -p) | 14 | UNAME_M := $(shell uname -m) |
15 | CAN_BUILD_I386 := $(shell ./check_cc.sh $(CC) trivial_32bit_program.c -m32) | ||
16 | CAN_BUILD_X86_64 := $(shell ./check_cc.sh $(CC) trivial_64bit_program.c) | ||
11 | 17 | ||
12 | # Always build 32-bit tests | 18 | ifeq ($(CAN_BUILD_I386),1) |
13 | all: all_32 | 19 | all: all_32 |
20 | TEST_PROGS += $(BINARIES_32) | ||
21 | endif | ||
14 | 22 | ||
15 | # If we're on a 64-bit host, build 64-bit tests as well | 23 | ifeq ($(CAN_BUILD_X86_64),1) |
16 | ifeq ($(shell uname -p),x86_64) | ||
17 | all: all_64 | 24 | all: all_64 |
25 | TEST_PROGS += $(BINARIES_64) | ||
18 | endif | 26 | endif |
19 | 27 | ||
20 | all_32: check_build32 $(BINARIES_32) | 28 | all_32: $(BINARIES_32) |
21 | 29 | ||
22 | all_64: $(BINARIES_64) | 30 | all_64: $(BINARIES_64) |
23 | 31 | ||
24 | clean: | 32 | clean: |
25 | $(RM) $(BINARIES_32) $(BINARIES_64) | 33 | $(RM) $(BINARIES_32) $(BINARIES_64) |
26 | 34 | ||
27 | run_tests: | ||
28 | ./run_x86_tests.sh | ||
29 | |||
30 | $(TARGETS_C_BOTHBITS:%=%_32): %_32: %.c | 35 | $(TARGETS_C_BOTHBITS:%=%_32): %_32: %.c |
31 | $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl | 36 | $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl |
32 | 37 | ||
33 | $(TARGETS_C_BOTHBITS:%=%_64): %_64: %.c | 38 | $(TARGETS_C_BOTHBITS:%=%_64): %_64: %.c |
34 | $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl | 39 | $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl |
35 | 40 | ||
36 | check_build32: | 41 | # x86_64 users should be encouraged to install 32-bit libraries |
37 | @if ! $(CC) -m32 -o /dev/null trivial_32bit_program.c; then \ | 42 | ifeq ($(CAN_BUILD_I386)$(CAN_BUILD_X86_64),01) |
38 | echo "Warning: you seem to have a broken 32-bit build" 2>&1; \ | 43 | all: warn_32bit_failure |
39 | echo "environment. If you are using a Debian-like"; \ | 44 | |
40 | echo " distribution, try:"; \ | 45 | warn_32bit_failure: |
41 | echo ""; \ | 46 | @echo "Warning: you seem to have a broken 32-bit build" 2>&1; \ |
42 | echo " apt-get install gcc-multilib libc6-i386 libc6-dev-i386"; \ | 47 | echo "environment. This will reduce test coverage of 64-bit" 2>&1; \ |
43 | echo ""; \ | 48 | echo "kernels. If you are using a Debian-like distribution," 2>&1; \ |
44 | echo "If you are using a Fedora-like distribution, try:"; \ | 49 | echo "try:"; 2>&1; \ |
45 | echo ""; \ | 50 | echo ""; \ |
46 | echo " yum install glibc-devel.*i686"; \ | 51 | echo " apt-get install gcc-multilib libc6-i386 libc6-dev-i386"; \ |
47 | exit 1; \ | 52 | echo ""; \ |
48 | fi | 53 | echo "If you are using a Fedora-like distribution, try:"; \ |
54 | echo ""; \ | ||
55 | echo " yum install glibc-devel.*i686"; \ | ||
56 | exit 0; | ||
57 | endif | ||
diff --git a/tools/testing/selftests/x86/check_cc.sh b/tools/testing/selftests/x86/check_cc.sh new file mode 100755 index 000000000000..172d3293fb7b --- /dev/null +++ b/tools/testing/selftests/x86/check_cc.sh | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | # check_cc.sh - Helper to test userspace compilation support | ||
3 | # Copyright (c) 2015 Andrew Lutomirski | ||
4 | # GPL v2 | ||
5 | |||
6 | CC="$1" | ||
7 | TESTPROG="$2" | ||
8 | shift 2 | ||
9 | |||
10 | if "$CC" -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then | ||
11 | echo 1 | ||
12 | else | ||
13 | echo 0 | ||
14 | fi | ||
15 | |||
16 | exit 0 | ||
diff --git a/tools/testing/selftests/x86/run_x86_tests.sh b/tools/testing/selftests/x86/run_x86_tests.sh deleted file mode 100644 index 3fc19b376812..000000000000 --- a/tools/testing/selftests/x86/run_x86_tests.sh +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # This is deliberately minimal. IMO kselftests should provide a standard | ||
4 | # script here. | ||
5 | ./sigreturn_32 || exit 1 | ||
6 | ./single_step_syscall_32 || exit 1 | ||
7 | |||
8 | if [[ "$uname -p" -eq "x86_64" ]]; then | ||
9 | ./sigreturn_64 || exit 1 | ||
10 | ./single_step_syscall_64 || exit 1 | ||
11 | fi | ||
12 | |||
13 | exit 0 | ||
diff --git a/tools/testing/selftests/x86/trivial_32bit_program.c b/tools/testing/selftests/x86/trivial_32bit_program.c index 2e231beb0a39..fabdf0f51621 100644 --- a/tools/testing/selftests/x86/trivial_32bit_program.c +++ b/tools/testing/selftests/x86/trivial_32bit_program.c | |||
@@ -4,6 +4,10 @@ | |||
4 | * GPL v2 | 4 | * GPL v2 |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef __i386__ | ||
8 | # error wrong architecture | ||
9 | #endif | ||
10 | |||
7 | #include <stdio.h> | 11 | #include <stdio.h> |
8 | 12 | ||
9 | int main() | 13 | int main() |
diff --git a/tools/testing/selftests/x86/trivial_64bit_program.c b/tools/testing/selftests/x86/trivial_64bit_program.c new file mode 100644 index 000000000000..b994946c40fb --- /dev/null +++ b/tools/testing/selftests/x86/trivial_64bit_program.c | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Trivial program to check that we have a valid 32-bit build environment. | ||
3 | * Copyright (c) 2015 Andy Lutomirski | ||
4 | * GPL v2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __x86_64__ | ||
8 | # error wrong architecture | ||
9 | #endif | ||
10 | |||
11 | #include <stdio.h> | ||
12 | |||
13 | int main() | ||
14 | { | ||
15 | printf("\n"); | ||
16 | |||
17 | return 0; | ||
18 | } | ||
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile index 0788621c8d76..2e83dd3655a2 100644 --- a/tools/thermal/tmon/Makefile +++ b/tools/thermal/tmon/Makefile | |||
@@ -12,10 +12,6 @@ TARGET=tmon | |||
12 | INSTALL_PROGRAM=install -m 755 -p | 12 | INSTALL_PROGRAM=install -m 755 -p |
13 | DEL_FILE=rm -f | 13 | DEL_FILE=rm -f |
14 | 14 | ||
15 | INSTALL_CONFIGFILE=install -m 644 -p | ||
16 | CONFIG_FILE= | ||
17 | CONFIG_PATH= | ||
18 | |||
19 | # Static builds might require -ltinfo, for instance | 15 | # Static builds might require -ltinfo, for instance |
20 | ifneq ($(findstring -static, $(LDFLAGS)),) | 16 | ifneq ($(findstring -static, $(LDFLAGS)),) |
21 | STATIC := --static | 17 | STATIC := --static |
@@ -38,13 +34,9 @@ valgrind: tmon | |||
38 | install: | 34 | install: |
39 | - mkdir -p $(INSTALL_ROOT)/$(BINDIR) | 35 | - mkdir -p $(INSTALL_ROOT)/$(BINDIR) |
40 | - $(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" | 36 | - $(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" |
41 | - mkdir -p $(INSTALL_ROOT)/$(CONFIG_PATH) | ||
42 | - $(INSTALL_CONFIGFILE) "$(CONFIG_FILE)" "$(INSTALL_ROOT)/$(CONFIG_PATH)" | ||
43 | 37 | ||
44 | uninstall: | 38 | uninstall: |
45 | $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" | 39 | $(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" |
46 | $(CONFIG_FILE) "$(CONFIG_PATH)" | ||
47 | |||
48 | 40 | ||
49 | clean: | 41 | clean: |
50 | find . -name "*.o" | xargs $(DEL_FILE) | 42 | find . -name "*.o" | xargs $(DEL_FILE) |
diff --git a/tools/vm/Makefile b/tools/vm/Makefile index ac884b65a072..93aadaf7ff63 100644 --- a/tools/vm/Makefile +++ b/tools/vm/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | TARGETS=page-types slabinfo page_owner_sort | 3 | TARGETS=page-types slabinfo page_owner_sort |
4 | 4 | ||
5 | LIB_DIR = ../lib/api | 5 | LIB_DIR = ../lib/api |
6 | LIBS = $(LIB_DIR)/libapikfs.a | 6 | LIBS = $(LIB_DIR)/libapi.a |
7 | 7 | ||
8 | CC = $(CROSS_COMPILE)gcc | 8 | CC = $(CROSS_COMPILE)gcc |
9 | CFLAGS = -Wall -Wextra -I../lib/ | 9 | CFLAGS = -Wall -Wextra -I../lib/ |