diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-04-02 05:44:51 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-04-02 05:44:51 -0400 |
commit | ea019fdf1a2aa4134ce90801f7b36680d0fbd785 (patch) | |
tree | ab44af35ae3e75f7fe60391274aa8a0a09a15c15 /tools | |
parent | 55a63d4da3b8850480a1c5b222f77c739e30e346 (diff) | |
parent | 40bac28eb1e39f229a94ad72e2ca8cdeef3ba31a (diff) |
Merge tag 'asoc-fix-v3.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.9
A few more fixes here and there, including quite a few nasty driver
specific ones, but nothing that has a major general impact.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/traceevent/Makefile | 2 | ||||
-rw-r--r-- | tools/perf/Makefile | 8 | ||||
-rw-r--r-- | tools/perf/bench/bench.h | 24 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 6 | ||||
-rw-r--r-- | tools/perf/util/hist.h | 5 | ||||
-rw-r--r-- | tools/perf/util/strlist.c | 2 | ||||
-rw-r--r-- | tools/testing/selftests/efivarfs/efivarfs.sh | 59 | ||||
-rw-r--r-- | tools/usb/ffs-test.c | 2 |
8 files changed, 100 insertions, 8 deletions
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index a20e32033431..0b0a90787db6 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile | |||
@@ -122,7 +122,7 @@ export Q VERBOSE | |||
122 | 122 | ||
123 | EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) | 123 | EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) |
124 | 124 | ||
125 | INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) | 125 | INCLUDES = -I. $(CONFIG_INCLUDES) |
126 | 126 | ||
127 | # Set compile option CFLAGS if not set elsewhere | 127 | # Set compile option CFLAGS if not set elsewhere |
128 | CFLAGS ?= -g -Wall | 128 | CFLAGS ?= -g -Wall |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index a2108ca1cc17..bb74c79cd16e 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -95,7 +95,7 @@ ifeq ("$(origin DEBUG)", "command line") | |||
95 | PERF_DEBUG = $(DEBUG) | 95 | PERF_DEBUG = $(DEBUG) |
96 | endif | 96 | endif |
97 | ifndef PERF_DEBUG | 97 | ifndef PERF_DEBUG |
98 | CFLAGS_OPTIMIZE = -O6 -D_FORTIFY_SOURCE=2 | 98 | CFLAGS_OPTIMIZE = -O6 |
99 | endif | 99 | endif |
100 | 100 | ||
101 | ifdef PARSER_DEBUG | 101 | ifdef PARSER_DEBUG |
@@ -180,6 +180,12 @@ ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-W | |||
180 | CFLAGS := $(CFLAGS) -Wvolatile-register-var | 180 | CFLAGS := $(CFLAGS) -Wvolatile-register-var |
181 | endif | 181 | endif |
182 | 182 | ||
183 | ifndef PERF_DEBUG | ||
184 | ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -D_FORTIFY_SOURCE=2,-D_FORTIFY_SOURCE=2),y) | ||
185 | CFLAGS := $(CFLAGS) -D_FORTIFY_SOURCE=2 | ||
186 | endif | ||
187 | endif | ||
188 | |||
183 | ### --- END CONFIGURATION SECTION --- | 189 | ### --- END CONFIGURATION SECTION --- |
184 | 190 | ||
185 | ifeq ($(srctree),) | 191 | ifeq ($(srctree),) |
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h index a5223e6a7b43..0fdc85269c4d 100644 --- a/tools/perf/bench/bench.h +++ b/tools/perf/bench/bench.h | |||
@@ -1,6 +1,30 @@ | |||
1 | #ifndef BENCH_H | 1 | #ifndef BENCH_H |
2 | #define BENCH_H | 2 | #define BENCH_H |
3 | 3 | ||
4 | /* | ||
5 | * The madvise transparent hugepage constants were added in glibc | ||
6 | * 2.13. For compatibility with older versions of glibc, define these | ||
7 | * tokens if they are not already defined. | ||
8 | * | ||
9 | * PA-RISC uses different madvise values from other architectures and | ||
10 | * needs to be special-cased. | ||
11 | */ | ||
12 | #ifdef __hppa__ | ||
13 | # ifndef MADV_HUGEPAGE | ||
14 | # define MADV_HUGEPAGE 67 | ||
15 | # endif | ||
16 | # ifndef MADV_NOHUGEPAGE | ||
17 | # define MADV_NOHUGEPAGE 68 | ||
18 | # endif | ||
19 | #else | ||
20 | # ifndef MADV_HUGEPAGE | ||
21 | # define MADV_HUGEPAGE 14 | ||
22 | # endif | ||
23 | # ifndef MADV_NOHUGEPAGE | ||
24 | # define MADV_NOHUGEPAGE 15 | ||
25 | # endif | ||
26 | #endif | ||
27 | |||
4 | extern int bench_numa(int argc, const char **argv, const char *prefix); | 28 | extern int bench_numa(int argc, const char **argv, const char *prefix); |
5 | extern int bench_sched_messaging(int argc, const char **argv, const char *prefix); | 29 | extern int bench_sched_messaging(int argc, const char **argv, const char *prefix); |
6 | extern int bench_sched_pipe(int argc, const char **argv, const char *prefix); | 30 | extern int bench_sched_pipe(int argc, const char **argv, const char *prefix); |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 774c90713a53..f1a939ebc19c 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -573,13 +573,15 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv) | |||
573 | perf_event__synthesize_guest_os, tool); | 573 | perf_event__synthesize_guest_os, tool); |
574 | } | 574 | } |
575 | 575 | ||
576 | if (!opts->target.system_wide) | 576 | if (perf_target__has_task(&opts->target)) |
577 | err = perf_event__synthesize_thread_map(tool, evsel_list->threads, | 577 | err = perf_event__synthesize_thread_map(tool, evsel_list->threads, |
578 | process_synthesized_event, | 578 | process_synthesized_event, |
579 | machine); | 579 | machine); |
580 | else | 580 | else if (perf_target__has_cpu(&opts->target)) |
581 | err = perf_event__synthesize_threads(tool, process_synthesized_event, | 581 | err = perf_event__synthesize_threads(tool, process_synthesized_event, |
582 | machine); | 582 | machine); |
583 | else /* command specified */ | ||
584 | err = 0; | ||
583 | 585 | ||
584 | if (err != 0) | 586 | if (err != 0) |
585 | goto out_delete_session; | 587 | goto out_delete_session; |
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 38624686ee9a..226a4ae2f936 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -208,8 +208,9 @@ static inline int script_browse(const char *script_opt __maybe_unused) | |||
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | 210 | ||
211 | #define K_LEFT -1 | 211 | #define K_LEFT -1000 |
212 | #define K_RIGHT -2 | 212 | #define K_RIGHT -2000 |
213 | #define K_SWITCH_INPUT_DATA -3000 | ||
213 | #endif | 214 | #endif |
214 | 215 | ||
215 | #ifdef GTK2_SUPPORT | 216 | #ifdef GTK2_SUPPORT |
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c index 55433aa42c8f..eabdce0a2daa 100644 --- a/tools/perf/util/strlist.c +++ b/tools/perf/util/strlist.c | |||
@@ -143,7 +143,7 @@ struct strlist *strlist__new(bool dupstr, const char *list) | |||
143 | slist->rblist.node_delete = strlist__node_delete; | 143 | slist->rblist.node_delete = strlist__node_delete; |
144 | 144 | ||
145 | slist->dupstr = dupstr; | 145 | slist->dupstr = dupstr; |
146 | if (slist && strlist__parse_list(slist, list) != 0) | 146 | if (list && strlist__parse_list(slist, list) != 0) |
147 | goto out_error; | 147 | goto out_error; |
148 | } | 148 | } |
149 | 149 | ||
diff --git a/tools/testing/selftests/efivarfs/efivarfs.sh b/tools/testing/selftests/efivarfs/efivarfs.sh index 880cdd5dc63f..77edcdcc016b 100644 --- a/tools/testing/selftests/efivarfs/efivarfs.sh +++ b/tools/testing/selftests/efivarfs/efivarfs.sh | |||
@@ -125,6 +125,63 @@ test_open_unlink() | |||
125 | ./open-unlink $file | 125 | ./open-unlink $file |
126 | } | 126 | } |
127 | 127 | ||
128 | # test that we can create a range of filenames | ||
129 | test_valid_filenames() | ||
130 | { | ||
131 | local attrs='\x07\x00\x00\x00' | ||
132 | local ret=0 | ||
133 | |||
134 | local file_list="abc dump-type0-11-1-1362436005 1234 -" | ||
135 | for f in $file_list; do | ||
136 | local file=$efivarfs_mount/$f-$test_guid | ||
137 | |||
138 | printf "$attrs\x00" > $file | ||
139 | |||
140 | if [ ! -e $file ]; then | ||
141 | echo "$file could not be created" >&2 | ||
142 | ret=1 | ||
143 | else | ||
144 | rm $file | ||
145 | fi | ||
146 | done | ||
147 | |||
148 | exit $ret | ||
149 | } | ||
150 | |||
151 | test_invalid_filenames() | ||
152 | { | ||
153 | local attrs='\x07\x00\x00\x00' | ||
154 | local ret=0 | ||
155 | |||
156 | local file_list=" | ||
157 | -1234-1234-1234-123456789abc | ||
158 | foo | ||
159 | foo-bar | ||
160 | -foo- | ||
161 | foo-barbazba-foob-foob-foob-foobarbazfoo | ||
162 | foo------------------------------------- | ||
163 | -12345678-1234-1234-1234-123456789abc | ||
164 | a-12345678=1234-1234-1234-123456789abc | ||
165 | a-12345678-1234=1234-1234-123456789abc | ||
166 | a-12345678-1234-1234=1234-123456789abc | ||
167 | a-12345678-1234-1234-1234=123456789abc | ||
168 | 1112345678-1234-1234-1234-123456789abc" | ||
169 | |||
170 | for f in $file_list; do | ||
171 | local file=$efivarfs_mount/$f | ||
172 | |||
173 | printf "$attrs\x00" 2>/dev/null > $file | ||
174 | |||
175 | if [ -e $file ]; then | ||
176 | echo "Creating $file should have failed" >&2 | ||
177 | rm $file | ||
178 | ret=1 | ||
179 | fi | ||
180 | done | ||
181 | |||
182 | exit $ret | ||
183 | } | ||
184 | |||
128 | check_prereqs | 185 | check_prereqs |
129 | 186 | ||
130 | rc=0 | 187 | rc=0 |
@@ -135,5 +192,7 @@ run_test test_create_read | |||
135 | run_test test_delete | 192 | run_test test_delete |
136 | run_test test_zero_size_delete | 193 | run_test test_zero_size_delete |
137 | run_test test_open_unlink | 194 | run_test test_open_unlink |
195 | run_test test_valid_filenames | ||
196 | run_test test_invalid_filenames | ||
138 | 197 | ||
139 | exit $rc | 198 | exit $rc |
diff --git a/tools/usb/ffs-test.c b/tools/usb/ffs-test.c index 8674b9ec14f6..fe1e66b6ef40 100644 --- a/tools/usb/ffs-test.c +++ b/tools/usb/ffs-test.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #include <tools/le_byteshift.h> | 39 | #include <tools/le_byteshift.h> |
40 | 40 | ||
41 | #include "../../include/linux/usb/functionfs.h" | 41 | #include "../../include/uapi/linux/usb/functionfs.h" |
42 | 42 | ||
43 | 43 | ||
44 | /******************** Little Endian Handling ********************************/ | 44 | /******************** Little Endian Handling ********************************/ |