diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-06-12 03:53:47 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2009-06-12 05:32:58 -0400 |
commit | 5b02ee3d219f9e01b6e9146e25613822cfc2e5ce (patch) | |
tree | 7ce9126738c3cf4b37d67170d0e4b34818c057a9 /scripts | |
parent | 26a28fa4fea5b8c65713aa50c124f76a88c7924d (diff) | |
parent | 8ebf975608aaebd7feb33d77f07ba21a6380e086 (diff) |
asm-generic: merge branch 'master' of torvalds/linux-2.6
Fixes a merge conflict against the x86 tree caused by a fix to
atomic.h which I renamed to atomic_long.h.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.lib | 28 | ||||
-rw-r--r-- | scripts/bin_size | 10 | ||||
-rwxr-xr-x | scripts/kernel-doc | 22 | ||||
-rwxr-xr-x | scripts/recordmcount.pl | 6 |
4 files changed, 46 insertions, 20 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index cba61ca403ca..2b706617c89a 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -188,20 +188,34 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ | |||
188 | # --------------------------------------------------------------------------- | 188 | # --------------------------------------------------------------------------- |
189 | 189 | ||
190 | quiet_cmd_gzip = GZIP $@ | 190 | quiet_cmd_gzip = GZIP $@ |
191 | cmd_gzip = gzip -f -9 < $< > $@ | 191 | cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ |
192 | (rm -f $@ ; false) | ||
192 | 193 | ||
193 | 194 | ||
194 | # Bzip2 | 195 | # Bzip2 |
195 | # --------------------------------------------------------------------------- | 196 | # --------------------------------------------------------------------------- |
196 | 197 | ||
197 | # Bzip2 does not include size in file... so we have to fake that | 198 | # Bzip2 and LZMA do not include size in file... so we have to fake that; |
198 | size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size | 199 | # append the size as a 32-bit littleendian number as gzip does. |
199 | 200 | size_append = echo -ne $(shell \ | |
200 | quiet_cmd_bzip2 = BZIP2 $@ | 201 | dec_size=0; \ |
201 | cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false) | 202 | for F in $1; do \ |
203 | fsize=$$(stat -c "%s" $$F); \ | ||
204 | dec_size=$$(expr $$dec_size + $$fsize); \ | ||
205 | done; \ | ||
206 | printf "%08x" $$dec_size | \ | ||
207 | sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g' \ | ||
208 | ) | ||
209 | |||
210 | quiet_cmd_bzip2 = BZIP2 $@ | ||
211 | cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ | ||
212 | bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | ||
213 | (rm -f $@ ; false) | ||
202 | 214 | ||
203 | # Lzma | 215 | # Lzma |
204 | # --------------------------------------------------------------------------- | 216 | # --------------------------------------------------------------------------- |
205 | 217 | ||
206 | quiet_cmd_lzma = LZMA $@ | 218 | quiet_cmd_lzma = LZMA $@ |
207 | cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false) | 219 | cmd_lzma = (cat $(filter-out FORCE,$^) | \ |
220 | lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | ||
221 | (rm -f $@ ; false) | ||
diff --git a/scripts/bin_size b/scripts/bin_size deleted file mode 100644 index 43e1b360cee6..000000000000 --- a/scripts/bin_size +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ $# = 0 ] ; then | ||
4 | echo Usage: $0 file | ||
5 | fi | ||
6 | |||
7 | size_dec=`stat -c "%s" $1` | ||
8 | size_hex_echo_string=`printf "%08x" $size_dec | | ||
9 | sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'` | ||
10 | /bin/echo -ne $size_hex_echo_string | ||
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 3208a3a7e7fe..acd8c4a8e3e0 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1828,6 +1828,25 @@ sub reset_state { | |||
1828 | $state = 0; | 1828 | $state = 0; |
1829 | } | 1829 | } |
1830 | 1830 | ||
1831 | sub tracepoint_munge($) { | ||
1832 | my $file = shift; | ||
1833 | my $tracepointname = 0; | ||
1834 | my $tracepointargs = 0; | ||
1835 | |||
1836 | if($prototype =~ m/TRACE_EVENT\((.*?),/) { | ||
1837 | $tracepointname = $1; | ||
1838 | } | ||
1839 | if($prototype =~ m/TP_PROTO\((.*?)\)/) { | ||
1840 | $tracepointargs = $1; | ||
1841 | } | ||
1842 | if (($tracepointname eq 0) || ($tracepointargs eq 0)) { | ||
1843 | print STDERR "Warning(${file}:$.): Unrecognized tracepoint format: \n". | ||
1844 | "$prototype\n"; | ||
1845 | } else { | ||
1846 | $prototype = "static inline void trace_$tracepointname($tracepointargs)"; | ||
1847 | } | ||
1848 | } | ||
1849 | |||
1831 | sub syscall_munge() { | 1850 | sub syscall_munge() { |
1832 | my $void = 0; | 1851 | my $void = 0; |
1833 | 1852 | ||
@@ -1882,6 +1901,9 @@ sub process_state3_function($$) { | |||
1882 | if ($prototype =~ /SYSCALL_DEFINE/) { | 1901 | if ($prototype =~ /SYSCALL_DEFINE/) { |
1883 | syscall_munge(); | 1902 | syscall_munge(); |
1884 | } | 1903 | } |
1904 | if ($prototype =~ /TRACE_EVENT/) { | ||
1905 | tracepoint_munge($file); | ||
1906 | } | ||
1885 | dump_function($prototype, $file); | 1907 | dump_function($prototype, $file); |
1886 | reset_state(); | 1908 | reset_state(); |
1887 | } | 1909 | } |
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 409596eca124..0fae7da0529c 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -26,7 +26,7 @@ | |||
26 | # which will also be the location of that section after final link. | 26 | # which will also be the location of that section after final link. |
27 | # e.g. | 27 | # e.g. |
28 | # | 28 | # |
29 | # .section ".text.sched" | 29 | # .section ".sched.text", "ax" |
30 | # .globl my_func | 30 | # .globl my_func |
31 | # my_func: | 31 | # my_func: |
32 | # [...] | 32 | # [...] |
@@ -39,7 +39,7 @@ | |||
39 | # [...] | 39 | # [...] |
40 | # | 40 | # |
41 | # Both relocation offsets for the mcounts in the above example will be | 41 | # Both relocation offsets for the mcounts in the above example will be |
42 | # offset from .text.sched. If we make another file called tmp.s with: | 42 | # offset from .sched.text. If we make another file called tmp.s with: |
43 | # | 43 | # |
44 | # .section __mcount_loc | 44 | # .section __mcount_loc |
45 | # .quad my_func + 0x5 | 45 | # .quad my_func + 0x5 |
@@ -51,7 +51,7 @@ | |||
51 | # But this gets hard if my_func is not globl (a static function). | 51 | # But this gets hard if my_func is not globl (a static function). |
52 | # In such a case we have: | 52 | # In such a case we have: |
53 | # | 53 | # |
54 | # .section ".text.sched" | 54 | # .section ".sched.text", "ax" |
55 | # my_func: | 55 | # my_func: |
56 | # [...] | 56 | # [...] |
57 | # call mcount (offset: 0x5) | 57 | # call mcount (offset: 0x5) |