diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.lib | 14 | ||||
-rw-r--r-- | scripts/bin_size | 10 | ||||
-rw-r--r-- | scripts/bootgraph.pl | 4 | ||||
-rwxr-xr-x | scripts/checkpatch.pl | 26 | ||||
-rw-r--r-- | scripts/gen_initramfs_list.sh | 18 | ||||
-rw-r--r-- | scripts/markup_oops.pl | 161 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 1 | ||||
-rwxr-xr-x | scripts/package/mkspec | 8 | ||||
-rwxr-xr-x | scripts/setlocalversion | 9 | ||||
-rwxr-xr-x | scripts/tags.sh | 12 |
10 files changed, 224 insertions, 39 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index e06365775bdf..3b949a354470 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -186,3 +186,17 @@ quiet_cmd_gzip = GZIP $@ | |||
186 | cmd_gzip = gzip -f -9 < $< > $@ | 186 | cmd_gzip = gzip -f -9 < $< > $@ |
187 | 187 | ||
188 | 188 | ||
189 | # Bzip2 | ||
190 | # --------------------------------------------------------------------------- | ||
191 | |||
192 | # Bzip2 does not include size in file... so we have to fake that | ||
193 | size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size | ||
194 | |||
195 | quiet_cmd_bzip2 = BZIP2 $@ | ||
196 | cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false) | ||
197 | |||
198 | # Lzma | ||
199 | # --------------------------------------------------------------------------- | ||
200 | |||
201 | quiet_cmd_lzma = LZMA $@ | ||
202 | cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false) | ||
diff --git a/scripts/bin_size b/scripts/bin_size new file mode 100644 index 000000000000..43e1b360cee6 --- /dev/null +++ b/scripts/bin_size | |||
@@ -0,0 +1,10 @@ | |||
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/bootgraph.pl b/scripts/bootgraph.pl index b0246307aac4..12caa822a232 100644 --- a/scripts/bootgraph.pl +++ b/scripts/bootgraph.pl | |||
@@ -51,7 +51,7 @@ my %pidctr; | |||
51 | 51 | ||
52 | while (<>) { | 52 | while (<>) { |
53 | my $line = $_; | 53 | my $line = $_; |
54 | if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_]+)\+/) { | 54 | if ($line =~ /([0-9\.]+)\] calling ([a-zA-Z0-9\_\.]+)\+/) { |
55 | my $func = $2; | 55 | my $func = $2; |
56 | if ($done == 0) { | 56 | if ($done == 0) { |
57 | $start{$func} = $1; | 57 | $start{$func} = $1; |
@@ -87,7 +87,7 @@ while (<>) { | |||
87 | $count = $count + 1; | 87 | $count = $count + 1; |
88 | } | 88 | } |
89 | 89 | ||
90 | if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) { | 90 | if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_\.]+)\+.*returned/) { |
91 | if ($done == 0) { | 91 | if ($done == 0) { |
92 | $end{$2} = $1; | 92 | $end{$2} = $1; |
93 | $maxtime = $1; | 93 | $maxtime = $1; |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 45eb0ae98eba..2d5ece798c4c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -10,7 +10,7 @@ use strict; | |||
10 | my $P = $0; | 10 | my $P = $0; |
11 | $P =~ s@.*/@@g; | 11 | $P =~ s@.*/@@g; |
12 | 12 | ||
13 | my $V = '0.27'; | 13 | my $V = '0.28'; |
14 | 14 | ||
15 | use Getopt::Long qw(:config no_auto_abbrev); | 15 | use Getopt::Long qw(:config no_auto_abbrev); |
16 | 16 | ||
@@ -110,7 +110,8 @@ our $Sparse = qr{ | |||
110 | __iomem| | 110 | __iomem| |
111 | __must_check| | 111 | __must_check| |
112 | __init_refok| | 112 | __init_refok| |
113 | __kprobes | 113 | __kprobes| |
114 | __ref | ||
114 | }x; | 115 | }x; |
115 | our $Attribute = qr{ | 116 | our $Attribute = qr{ |
116 | const| | 117 | const| |
@@ -1240,7 +1241,8 @@ sub process { | |||
1240 | $realfile =~ s@^([^/]*)/@@; | 1241 | $realfile =~ s@^([^/]*)/@@; |
1241 | 1242 | ||
1242 | $p1_prefix = $1; | 1243 | $p1_prefix = $1; |
1243 | if ($tree && $p1_prefix ne '' && -e "$root/$p1_prefix") { | 1244 | if (!$file && $tree && $p1_prefix ne '' && |
1245 | -e "$root/$p1_prefix") { | ||
1244 | WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n"); | 1246 | WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n"); |
1245 | } | 1247 | } |
1246 | 1248 | ||
@@ -1583,9 +1585,9 @@ sub process { | |||
1583 | } | 1585 | } |
1584 | # TEST: allow direct testing of the attribute matcher. | 1586 | # TEST: allow direct testing of the attribute matcher. |
1585 | if ($dbg_attr) { | 1587 | if ($dbg_attr) { |
1586 | if ($line =~ /^.\s*$Attribute\s*$/) { | 1588 | if ($line =~ /^.\s*$Modifier\s*$/) { |
1587 | ERROR("TEST: is attr\n" . $herecurr); | 1589 | ERROR("TEST: is attr\n" . $herecurr); |
1588 | } elsif ($dbg_attr > 1 && $line =~ /^.+($Attribute)/) { | 1590 | } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) { |
1589 | ERROR("TEST: is not attr ($1 is)\n". $herecurr); | 1591 | ERROR("TEST: is not attr ($1 is)\n". $herecurr); |
1590 | } | 1592 | } |
1591 | next; | 1593 | next; |
@@ -1657,7 +1659,7 @@ sub process { | |||
1657 | 1659 | ||
1658 | # * goes on variable not on type | 1660 | # * goes on variable not on type |
1659 | # (char*[ const]) | 1661 | # (char*[ const]) |
1660 | if ($line =~ m{\($NonptrType(\s*\*[\s\*]*(?:$Modifier\s*)*)\)}) { | 1662 | if ($line =~ m{\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\)}) { |
1661 | my ($from, $to) = ($1, $1); | 1663 | my ($from, $to) = ($1, $1); |
1662 | 1664 | ||
1663 | # Should start with a space. | 1665 | # Should start with a space. |
@@ -1672,7 +1674,7 @@ sub process { | |||
1672 | if ($from ne $to) { | 1674 | if ($from ne $to) { |
1673 | ERROR("\"(foo$from)\" should be \"(foo$to)\"\n" . $herecurr); | 1675 | ERROR("\"(foo$from)\" should be \"(foo$to)\"\n" . $herecurr); |
1674 | } | 1676 | } |
1675 | } elsif ($line =~ m{\b$NonptrType(\s*\*[\s\*]*(?:$Modifier\s*)?)($Ident)}) { | 1677 | } elsif ($line =~ m{\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident)}) { |
1676 | my ($from, $to, $ident) = ($1, $1, $2); | 1678 | my ($from, $to, $ident) = ($1, $1, $2); |
1677 | 1679 | ||
1678 | # Should start with a space. | 1680 | # Should start with a space. |
@@ -1685,8 +1687,8 @@ sub process { | |||
1685 | # Modifiers should have spaces. | 1687 | # Modifiers should have spaces. |
1686 | $to =~ s/(\b$Modifier$)/$1 /; | 1688 | $to =~ s/(\b$Modifier$)/$1 /; |
1687 | 1689 | ||
1688 | #print "from<$from> to<$to>\n"; | 1690 | #print "from<$from> to<$to> ident<$ident>\n"; |
1689 | if ($from ne $to) { | 1691 | if ($from ne $to && $ident !~ /^$Modifier$/) { |
1690 | ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr); | 1692 | ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr); |
1691 | } | 1693 | } |
1692 | } | 1694 | } |
@@ -1885,11 +1887,11 @@ sub process { | |||
1885 | if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { | 1887 | if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { |
1886 | ERROR("space required before that '$op' $at\n" . $hereptr); | 1888 | ERROR("space required before that '$op' $at\n" . $hereptr); |
1887 | } | 1889 | } |
1888 | if ($op eq '*' && $cc =~/\s*const\b/) { | 1890 | if ($op eq '*' && $cc =~/\s*$Modifier\b/) { |
1889 | # A unary '*' may be const | 1891 | # A unary '*' may be const |
1890 | 1892 | ||
1891 | } elsif ($ctx =~ /.xW/) { | 1893 | } elsif ($ctx =~ /.xW/) { |
1892 | ERROR("space prohibited after that '$op' $at\n" . $hereptr); | 1894 | ERROR("Aspace prohibited after that '$op' $at\n" . $hereptr); |
1893 | } | 1895 | } |
1894 | 1896 | ||
1895 | # unary ++ and unary -- are allowed no space on one side. | 1897 | # unary ++ and unary -- are allowed no space on one side. |
@@ -2560,7 +2562,7 @@ sub process { | |||
2560 | if ($line =~ /\bin_atomic\s*\(/) { | 2562 | if ($line =~ /\bin_atomic\s*\(/) { |
2561 | if ($realfile =~ m@^drivers/@) { | 2563 | if ($realfile =~ m@^drivers/@) { |
2562 | ERROR("do not use in_atomic in drivers\n" . $herecurr); | 2564 | ERROR("do not use in_atomic in drivers\n" . $herecurr); |
2563 | } else { | 2565 | } elsif ($realfile !~ m@^kernel/@) { |
2564 | WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); | 2566 | WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); |
2565 | } | 2567 | } |
2566 | } | 2568 | } |
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh index 5f3415f28736..3eea8f15131b 100644 --- a/scripts/gen_initramfs_list.sh +++ b/scripts/gen_initramfs_list.sh | |||
@@ -5,7 +5,7 @@ | |||
5 | # Released under the terms of the GNU GPL | 5 | # Released under the terms of the GNU GPL |
6 | # | 6 | # |
7 | # Generate a cpio packed initramfs. It uses gen_init_cpio to generate | 7 | # Generate a cpio packed initramfs. It uses gen_init_cpio to generate |
8 | # the cpio archive, and gzip to pack it. | 8 | # the cpio archive, and then compresses it. |
9 | # The script may also be used to generate the inputfile used for gen_init_cpio | 9 | # The script may also be used to generate the inputfile used for gen_init_cpio |
10 | # This script assumes that gen_init_cpio is located in usr/ directory | 10 | # This script assumes that gen_init_cpio is located in usr/ directory |
11 | 11 | ||
@@ -16,8 +16,8 @@ usage() { | |||
16 | cat << EOF | 16 | cat << EOF |
17 | Usage: | 17 | Usage: |
18 | $0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ... | 18 | $0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ... |
19 | -o <file> Create gzipped initramfs file named <file> using | 19 | -o <file> Create compressed initramfs file named <file> using |
20 | gen_init_cpio and gzip | 20 | gen_init_cpio and compressor depending on the extension |
21 | -u <uid> User ID to map to user ID 0 (root). | 21 | -u <uid> User ID to map to user ID 0 (root). |
22 | <uid> is only meaningful if <cpio_source> is a | 22 | <uid> is only meaningful if <cpio_source> is a |
23 | directory. "squash" forces all files to uid 0. | 23 | directory. "squash" forces all files to uid 0. |
@@ -225,6 +225,7 @@ cpio_list= | |||
225 | output="/dev/stdout" | 225 | output="/dev/stdout" |
226 | output_file="" | 226 | output_file="" |
227 | is_cpio_compressed= | 227 | is_cpio_compressed= |
228 | compr="gzip -9 -f" | ||
228 | 229 | ||
229 | arg="$1" | 230 | arg="$1" |
230 | case "$arg" in | 231 | case "$arg" in |
@@ -233,11 +234,15 @@ case "$arg" in | |||
233 | echo "deps_initramfs := \\" | 234 | echo "deps_initramfs := \\" |
234 | shift | 235 | shift |
235 | ;; | 236 | ;; |
236 | "-o") # generate gzipped cpio image named $1 | 237 | "-o") # generate compressed cpio image named $1 |
237 | shift | 238 | shift |
238 | output_file="$1" | 239 | output_file="$1" |
239 | cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)" | 240 | cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)" |
240 | output=${cpio_list} | 241 | output=${cpio_list} |
242 | echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f" | ||
243 | echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f" | ||
244 | echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f" | ||
245 | echo "$output_file" | grep -q "\.cpio$" && compr="cat" | ||
241 | shift | 246 | shift |
242 | ;; | 247 | ;; |
243 | esac | 248 | esac |
@@ -274,7 +279,7 @@ while [ $# -gt 0 ]; do | |||
274 | esac | 279 | esac |
275 | done | 280 | done |
276 | 281 | ||
277 | # If output_file is set we will generate cpio archive and gzip it | 282 | # If output_file is set we will generate cpio archive and compress it |
278 | # we are carefull to delete tmp files | 283 | # we are carefull to delete tmp files |
279 | if [ ! -z ${output_file} ]; then | 284 | if [ ! -z ${output_file} ]; then |
280 | if [ -z ${cpio_file} ]; then | 285 | if [ -z ${cpio_file} ]; then |
@@ -287,7 +292,8 @@ if [ ! -z ${output_file} ]; then | |||
287 | if [ "${is_cpio_compressed}" = "compressed" ]; then | 292 | if [ "${is_cpio_compressed}" = "compressed" ]; then |
288 | cat ${cpio_tfile} > ${output_file} | 293 | cat ${cpio_tfile} > ${output_file} |
289 | else | 294 | else |
290 | cat ${cpio_tfile} | gzip -f -9 - > ${output_file} | 295 | (cat ${cpio_tfile} | ${compr} - > ${output_file}) \ |
296 | || (rm -f ${output_file} ; false) | ||
291 | fi | 297 | fi |
292 | [ -z ${cpio_file} ] && rm ${cpio_tfile} | 298 | [ -z ${cpio_file} ] && rm ${cpio_tfile} |
293 | fi | 299 | fi |
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index d40449cafa84..528492bcba5b 100644 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/perl |
2 | 2 | ||
3 | use File::Basename; | 3 | use File::Basename; |
4 | 4 | ||
@@ -29,27 +29,151 @@ my $filename = $vmlinux_name; | |||
29 | my $target = "0"; | 29 | my $target = "0"; |
30 | my $function; | 30 | my $function; |
31 | my $module = ""; | 31 | my $module = ""; |
32 | my $func_offset; | 32 | my $func_offset = 0; |
33 | my $vmaoffset = 0; | 33 | my $vmaoffset = 0; |
34 | 34 | ||
35 | my %regs; | ||
36 | |||
37 | |||
38 | sub parse_x86_regs | ||
39 | { | ||
40 | my ($line) = @_; | ||
41 | if ($line =~ /EAX: ([0-9a-f]+) EBX: ([0-9a-f]+) ECX: ([0-9a-f]+) EDX: ([0-9a-f]+)/) { | ||
42 | $regs{"%eax"} = $1; | ||
43 | $regs{"%ebx"} = $2; | ||
44 | $regs{"%ecx"} = $3; | ||
45 | $regs{"%edx"} = $4; | ||
46 | } | ||
47 | if ($line =~ /ESI: ([0-9a-f]+) EDI: ([0-9a-f]+) EBP: ([0-9a-f]+) ESP: ([0-9a-f]+)/) { | ||
48 | $regs{"%esi"} = $1; | ||
49 | $regs{"%edi"} = $2; | ||
50 | $regs{"%esp"} = $4; | ||
51 | } | ||
52 | if ($line =~ /RAX: ([0-9a-f]+) RBX: ([0-9a-f]+) RCX: ([0-9a-f]+)/) { | ||
53 | $regs{"%eax"} = $1; | ||
54 | $regs{"%ebx"} = $2; | ||
55 | $regs{"%ecx"} = $3; | ||
56 | } | ||
57 | if ($line =~ /RDX: ([0-9a-f]+) RSI: ([0-9a-f]+) RDI: ([0-9a-f]+)/) { | ||
58 | $regs{"%edx"} = $1; | ||
59 | $regs{"%esi"} = $2; | ||
60 | $regs{"%edi"} = $3; | ||
61 | } | ||
62 | if ($line =~ /RBP: ([0-9a-f]+) R08: ([0-9a-f]+) R09: ([0-9a-f]+)/) { | ||
63 | $regs{"%r08"} = $2; | ||
64 | $regs{"%r09"} = $3; | ||
65 | } | ||
66 | if ($line =~ /R10: ([0-9a-f]+) R11: ([0-9a-f]+) R12: ([0-9a-f]+)/) { | ||
67 | $regs{"%r10"} = $1; | ||
68 | $regs{"%r11"} = $2; | ||
69 | $regs{"%r12"} = $3; | ||
70 | } | ||
71 | if ($line =~ /R13: ([0-9a-f]+) R14: ([0-9a-f]+) R15: ([0-9a-f]+)/) { | ||
72 | $regs{"%r13"} = $1; | ||
73 | $regs{"%r14"} = $2; | ||
74 | $regs{"%r15"} = $3; | ||
75 | } | ||
76 | } | ||
77 | |||
78 | sub reg_name | ||
79 | { | ||
80 | my ($reg) = @_; | ||
81 | $reg =~ s/r(.)x/e\1x/; | ||
82 | $reg =~ s/r(.)i/e\1i/; | ||
83 | $reg =~ s/r(.)p/e\1p/; | ||
84 | return $reg; | ||
85 | } | ||
86 | |||
87 | sub process_x86_regs | ||
88 | { | ||
89 | my ($line, $cntr) = @_; | ||
90 | my $str = ""; | ||
91 | if (length($line) < 40) { | ||
92 | return ""; # not an asm istruction | ||
93 | } | ||
94 | |||
95 | # find the arguments to the instruction | ||
96 | if ($line =~ /([0-9a-zA-Z\,\%\(\)\-\+]+)$/) { | ||
97 | $lastword = $1; | ||
98 | } else { | ||
99 | return ""; | ||
100 | } | ||
101 | |||
102 | # we need to find the registers that get clobbered, | ||
103 | # since their value is no longer relevant for previous | ||
104 | # instructions in the stream. | ||
105 | |||
106 | $clobber = $lastword; | ||
107 | # first, remove all memory operands, they're read only | ||
108 | $clobber =~ s/\([a-z0-9\%\,]+\)//g; | ||
109 | # then, remove everything before the comma, thats the read part | ||
110 | $clobber =~ s/.*\,//g; | ||
111 | |||
112 | # if this is the instruction that faulted, we haven't actually done | ||
113 | # the write yet... nothing is clobbered. | ||
114 | if ($cntr == 0) { | ||
115 | $clobber = ""; | ||
116 | } | ||
117 | |||
118 | foreach $reg (keys(%regs)) { | ||
119 | my $clobberprime = reg_name($clobber); | ||
120 | my $lastwordprime = reg_name($lastword); | ||
121 | my $val = $regs{$reg}; | ||
122 | if ($val =~ /^[0]+$/) { | ||
123 | $val = "0"; | ||
124 | } else { | ||
125 | $val =~ s/^0*//; | ||
126 | } | ||
127 | |||
128 | # first check if we're clobbering this register; if we do | ||
129 | # we print it with a =>, and then delete its value | ||
130 | if ($clobber =~ /$reg/ || $clobberprime =~ /$reg/) { | ||
131 | if (length($val) > 0) { | ||
132 | $str = $str . " $reg => $val "; | ||
133 | } | ||
134 | $regs{$reg} = ""; | ||
135 | $val = ""; | ||
136 | } | ||
137 | # now check if we're reading this register | ||
138 | if ($lastword =~ /$reg/ || $lastwordprime =~ /$reg/) { | ||
139 | if (length($val) > 0) { | ||
140 | $str = $str . " $reg = $val "; | ||
141 | } | ||
142 | } | ||
143 | } | ||
144 | return $str; | ||
145 | } | ||
146 | |||
147 | # parse the oops | ||
35 | while (<STDIN>) { | 148 | while (<STDIN>) { |
36 | my $line = $_; | 149 | my $line = $_; |
37 | if ($line =~ /EIP: 0060:\[\<([a-z0-9]+)\>\]/) { | 150 | if ($line =~ /EIP: 0060:\[\<([a-z0-9]+)\>\]/) { |
38 | $target = $1; | 151 | $target = $1; |
39 | } | 152 | } |
153 | if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) { | ||
154 | $target = $1; | ||
155 | } | ||
40 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { | 156 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { |
41 | $function = $1; | 157 | $function = $1; |
42 | $func_offset = $2; | 158 | $func_offset = $2; |
43 | } | 159 | } |
160 | if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { | ||
161 | $function = $1; | ||
162 | $func_offset = $2; | ||
163 | } | ||
44 | 164 | ||
45 | # check if it's a module | 165 | # check if it's a module |
46 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]+\W\[([a-zA-Z0-9\_\-]+)\]/) { | 166 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]+\W\[([a-zA-Z0-9\_\-]+)\]/) { |
47 | $module = $3; | 167 | $module = $3; |
48 | } | 168 | } |
169 | if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]+\W\[([a-zA-Z0-9\_\-]+)\]/) { | ||
170 | $module = $3; | ||
171 | } | ||
172 | parse_x86_regs($line); | ||
49 | } | 173 | } |
50 | 174 | ||
51 | my $decodestart = hex($target) - hex($func_offset); | 175 | my $decodestart = hex($target) - hex($func_offset); |
52 | my $decodestop = $decodestart + 8192; | 176 | my $decodestop = hex($target) + 8192; |
53 | if ($target eq "0") { | 177 | if ($target eq "0") { |
54 | print "No oops found!\n"; | 178 | print "No oops found!\n"; |
55 | print "Usage: \n"; | 179 | print "Usage: \n"; |
@@ -84,6 +208,7 @@ my $counter = 0; | |||
84 | my $state = 0; | 208 | my $state = 0; |
85 | my $center = 0; | 209 | my $center = 0; |
86 | my @lines; | 210 | my @lines; |
211 | my @reglines; | ||
87 | 212 | ||
88 | sub InRange { | 213 | sub InRange { |
89 | my ($address, $target) = @_; | 214 | my ($address, $target) = @_; |
@@ -188,16 +313,36 @@ while ($finish < $counter) { | |||
188 | 313 | ||
189 | my $i; | 314 | my $i; |
190 | 315 | ||
191 | my $fulltext = ""; | 316 | |
317 | # start annotating the registers in the asm. | ||
318 | # this goes from the oopsing point back, so that the annotator | ||
319 | # can track (opportunistically) which registers got written and | ||
320 | # whos value no longer is relevant. | ||
321 | |||
322 | $i = $center; | ||
323 | while ($i >= $start) { | ||
324 | $reglines[$i] = process_x86_regs($lines[$i], $center - $i); | ||
325 | $i = $i - 1; | ||
326 | } | ||
327 | |||
192 | $i = $start; | 328 | $i = $start; |
193 | while ($i < $finish) { | 329 | while ($i < $finish) { |
330 | my $line; | ||
194 | if ($i == $center) { | 331 | if ($i == $center) { |
195 | $fulltext = $fulltext . "*$lines[$i] <----- faulting instruction\n"; | 332 | $line = "*$lines[$i] "; |
196 | } else { | 333 | } else { |
197 | $fulltext = $fulltext . " $lines[$i]\n"; | 334 | $line = " $lines[$i] "; |
335 | } | ||
336 | print $line; | ||
337 | if (defined($reglines[$i]) && length($reglines[$i]) > 0) { | ||
338 | my $c = 60 - length($line); | ||
339 | while ($c > 0) { print " "; $c = $c - 1; }; | ||
340 | print "| $reglines[$i]"; | ||
198 | } | 341 | } |
342 | if ($i == $center) { | ||
343 | print "<--- faulting instruction"; | ||
344 | } | ||
345 | print "\n"; | ||
199 | $i = $i +1; | 346 | $i = $i +1; |
200 | } | 347 | } |
201 | 348 | ||
202 | print $fulltext; | ||
203 | |||
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 491b8b1b6abf..4eea60b1693e 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -210,6 +210,7 @@ static void do_usb_table(void *symval, unsigned long size, | |||
210 | static int do_hid_entry(const char *filename, | 210 | static int do_hid_entry(const char *filename, |
211 | struct hid_device_id *id, char *alias) | 211 | struct hid_device_id *id, char *alias) |
212 | { | 212 | { |
213 | id->bus = TO_NATIVE(id->bus); | ||
213 | id->vendor = TO_NATIVE(id->vendor); | 214 | id->vendor = TO_NATIVE(id->vendor); |
214 | id->product = TO_NATIVE(id->product); | 215 | id->product = TO_NATIVE(id->product); |
215 | 216 | ||
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 2500886fb90a..ee448cdc6a2b 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec | |||
@@ -86,6 +86,14 @@ echo "%endif" | |||
86 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" | 86 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" |
87 | 87 | ||
88 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" | 88 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" |
89 | |||
90 | echo "%ifnarch ppc64" | ||
91 | echo 'cp vmlinux vmlinux.orig' | ||
92 | echo 'bzip2 -9 vmlinux' | ||
93 | echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" | ||
94 | echo 'mv vmlinux.orig vmlinux' | ||
95 | echo "%endif" | ||
96 | |||
89 | echo "" | 97 | echo "" |
90 | echo "%clean" | 98 | echo "%clean" |
91 | echo '#echo -rf $RPM_BUILD_ROOT' | 99 | echo '#echo -rf $RPM_BUILD_ROOT' |
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index f6946cf99ce1..f1c4b35bc324 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion | |||
@@ -58,14 +58,7 @@ fi | |||
58 | # Check for svn and a svn repo. | 58 | # Check for svn and a svn repo. |
59 | if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then | 59 | if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then |
60 | rev=`echo $rev | awk '{print $NF}'` | 60 | rev=`echo $rev | awk '{print $NF}'` |
61 | changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l` | 61 | printf -- '-svn%s' "$rev" |
62 | |||
63 | # Are there uncommitted changes? | ||
64 | if [ $changes != 0 ]; then | ||
65 | printf -- '-svn%s%s' "$rev" -dirty | ||
66 | else | ||
67 | printf -- '-svn%s' "$rev" | ||
68 | fi | ||
69 | 62 | ||
70 | # All done with svn | 63 | # All done with svn |
71 | exit | 64 | exit |
diff --git a/scripts/tags.sh b/scripts/tags.sh index fdbe78bb5e2b..5bd8b1003d44 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -76,7 +76,10 @@ all_sources() | |||
76 | 76 | ||
77 | all_kconfigs() | 77 | all_kconfigs() |
78 | { | 78 | { |
79 | find_sources $ALLSOURCE_ARCHS 'Kconfig*' | 79 | for arch in $ALLSOURCE_ARCHS; do |
80 | find_sources $arch 'Kconfig*' | ||
81 | done | ||
82 | find_other_sources 'Kconfig*' | ||
80 | } | 83 | } |
81 | 84 | ||
82 | all_defconfigs() | 85 | all_defconfigs() |
@@ -99,7 +102,8 @@ exuberant() | |||
99 | -I ____cacheline_internodealigned_in_smp \ | 102 | -I ____cacheline_internodealigned_in_smp \ |
100 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ | 103 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ |
101 | --extra=+f --c-kinds=+px \ | 104 | --extra=+f --c-kinds=+px \ |
102 | --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' | 105 | --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \ |
106 | --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' | ||
103 | 107 | ||
104 | all_kconfigs | xargs $1 -a \ | 108 | all_kconfigs | xargs $1 -a \ |
105 | --langdef=kconfig --language-force=kconfig \ | 109 | --langdef=kconfig --language-force=kconfig \ |
@@ -117,7 +121,9 @@ exuberant() | |||
117 | 121 | ||
118 | emacs() | 122 | emacs() |
119 | { | 123 | { |
120 | all_sources | xargs $1 -a | 124 | all_sources | xargs $1 -a \ |
125 | --regex='/^ENTRY(\([^)]*\)).*/\1/' \ | ||
126 | --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' | ||
121 | 127 | ||
122 | all_kconfigs | xargs $1 -a \ | 128 | all_kconfigs | xargs $1 -a \ |
123 | --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' | 129 | --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' |