From 0e5a47a8d346c798bbb1801c7c5852b652155b72 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 22 Feb 2017 15:40:23 -0800 Subject: scripts/checkstack.pl: add support for nios2 Adjust checkstack.pl for the nios2 architecture. Link: http://lkml.kernel.org/r/20170116113052.15034-1-tklauser@distanz.ch Signed-off-by: Tobias Klauser Cc: Ley Foon Tan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkstack.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/checkstack.pl') diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index dd8397894d5c..694a075381b0 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -78,6 +78,9 @@ my (@stack, $re, $dre, $x, $xs, $funcre); } 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 'nios2') { + #25a8: defffb04 addi sp,sp,-20 + $re = qr/.*addi.*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') { -- cgit From f72deab378db8eadb6d6eb06b6e2b90c9b681c81 Mon Sep 17 00:00:00 2001 From: Stafford Horne Date: Tue, 3 Jan 2017 16:15:03 +0900 Subject: scripts/checkstack.pl: Add openrisc support Openrisc stack pointer is managed by decrementing r1. Add regexes to recognize this. Signed-off-by: Stafford Horne --- scripts/checkstack.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/checkstack.pl') diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index dd8397894d5c..42794348ef35 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -78,6 +78,9 @@ my (@stack, $re, $dre, $x, $xs, $funcre); } 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 'openrisc') { + # c000043c: 9c 21 fe f0 l.addi r1,r1,-272 + $re = qr/.*l\.addi.*r1,r1,-(([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') { -- cgit