1 From a571eec125138f67c369509be81691a5789e758c Mon Sep 17 00:00:00 2001
2 From: "George G. Davis" <george_davis@mentor.com>
3 Date: Mon, 3 Jun 2019 10:30:39 -0400
4 Subject: scripts/checkstack.pl: Fix arm64 wrong or unknown architecture
6 [ Upstream commit 4f45d62a52297b10ded963412a158685647ecdec ]
8 The following error occurs for the `make ARCH=arm64 checkstack` case:
10 aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
11 perl ./scripts/checkstack.pl arm64
12 wrong or unknown architecture "arm64"
14 As suggested by Masahiro Yamada, fix the above error using regular
15 expressions in the same way it was fixed for the `ARCH=x86` case via
16 commit fda9f9903be6 ("scripts/checkstack.pl: automatically handle
17 32-bit and 64-bit mode for ARCH=x86").
19 Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
20 Signed-off-by: George G. Davis <george_davis@mentor.com>
21 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
22 Signed-off-by: Sasha Levin <sashal@kernel.org>
24 scripts/checkstack.pl | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
27 diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
28 index 122aef5e4e14..371bd17a4983 100755
29 --- a/scripts/checkstack.pl
30 +++ b/scripts/checkstack.pl
31 @@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
32 $x = "[0-9a-f]"; # hex character
33 $xs = "[0-9a-f ]"; # hex character or space
34 $funcre = qr/^$x* <(.*)>:$/;
35 - if ($arch eq 'aarch64') {
36 + if ($arch =~ '^(aarch|arm)64$') {
37 #ffffffc0006325cc: a9bb7bfd stp x29, x30, [sp, #-80]!
38 #a110: d11643ff sub sp, sp, #0x590
39 $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;