aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2018-07-24 14:02:40 -0400
committerAndreas Gruenbacher <agruenba@redhat.com>2018-07-24 14:02:40 -0400
commita3479c7fc096a1a7a2dccbfbdc6fcf86b805711a (patch)
tree85b0044b207d05b0cf5f118f2160a8de996073ce /tools
parent109dbb1e6f27fb8f80ee61953485c7c3b1717951 (diff)
parent025d0e7f73c6a9cc3ca2fe7de821792a8f3269bf (diff)
Merge branch 'iomap-write' into linux-gfs2/for-next
Pull in the gfs2 iomap-write changes: Tweak the existing code to properly support iomap write and eliminate an unnecessary special case in gfs2_block_map. Implement iomap write support for buffered and direct I/O. Simplify some of the existing code and eliminate code that is no longer used: gfs2: Remove gfs2_write_{begin,end} gfs2: iomap direct I/O support gfs2: gfs2_extent_length cleanup gfs2: iomap buffered write support gfs2: Further iomap cleanups This is based on the following changes on the xfs 'iomap-4.19-merge' branch: iomap: add private pointer to struct iomap iomap: add a page_done callback iomap: generic inline data handling iomap: complete partial direct I/O writes synchronously iomap: mark newly allocated buffer heads as new fs: factor out a __generic_write_end helper Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/include/uapi/linux/kvm.h4
-rw-r--r--tools/include/uapi/linux/prctl.h2
-rw-r--r--tools/lib/api/fs/fs.c2
-rw-r--r--tools/perf/util/bpf-prologue.c2
-rw-r--r--tools/power/cpupower/bench/parse.c2
-rw-r--r--tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c15
-rw-r--r--tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c35
-rw-r--r--tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h9
-rw-r--r--tools/power/pm-graph/config/custom-timeline-functions.cfg4
-rw-r--r--tools/testing/selftests/bpf/Makefile4
-rw-r--r--tools/testing/selftests/cgroup/cgroup_util.c4
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc8
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc7
-rw-r--r--tools/testing/selftests/tc-testing/tc-tests/actions/ife.json2
14 files changed, 71 insertions, 29 deletions
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index b02c41e53d56..39e364c70caf 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -677,10 +677,10 @@ struct kvm_ioeventfd {
677}; 677};
678 678
679#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) 679#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
680#define KVM_X86_DISABLE_EXITS_HTL (1 << 1) 680#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
681#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) 681#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
682#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ 682#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
683 KVM_X86_DISABLE_EXITS_HTL | \ 683 KVM_X86_DISABLE_EXITS_HLT | \
684 KVM_X86_DISABLE_EXITS_PAUSE) 684 KVM_X86_DISABLE_EXITS_PAUSE)
685 685
686/* for KVM_ENABLE_CAP */ 686/* for KVM_ENABLE_CAP */
diff --git a/tools/include/uapi/linux/prctl.h b/tools/include/uapi/linux/prctl.h
index db9f15f5db04..c0d7ea0bf5b6 100644
--- a/tools/include/uapi/linux/prctl.h
+++ b/tools/include/uapi/linux/prctl.h
@@ -170,7 +170,7 @@ struct prctl_mm_map {
170 * asking selinux for a specific new context (e.g. with runcon) will result 170 * asking selinux for a specific new context (e.g. with runcon) will result
171 * in execve returning -EPERM. 171 * in execve returning -EPERM.
172 * 172 *
173 * See Documentation/prctl/no_new_privs.txt for more details. 173 * See Documentation/userspace-api/no_new_privs.rst for more details.
174 */ 174 */
175#define PR_SET_NO_NEW_PRIVS 38 175#define PR_SET_NO_NEW_PRIVS 38
176#define PR_GET_NO_NEW_PRIVS 39 176#define PR_GET_NO_NEW_PRIVS 39
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c
index 6a12bbf39f7b..7aba8243a0e7 100644
--- a/tools/lib/api/fs/fs.c
+++ b/tools/lib/api/fs/fs.c
@@ -201,7 +201,7 @@ static void mem_toupper(char *f, size_t len)
201 201
202/* 202/*
203 * Check for "NAME_PATH" environment variable to override fs location (for 203 * Check for "NAME_PATH" environment variable to override fs location (for
204 * testing). This matches the recommendation in Documentation/sysfs-rules.txt 204 * testing). This matches the recommendation in Documentation/admin-guide/sysfs-rules.rst
205 * for SYSFS_PATH. 205 * for SYSFS_PATH.
206 */ 206 */
207static bool fs__env_override(struct fs *fs) 207static bool fs__env_override(struct fs *fs)
diff --git a/tools/perf/util/bpf-prologue.c b/tools/perf/util/bpf-prologue.c
index 29347756b0af..77e4891e17b0 100644
--- a/tools/perf/util/bpf-prologue.c
+++ b/tools/perf/util/bpf-prologue.c
@@ -61,7 +61,7 @@ check_pos(struct bpf_insn_pos *pos)
61 61
62/* 62/*
63 * Convert type string (u8/u16/u32/u64/s8/s16/s32/s64 ..., see 63 * Convert type string (u8/u16/u32/u64/s8/s16/s32/s64 ..., see
64 * Documentation/trace/kprobetrace.txt) to size field of BPF_LDX_MEM 64 * Documentation/trace/kprobetrace.rst) to size field of BPF_LDX_MEM
65 * instruction (BPF_{B,H,W,DW}). 65 * instruction (BPF_{B,H,W,DW}).
66 */ 66 */
67static int 67static int
diff --git a/tools/power/cpupower/bench/parse.c b/tools/power/cpupower/bench/parse.c
index 9b65f052081f..9ba8a44ad2a7 100644
--- a/tools/power/cpupower/bench/parse.c
+++ b/tools/power/cpupower/bench/parse.c
@@ -104,7 +104,7 @@ FILE *prepare_output(const char *dirname)
104 dirname, time(NULL)); 104 dirname, time(NULL));
105 } 105 }
106 106
107 dprintf("logilename: %s\n", filename); 107 dprintf("logfilename: %s\n", filename);
108 108
109 output = fopen(filename, "w+"); 109 output = fopen(filename, "w+");
110 if (output == NULL) { 110 if (output == NULL) {
diff --git a/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c b/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c
index 5b3205f16217..5b8c4956ff9a 100644
--- a/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c
+++ b/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c
@@ -126,6 +126,20 @@ void fix_up_intel_idle_driver_name(char *tmp, int num)
126 } 126 }
127} 127}
128 128
129#ifdef __powerpc__
130void map_power_idle_state_name(char *tmp)
131{
132 if (!strncmp(tmp, "stop0_lite", CSTATE_NAME_LEN))
133 strcpy(tmp, "stop0L");
134 else if (!strncmp(tmp, "stop1_lite", CSTATE_NAME_LEN))
135 strcpy(tmp, "stop1L");
136 else if (!strncmp(tmp, "stop2_lite", CSTATE_NAME_LEN))
137 strcpy(tmp, "stop2L");
138}
139#else
140void map_power_idle_state_name(char *tmp) { }
141#endif
142
129static struct cpuidle_monitor *cpuidle_register(void) 143static struct cpuidle_monitor *cpuidle_register(void)
130{ 144{
131 int num; 145 int num;
@@ -145,6 +159,7 @@ static struct cpuidle_monitor *cpuidle_register(void)
145 if (tmp == NULL) 159 if (tmp == NULL)
146 continue; 160 continue;
147 161
162 map_power_idle_state_name(tmp);
148 fix_up_intel_idle_driver_name(tmp, num); 163 fix_up_intel_idle_driver_name(tmp, num);
149 strncpy(cpuidle_cstates[num].name, tmp, CSTATE_NAME_LEN - 1); 164 strncpy(cpuidle_cstates[num].name, tmp, CSTATE_NAME_LEN - 1);
150 free(tmp); 165 free(tmp);
diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
index 05f953f0f0a0..051da0a7c454 100644
--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
@@ -70,36 +70,43 @@ void print_n_spaces(int n)
70 printf(" "); 70 printf(" ");
71} 71}
72 72
73/* size of s must be at least n + 1 */ 73/*s is filled with left and right spaces
74 *to make its length atleast n+1
75 */
74int fill_string_with_spaces(char *s, int n) 76int fill_string_with_spaces(char *s, int n)
75{ 77{
78 char *temp;
76 int len = strlen(s); 79 int len = strlen(s);
77 if (len > n) 80
81 if (len >= n)
78 return -1; 82 return -1;
83
84 temp = malloc(sizeof(char) * (n+1));
79 for (; len < n; len++) 85 for (; len < n; len++)
80 s[len] = ' '; 86 s[len] = ' ';
81 s[len] = '\0'; 87 s[len] = '\0';
88 snprintf(temp, n+1, " %s", s);
89 strcpy(s, temp);
90 free(temp);
82 return 0; 91 return 0;
83} 92}
84 93
94#define MAX_COL_WIDTH 6
85void print_header(int topology_depth) 95void print_header(int topology_depth)
86{ 96{
87 int unsigned mon; 97 int unsigned mon;
88 int state, need_len; 98 int state, need_len;
89 cstate_t s; 99 cstate_t s;
90 char buf[128] = ""; 100 char buf[128] = "";
91 int percent_width = 4;
92 101
93 fill_string_with_spaces(buf, topology_depth * 5 - 1); 102 fill_string_with_spaces(buf, topology_depth * 5 - 1);
94 printf("%s|", buf); 103 printf("%s|", buf);
95 104
96 for (mon = 0; mon < avail_monitors; mon++) { 105 for (mon = 0; mon < avail_monitors; mon++) {
97 need_len = monitors[mon]->hw_states_num * (percent_width + 3) 106 need_len = monitors[mon]->hw_states_num * (MAX_COL_WIDTH + 1)
98 - 1; 107 - 1;
99 if (mon != 0) { 108 if (mon != 0)
100 printf("|| "); 109