History

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.

Arnd Bergmann committed 17 years ago

Commit 5b02ee32 parents 26a28fa 8ebf9751448 files · +99138 −32943Browse files

Showing the changes to scripts (4 of 1448 files). Show all

Unified · Split

4 files
  1. scripts/Makefile.lib +21 −7
  2. scripts/bin_size +0 −10
  3. scripts/kernel-doc +22 −0
  4. scripts/recordmcount.pl +3 −3
scripts/Makefile.lib+21−7
@@ -188,20 +188,34 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ · 187 unmodified lines
188188 # ---------------------------------------------------------------------------
189189
190190 quiet_cmd_gzip = GZIP $@
191−cmd_gzip = gzip -f -9 < $< > $@
191+cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
192+ (rm -f $@ ; false)
192193
193194
194195 # Bzip2
195196 # ---------------------------------------------------------------------------
196197
197−# Bzip2 does not include size in file... so we have to fake that
198−size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size
199−
200−quiet_cmd_bzip2 = BZIP2 $@
201−cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
198+# Bzip2 and LZMA do not include size in file... so we have to fake that;
199+# append the size as a 32-bit littleendian number as gzip does.
200+size_append = echo -ne $(shell \
201+dec_size=0; \
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)
202214
203215 # Lzma
204216 # ---------------------------------------------------------------------------
205217
206218 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)
scripts/bin_size+0−10
@@ -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
scripts/kernel-doc+22−0
@@ -1828,6 +1828,25 @@ sub reset_state { · 1827 unmodified lines
18281828 $state = 0;
18291829 }
18301830
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+
18311850 sub syscall_munge() {
18321851 my $void = 0;
18331852
@@ -1882,6 +1901,9 @@ sub process_state3_function($$) { · 48 unmodified lines
18821901 if ($prototype =~ /SYSCALL_DEFINE/) {
18831902 syscall_munge();
18841903 }
1904+ if ($prototype =~ /TRACE_EVENT/) {
1905+ tracepoint_munge($file);
1906+ }
18851907 dump_function($prototype, $file);
18861908 reset_state();
18871909 }
scripts/recordmcount.pl+3−3
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 # which will also be the location of that section after final link.
2727 # e.g.
2828 #
29−# .section ".text.sched"
29+# .section ".sched.text", "ax"
3030 # .globl my_func
3131 # my_func:
3232 # [...]
@@ -39,7 +39,7 @@ · 6 unmodified lines
3939 # [...]
4040 #
4141 # 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:
4343 #
4444 # .section __mcount_loc
4545 # .quad my_func + 0x5
@@ -51,7 +51,7 @@ · 5 unmodified lines
5151 # But this gets hard if my_func is not globl (a static function).
5252 # In such a case we have:
5353 #
54−# .section ".text.sched"
54+# .section ".sched.text", "ax"
5555 # my_func:
5656 # [...]
5757 # call mcount (offset: 0x5)