aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-10-13 09:58:23 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-10-13 09:58:23 -0400
commitebf8889bd1fe3615991ff4494635d237280652a2 (patch)
tree10fb735717122bbb86474339eac07f26e7ccdf40 /scripts
parentb160292cc216a50fd0cd386b0bda2cd48352c73b (diff)
parent752097cec53eea111d087c545179b421e2bde98a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkstack.pl5
-rwxr-xr-xscripts/checksyscalls.sh2
-rw-r--r--scripts/mod/file2alias.c38
-rw-r--r--scripts/mod/modpost.c1
-rwxr-xr-xscripts/namespace.pl8
5 files changed, 49 insertions, 5 deletions
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index f7844f6aa487..663158627155 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -12,6 +12,7 @@
12# sh64 port by Paul Mundt 12# sh64 port by Paul Mundt
13# Random bits by Matt Mackall <mpm@selenic.com> 13# Random bits by Matt Mackall <mpm@selenic.com>
14# M68k port by Geert Uytterhoeven and Andreas Schwab 14# M68k port by Geert Uytterhoeven and Andreas Schwab
15# AVR32 port by Haavard Skinnemoen <hskinnemoen@atmel.com>
15# 16#
16# Usage: 17# Usage:
17# objdump -d vmlinux | stackcheck.pl [arch] 18# objdump -d vmlinux | stackcheck.pl [arch]
@@ -37,6 +38,10 @@ my (@stack, $re, $x, $xs);
37 if ($arch eq 'arm') { 38 if ($arch eq 'arm') {
38 #c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64 39 #c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64
39 $re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o; 40 $re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
41 } elsif ($arch eq 'avr32') {
42 #8000008a: 20 1d sub sp,4
43 #80000ca8: fa cd 05 b0 sub sp,sp,1456
44 $re = qr/^.*sub.*sp.*,([0-9]{1,8})/o;
40 } elsif ($arch =~ /^i[3456]86$/) { 45 } elsif ($arch =~ /^i[3456]86$/) {
41 #c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp 46 #c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp
42 $re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%esp$/o; 47 $re = qr/^.*[as][du][db] \$(0x$x{1,8}),\%esp$/o;
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index 0dcc01ce45a6..366f8c7f62bf 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -119,5 +119,5 @@ sed -n -e '/^\#define/ { s/[^_]*__NR_\([^[:space:]]*\).*/\
119\#endif/p }' $1 119\#endif/p }' $1
120} 120}
121 121
122(ignore_list && syscall_list ${srctree}/include/asm-i386/unistd.h) | \ 122(ignore_list && syscall_list ${srctree}/include/asm-x86/unistd_32.h) | \
123$* -E -x c - > /dev/null 123$* -E -x c - > /dev/null
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 8a09021d8c59..36e3754db53a 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -484,6 +484,36 @@ static int do_parisc_entry(const char *filename, struct parisc_device_id *id,
484 return 1; 484 return 1;
485} 485}
486 486
487/* Looks like: sdio:cNvNdN. */
488static int do_sdio_entry(const char *filename,
489 struct sdio_device_id *id, char *alias)
490{
491 id->class = TO_NATIVE(id->class);
492 id->vendor = TO_NATIVE(id->vendor);
493 id->device = TO_NATIVE(id->device);
494
495 strcpy(alias, "sdio:");
496 ADD(alias, "c", id->class != (__u8)SDIO_ANY_ID, id->class);
497 ADD(alias, "v", id->vendor != (__u16)SDIO_ANY_ID, id->vendor);
498 ADD(alias, "d", id->device != (__u16)SDIO_ANY_ID, id->device);
499 return 1;
500}
501
502/* Looks like: ssb:vNidNrevN. */
503static int do_ssb_entry(const char *filename,
504 struct ssb_device_id *id, char *alias)
505{
506 id->vendor = TO_NATIVE(id->vendor);
507 id->coreid = TO_NATIVE(id->coreid);
508 id->revision = TO_NATIVE(id->revision);
509
510 strcpy(alias, "ssb:");
511 ADD(alias, "v", id->vendor != SSB_ANY_VENDOR, id->vendor);
512 ADD(alias, "id", id->coreid != SSB_ANY_ID, id->coreid);
513 ADD(alias, "rev", id->revision != SSB_ANY_REV, id->revision);
514 return 1;
515}
516
487/* Ignore any prefix, eg. v850 prepends _ */ 517/* Ignore any prefix, eg. v850 prepends _ */
488static inline int sym_is(const char *symbol, const char *name) 518static inline int sym_is(const char *symbol, const char *name)
489{ 519{
@@ -599,6 +629,14 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
599 do_table(symval, sym->st_size, 629 do_table(symval, sym->st_size,
600 sizeof(struct parisc_device_id), "parisc", 630 sizeof(struct parisc_device_id), "parisc",
601 do_parisc_entry, mod); 631 do_parisc_entry, mod);
632 else if (sym_is(symname, "__mod_sdio_device_table"))
633 do_table(symval, sym->st_size,
634 sizeof(struct sdio_device_id), "sdio",
635 do_sdio_entry, mod);
636 else if (sym_is(symname, "__mod_ssb_device_table"))
637 do_table(symval, sym->st_size,
638 sizeof(struct ssb_device_id), "ssb",
639 do_ssb_entry, mod);
602} 640}
603 641
604/* Now add out buffered information to the generated C source */ 642/* Now add out buffered information to the generated C source */
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6c145d6e89de..0a4051fbd34e 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -709,6 +709,7 @@ static int secref_whitelist(const char *modname, const char *tosec,
709 709
710 /* Check for pattern 0 */ 710 /* Check for pattern 0 */
711 if ((strncmp(fromsec, ".text.init.refok", strlen(".text.init.refok")) == 0) || 711 if ((strncmp(fromsec, ".text.init.refok", strlen(".text.init.refok")) == 0) ||
712 (strncmp(fromsec, ".exit.text.refok", strlen(".exit.text.refok")) == 0) ||
712 (strncmp(fromsec, ".data.init.refok", strlen(".data.init.refok")) == 0)) 713 (strncmp(fromsec, ".data.init.refok", strlen(".data.init.refok")) == 0))
713 return 1; 714 return 1;
714 715
diff --git a/scripts/namespace.pl b/scripts/namespace.pl
index f34373853ef8..c6e88c652c2f 100755
--- a/scripts/namespace.pl
+++ b/scripts/namespace.pl
@@ -105,7 +105,7 @@ sub linux_objects
105 if (/.*\.o$/ && 105 if (/.*\.o$/ &&
106 ! ( 106 ! (
107 m:/built-in.o$: 107 m:/built-in.o$:
108 || m:arch/i386/kernel/vsyscall-syms.o$: 108 || m:arch/x86/kernel/vsyscall-syms.o$:
109 || m:arch/ia64/ia32/ia32.o$: 109 || m:arch/ia64/ia32/ia32.o$:
110 || m:arch/ia64/kernel/gate-syms.o$: 110 || m:arch/ia64/kernel/gate-syms.o$:
111 || m:arch/ia64/lib/__divdi3.o$: 111 || m:arch/ia64/lib/__divdi3.o$:
@@ -328,9 +328,9 @@ sub list_multiply_defined
328 } 328 }
329 # Special case for i386 entry code 329 # Special case for i386 entry code
330 if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ && 330 if ($#{$def{$name}} == 1 && $name =~ /^__kernel_/ &&
331 $def{$name}[0] eq "arch/i386/kernel/vsyscall-int80.o" && 331 $def{$name}[0] eq "arch/x86/kernel/vsyscall-int80_32.o" &&
332 $def{$name}[1] eq "arch/i386/kernel/vsyscall-sysenter.o") { 332 $def{$name}[1] eq "arch/x86/kernel/vsyscall-sysenter_32.o") {
333 &drop_def("arch/i386/kernel/vsyscall-sysenter.o", $name); 333 &drop_def("arch/x86/kernel/vsyscall-sysenter_32.o", $name);
334 next; 334 next;
335 } 335 }
336 printf "$name is multiply defined in :-\n"; 336 printf "$name is multiply defined in :-\n";