libata-acpi: improve dock event handling
[sfrench/cifs-2.6.git] / scripts / checkstack.pl
index 663158627155151d60315059a81f1b02d68af697..340ad6920511aa08a52f5360c54836c682e2deed 100755 (executable)
@@ -2,7 +2,7 @@
 
 #      Check the stack usage of functions
 #
-#      Copyright Joern Engel <joern@wh.fh-wedel.de>
+#      Copyright Joern Engel <joern@lazybastard.org>
 #      Inspired by Linus Torvalds
 #      Original idea maybe from Keith Owens
 #      s390 port and big speedup by Arnd Bergmann <arnd@bergmann-dalldorf.de>
 #      Random bits by Matt Mackall <mpm@selenic.com>
 #      M68k port by Geert Uytterhoeven and Andreas Schwab
 #      AVR32 port by Haavard Skinnemoen <hskinnemoen@atmel.com>
+#      PARISC port by Kyle McMartin <kyle@parisc-linux.org>
 #
 #      Usage:
-#      objdump -d vmlinux | stackcheck.pl [arch]
+#      objdump -d vmlinux | scripts/checkstack.pl [arch]
 #
 #      TODO :  Port to all architectures (one regex per arch)
 
@@ -61,6 +62,8 @@ my (@stack, $re, $x, $xs);
        } elsif ($arch eq 'mips') {
                #88003254:       27bdffe0        addiu   sp,sp,-32
                $re = qr/.*addiu.*sp,sp,-(([0-9]{2}|[3-9])[0-9]{2})/o;
+       } elsif ($arch eq 'parisc' || $arch eq 'parisc64') {
+               $re = qr/.*ldo ($x{1,8})\(sp\),sp/o;
        } elsif ($arch eq 'ppc') {
                #c00029f4:       94 21 ff 30     stwu    r1,-208(r1)
                $re = qr/.*stwu.*r1,-($x{1,8})\(r1\)/o;
@@ -78,6 +81,9 @@ my (@stack, $re, $x, $xs);
                #     pair for larger users. -- PFM.
                #a00048e0:       d4fc40f0        addi.l  r15,-240,r15
                $re = qr/.*addi\.l.*r15,-(([0-9]{2}|[3-9])[0-9]{2}),r15/o;
+       } elsif ($arch =~ /^blackfin$/) {
+               #   0:   00 e8 38 01     LINK 0x4e0;
+               $re = qr/.*[[:space:]]LINK[[:space:]]*(0x$x{1,8})/o;
        } else {
                print("wrong or unknown architecture\n");
                exit