Fixes a merge conflict against the x86 tree caused by a fix to atomic.h which I renamed to atomic_long.h.
Showing the changes to scripts (4 of 1448 files). Show all
Unified · Split
| @@ -188,20 +188,34 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ · 187 unmodified lines | |||
| 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) | ||
| @@ -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 | ||
| @@ -1828,6 +1828,25 @@ sub reset_state { · 1827 unmodified lines | |||
| 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($$) { · 48 unmodified lines | |||
| 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 | } |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | |||
| 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 @@ · 6 unmodified lines | |||
| 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 @@ · 5 unmodified lines | |||
| 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) |