diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cgroups/cpusets.txt | 12 | ||||
-rw-r--r-- | Documentation/gcov.txt | 25 | ||||
-rw-r--r-- | Documentation/spi/spidev_test.c | 10 |
3 files changed, 37 insertions, 10 deletions
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index f9ca389dddf4..1d7e9784439a 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
@@ -777,6 +777,18 @@ in cpuset directories: | |||
777 | # /bin/echo 1-4 > cpus -> set cpus list to cpus 1,2,3,4 | 777 | # /bin/echo 1-4 > cpus -> set cpus list to cpus 1,2,3,4 |
778 | # /bin/echo 1,2,3,4 > cpus -> set cpus list to cpus 1,2,3,4 | 778 | # /bin/echo 1,2,3,4 > cpus -> set cpus list to cpus 1,2,3,4 |
779 | 779 | ||
780 | To add a CPU to a cpuset, write the new list of CPUs including the | ||
781 | CPU to be added. To add 6 to the above cpuset: | ||
782 | |||
783 | # /bin/echo 1-4,6 > cpus -> set cpus list to cpus 1,2,3,4,6 | ||
784 | |||
785 | Similarly to remove a CPU from a cpuset, write the new list of CPUs | ||
786 | without the CPU to be removed. | ||
787 | |||
788 | To remove all the CPUs: | ||
789 | |||
790 | # /bin/echo "" > cpus -> clear cpus list | ||
791 | |||
780 | 2.3 Setting flags | 792 | 2.3 Setting flags |
781 | ----------------- | 793 | ----------------- |
782 | 794 | ||
diff --git a/Documentation/gcov.txt b/Documentation/gcov.txt index e716aadb3a33..40ec63352760 100644 --- a/Documentation/gcov.txt +++ b/Documentation/gcov.txt | |||
@@ -188,13 +188,18 @@ Solution: Exclude affected source files from profiling by specifying | |||
188 | GCOV_PROFILE := n or GCOV_PROFILE_basename.o := n in the | 188 | GCOV_PROFILE := n or GCOV_PROFILE_basename.o := n in the |
189 | corresponding Makefile. | 189 | corresponding Makefile. |
190 | 190 | ||
191 | Problem: Files copied from sysfs appear empty or incomplete. | ||
192 | Cause: Due to the way seq_file works, some tools such as cp or tar | ||
193 | may not correctly copy files from sysfs. | ||
194 | Solution: Use 'cat' to read .gcda files and 'cp -d' to copy links. | ||
195 | Alternatively use the mechanism shown in Appendix B. | ||
196 | |||
191 | 197 | ||
192 | Appendix A: gather_on_build.sh | 198 | Appendix A: gather_on_build.sh |
193 | ============================== | 199 | ============================== |
194 | 200 | ||
195 | Sample script to gather coverage meta files on the build machine | 201 | Sample script to gather coverage meta files on the build machine |
196 | (see 6a): | 202 | (see 6a): |
197 | |||
198 | #!/bin/bash | 203 | #!/bin/bash |
199 | 204 | ||
200 | KSRC=$1 | 205 | KSRC=$1 |
@@ -226,7 +231,7 @@ Appendix B: gather_on_test.sh | |||
226 | Sample script to gather coverage data files on the test machine | 231 | Sample script to gather coverage data files on the test machine |
227 | (see 6b): | 232 | (see 6b): |
228 | 233 | ||
229 | #!/bin/bash | 234 | #!/bin/bash -e |
230 | 235 | ||
231 | DEST=$1 | 236 | DEST=$1 |
232 | GCDA=/sys/kernel/debug/gcov | 237 | GCDA=/sys/kernel/debug/gcov |
@@ -236,11 +241,13 @@ if [ -z "$DEST" ] ; then | |||
236 | exit 1 | 241 | exit 1 |
237 | fi | 242 | fi |
238 | 243 | ||
239 | find $GCDA -name '*.gcno' -o -name '*.gcda' | tar cfz $DEST -T - | 244 | TEMPDIR=$(mktemp -d) |
245 | echo Collecting data.. | ||
246 | find $GCDA -type d -exec mkdir -p $TEMPDIR/\{\} \; | ||
247 | find $GCDA -name '*.gcda' -exec sh -c 'cat < $0 > '$TEMPDIR'/$0' {} \; | ||
248 | find $GCDA -name '*.gcno' -exec sh -c 'cp -d $0 '$TEMPDIR'/$0' {} \; | ||
249 | tar czf $DEST -C $TEMPDIR sys | ||
250 | rm -rf $TEMPDIR | ||
240 | 251 | ||
241 | if [ $? -eq 0 ] ; then | 252 | echo "$DEST successfully created, copy to build system and unpack with:" |
242 | echo "$DEST successfully created, copy to build system and unpack with:" | 253 | echo " tar xfz $DEST" |
243 | echo " tar xfz $DEST" | ||
244 | else | ||
245 | echo "Could not create file $DEST" | ||
246 | fi | ||
diff --git a/Documentation/spi/spidev_test.c b/Documentation/spi/spidev_test.c index cf0e3ce0d526..c1a5aad3c75a 100644 --- a/Documentation/spi/spidev_test.c +++ b/Documentation/spi/spidev_test.c | |||
@@ -99,11 +99,13 @@ void parse_opts(int argc, char *argv[]) | |||
99 | { "lsb", 0, 0, 'L' }, | 99 | { "lsb", 0, 0, 'L' }, |
100 | { "cs-high", 0, 0, 'C' }, | 100 | { "cs-high", 0, 0, 'C' }, |
101 | { "3wire", 0, 0, '3' }, | 101 | { "3wire", 0, 0, '3' }, |
102 | { "no-cs", 0, 0, 'N' }, | ||
103 | { "ready", 0, 0, 'R' }, | ||
102 | { NULL, 0, 0, 0 }, | 104 | { NULL, 0, 0, 0 }, |
103 | }; | 105 | }; |
104 | int c; | 106 | int c; |
105 | 107 | ||
106 | c = getopt_long(argc, argv, "D:s:d:b:lHOLC3", lopts, NULL); | 108 | c = getopt_long(argc, argv, "D:s:d:b:lHOLC3NR", lopts, NULL); |
107 | 109 | ||
108 | if (c == -1) | 110 | if (c == -1) |
109 | break; | 111 | break; |
@@ -139,6 +141,12 @@ void parse_opts(int argc, char *argv[]) | |||
139 | case '3': | 141 | case '3': |
140 | mode |= SPI_3WIRE; | 142 | mode |= SPI_3WIRE; |
141 | break; | 143 | break; |
144 | case 'N': | ||
145 | mode |= SPI_NO_CS; | ||
146 | break; | ||
147 | case 'R': | ||
148 | mode |= SPI_READY; | ||
149 | break; | ||
142 | default: | 150 | default: |
143 | print_usage(argv[0]); | 151 | print_usage(argv[0]); |
144 | break; | 152 | break; |