All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-05-31 15:26 ` George G. Davis
  0 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-05-31 15:26 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Masahiro Yamada, Michal Marek, linux-kbuild,
	open list
  Cc: George G. Davis

The following error occurs for the `make ARCH=arm64 checkstack` case:

aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
perl ./scripts/checkstack.pl arm64
wrong or unknown architecture "arm64"

Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
ARCH=arm64 case.

Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 11358153d8f2..3e615e8553c0 100644
--- a/Makefile
+++ b/Makefile
@@ -1695,7 +1695,11 @@ PHONY += checkstack kernelrelease kernelversion image_name
 ifeq ($(ARCH), um)
 CHECKSTACK_ARCH := $(SUBARCH)
 else
-CHECKSTACK_ARCH := $(ARCH)
+	ifeq ($(ARCH), arm64)
+		CHECKSTACK_ARCH := aarch64
+	else
+		CHECKSTACK_ARCH := $(ARCH)
+	endif
 endif
 checkstack:
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-05-31 15:26 ` George G. Davis
  0 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-05-31 15:26 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Masahiro Yamada, Michal Marek, linux-kbuild,
	open list
  Cc: George G. Davis

The following error occurs for the `make ARCH=arm64 checkstack` case:

aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
perl ./scripts/checkstack.pl arm64
wrong or unknown architecture "arm64"

Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
ARCH=arm64 case.

Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 11358153d8f2..3e615e8553c0 100644
--- a/Makefile
+++ b/Makefile
@@ -1695,7 +1695,11 @@ PHONY += checkstack kernelrelease kernelversion image_name
 ifeq ($(ARCH), um)
 CHECKSTACK_ARCH := $(SUBARCH)
 else
-CHECKSTACK_ARCH := $(ARCH)
+	ifeq ($(ARCH), arm64)
+		CHECKSTACK_ARCH := aarch64
+	else
+		CHECKSTACK_ARCH := $(ARCH)
+	endif
 endif
 checkstack:
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-05-31 15:26 ` George G. Davis
  0 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-05-31 15:26 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Masahiro Yamada, Michal Marek, linux-kbuild,
	open list
  Cc: George G. Davis

The following error occurs for the `make ARCH=arm64 checkstack` case:

aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
perl ./scripts/checkstack.pl arm64
wrong or unknown architecture "arm64"

Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
ARCH=arm64 case.

Signed-off-by: George G. Davis <george_davis@mentor.com>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 11358153d8f2..3e615e8553c0 100644
--- a/Makefile
+++ b/Makefile
@@ -1695,7 +1695,11 @@ PHONY += checkstack kernelrelease kernelversion image_name
 ifeq ($(ARCH), um)
 CHECKSTACK_ARCH := $(SUBARCH)
 else
-CHECKSTACK_ARCH := $(ARCH)
+	ifeq ($(ARCH), arm64)
+		CHECKSTACK_ARCH := aarch64
+	else
+		CHECKSTACK_ARCH := $(ARCH)
+	endif
 endif
 checkstack:
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
  2019-05-31 15:26 ` George G. Davis
@ 2019-05-31 16:02   ` Masahiro Yamada
  -1 siblings, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2019-05-31 16:02 UTC (permalink / raw)
  To: George G. Davis
  Cc: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Michal Marek, Linux Kbuild mailing list,
	open list

On Sat, Jun 1, 2019 at 12:27 AM George G. Davis <george_davis@mentor.com> wrote:
>
> The following error occurs for the `make ARCH=arm64 checkstack` case:
>
> aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
> perl ./scripts/checkstack.pl arm64
> wrong or unknown architecture "arm64"
>
> Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
> ARCH=arm64 case.
>
> Signed-off-by: George G. Davis <george_davis@mentor.com>


Why don't you fix scripts/checkstack.pl ?



> ---
>  Makefile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 11358153d8f2..3e615e8553c0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1695,7 +1695,11 @@ PHONY += checkstack kernelrelease kernelversion image_name
>  ifeq ($(ARCH), um)
>  CHECKSTACK_ARCH := $(SUBARCH)
>  else
> -CHECKSTACK_ARCH := $(ARCH)
> +       ifeq ($(ARCH), arm64)
> +               CHECKSTACK_ARCH := aarch64
> +       else
> +               CHECKSTACK_ARCH := $(ARCH)
> +       endif
>  endif
>  checkstack:
>         $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-05-31 16:02   ` Masahiro Yamada
  0 siblings, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2019-05-31 16:02 UTC (permalink / raw)
  To: George G. Davis
  Cc: Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Will Deacon, open list, Joe Perches, Andy Whitcroft,
	linux-arm-kernel

On Sat, Jun 1, 2019 at 12:27 AM George G. Davis <george_davis@mentor.com> wrote:
>
> The following error occurs for the `make ARCH=arm64 checkstack` case:
>
> aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
> perl ./scripts/checkstack.pl arm64
> wrong or unknown architecture "arm64"
>
> Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
> ARCH=arm64 case.
>
> Signed-off-by: George G. Davis <george_davis@mentor.com>


Why don't you fix scripts/checkstack.pl ?



> ---
>  Makefile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 11358153d8f2..3e615e8553c0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1695,7 +1695,11 @@ PHONY += checkstack kernelrelease kernelversion image_name
>  ifeq ($(ARCH), um)
>  CHECKSTACK_ARCH := $(SUBARCH)
>  else
> -CHECKSTACK_ARCH := $(ARCH)
> +       ifeq ($(ARCH), arm64)
> +               CHECKSTACK_ARCH := aarch64
> +       else
> +               CHECKSTACK_ARCH := $(ARCH)
> +       endif
>  endif
>  checkstack:
>         $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
  2019-05-31 16:02   ` Masahiro Yamada
@ 2019-05-31 16:39     ` George G. Davis
  -1 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-05-31 16:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Michal Marek, Linux Kbuild mailing list,
	open list

Hello Masahiro,

On Sat, Jun 01, 2019 at 01:02:37AM +0900, Masahiro Yamada wrote:
> On Sat, Jun 1, 2019 at 12:27 AM George G. Davis <george_davis@mentor.com> wrote:
> >
> > The following error occurs for the `make ARCH=arm64 checkstack` case:
> >
> > aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
> > perl ./scripts/checkstack.pl arm64
> > wrong or unknown architecture "arm64"
> >
> > Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
> > ARCH=arm64 case.
> >
> > Signed-off-by: George G. Davis <george_davis@mentor.com>
> 
> 
> Why don't you fix scripts/checkstack.pl ?

Like so?:


diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 122aef5e4e14..8502de57e2ef 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -41,6 +41,8 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
 	if ($arch eq "") {
 		$arch = `uname -m`;
 		chomp($arch);
+	} elsif ($arch eq 'arm64') {
+		$arch = "aarch64";
 	}
 
 	$x	= "[0-9a-f]";	# hex character


Thanks!

> > diff --git a/Makefile b/Makefile
> > index 11358153d8f2..3e615e8553c0 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1695,7 +1695,11 @@ PHONY += checkstack kernelrelease kernelversion image_name
> >  ifeq ($(ARCH), um)
> >  CHECKSTACK_ARCH := $(SUBARCH)
> >  else
> > -CHECKSTACK_ARCH := $(ARCH)
> > +       ifeq ($(ARCH), arm64)
> > +               CHECKSTACK_ARCH := aarch64
> > +       else
> > +               CHECKSTACK_ARCH := $(ARCH)
> > +       endif
> >  endif
> >  checkstack:
> >         $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
> > --
> > 2.7.4
> >
> 
> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Regards,
George

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-05-31 16:39     ` George G. Davis
  0 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-05-31 16:39 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Will Deacon, open list, Joe Perches, Andy Whitcroft,
	linux-arm-kernel

Hello Masahiro,

On Sat, Jun 01, 2019 at 01:02:37AM +0900, Masahiro Yamada wrote:
> On Sat, Jun 1, 2019 at 12:27 AM George G. Davis <george_davis@mentor.com> wrote:
> >
> > The following error occurs for the `make ARCH=arm64 checkstack` case:
> >
> > aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
> > perl ./scripts/checkstack.pl arm64
> > wrong or unknown architecture "arm64"
> >
> > Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
> > ARCH=arm64 case.
> >
> > Signed-off-by: George G. Davis <george_davis@mentor.com>
> 
> 
> Why don't you fix scripts/checkstack.pl ?

Like so?:


diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 122aef5e4e14..8502de57e2ef 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -41,6 +41,8 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
 	if ($arch eq "") {
 		$arch = `uname -m`;
 		chomp($arch);
+	} elsif ($arch eq 'arm64') {
+		$arch = "aarch64";
 	}
 
 	$x	= "[0-9a-f]";	# hex character


Thanks!

> > diff --git a/Makefile b/Makefile
> > index 11358153d8f2..3e615e8553c0 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1695,7 +1695,11 @@ PHONY += checkstack kernelrelease kernelversion image_name
> >  ifeq ($(ARCH), um)
> >  CHECKSTACK_ARCH := $(SUBARCH)
> >  else
> > -CHECKSTACK_ARCH := $(ARCH)
> > +       ifeq ($(ARCH), arm64)
> > +               CHECKSTACK_ARCH := aarch64
> > +       else
> > +               CHECKSTACK_ARCH := $(ARCH)
> > +       endif
> >  endif
> >  checkstack:
> >         $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
> > --
> > 2.7.4
> >
> 
> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Regards,
George

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
  2019-05-31 16:39     ` George G. Davis
@ 2019-05-31 17:22       ` Masahiro Yamada
  -1 siblings, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2019-05-31 17:22 UTC (permalink / raw)
  To: George G. Davis
  Cc: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Michal Marek, Linux Kbuild mailing list,
	open list

On Sat, Jun 1, 2019 at 1:39 AM George G. Davis <george_davis@mentor.com> wrote:
>
> Hello Masahiro,
>
> On Sat, Jun 01, 2019 at 01:02:37AM +0900, Masahiro Yamada wrote:
> > On Sat, Jun 1, 2019 at 12:27 AM George G. Davis <george_davis@mentor.com> wrote:
> > >
> > > The following error occurs for the `make ARCH=arm64 checkstack` case:
> > >
> > > aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
> > > perl ./scripts/checkstack.pl arm64
> > > wrong or unknown architecture "arm64"
> > >
> > > Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
> > > ARCH=arm64 case.
> > >
> > > Signed-off-by: George G. Davis <george_davis@mentor.com>
> >
> >
> > Why don't you fix scripts/checkstack.pl ?
>
> Like so?:
>

As far as I understood, checkstack.pl is supposed to
understand both ARCH= and 'uname -m'.


For example, the following commit supports x86, x86_64, i386,
by using regular expression.

commit fda9f9903be6c3b590472c175c514b0834bb3c83
Author: Konstantin Khlebnikov <koct9i@gmail.com>
Date:   Fri Aug 8 14:23:35 2014 -0700

    scripts/checkstack.pl: automatically handle 32-bit and 64-bit mode
for ARCH=x86

    This patch adds support for ARCH=x86 into checkstack.



Following this pattern, does this work for you?

diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 122aef5e4e14..371bd17a4983 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
        $x      = "[0-9a-f]";   # hex character
        $xs     = "[0-9a-f ]";  # hex character or space
        $funcre = qr/^$x* <(.*)>:$/;
-       if ($arch eq 'aarch64') {
+       if ($arch =~ '^(aarch|arm)64$') {
                #ffffffc0006325cc:       a9bb7bfd        stp     x29,
x30, [sp, #-80]!
                #a110:       d11643ff        sub     sp, sp, #0x590
                $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-05-31 17:22       ` Masahiro Yamada
  0 siblings, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2019-05-31 17:22 UTC (permalink / raw)
  To: George G. Davis
  Cc: Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Will Deacon, open list, Joe Perches, Andy Whitcroft,
	linux-arm-kernel

On Sat, Jun 1, 2019 at 1:39 AM George G. Davis <george_davis@mentor.com> wrote:
>
> Hello Masahiro,
>
> On Sat, Jun 01, 2019 at 01:02:37AM +0900, Masahiro Yamada wrote:
> > On Sat, Jun 1, 2019 at 12:27 AM George G. Davis <george_davis@mentor.com> wrote:
> > >
> > > The following error occurs for the `make ARCH=arm64 checkstack` case:
> > >
> > > aarch64-linux-gnu-objdump -d vmlinux $(find . -name '*.ko') | \
> > > perl ./scripts/checkstack.pl arm64
> > > wrong or unknown architecture "arm64"
> > >
> > > Fix the above error by setting `CHECKSTACK_ARCH := aarch64` for the
> > > ARCH=arm64 case.
> > >
> > > Signed-off-by: George G. Davis <george_davis@mentor.com>
> >
> >
> > Why don't you fix scripts/checkstack.pl ?
>
> Like so?:
>

As far as I understood, checkstack.pl is supposed to
understand both ARCH= and 'uname -m'.


For example, the following commit supports x86, x86_64, i386,
by using regular expression.

commit fda9f9903be6c3b590472c175c514b0834bb3c83
Author: Konstantin Khlebnikov <koct9i@gmail.com>
Date:   Fri Aug 8 14:23:35 2014 -0700

    scripts/checkstack.pl: automatically handle 32-bit and 64-bit mode
for ARCH=x86

    This patch adds support for ARCH=x86 into checkstack.



Following this pattern, does this work for you?

diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 122aef5e4e14..371bd17a4983 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
        $x      = "[0-9a-f]";   # hex character
        $xs     = "[0-9a-f ]";  # hex character or space
        $funcre = qr/^$x* <(.*)>:$/;
-       if ($arch eq 'aarch64') {
+       if ($arch =~ '^(aarch|arm)64$') {
                #ffffffc0006325cc:       a9bb7bfd        stp     x29,
x30, [sp, #-80]!
                #a110:       d11643ff        sub     sp, sp, #0x590
                $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;



-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
  2019-05-31 17:22       ` Masahiro Yamada
@ 2019-05-31 17:45         ` George G. Davis
  -1 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-05-31 17:45 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Michal Marek, Linux Kbuild mailing list,
	open list

Hello Masahiro,

On Sat, Jun 01, 2019 at 02:22:36AM +0900, Masahiro Yamada wrote:

// CUT

> As far as I understood, checkstack.pl is supposed to
> understand both ARCH= and 'uname -m'.
> 
> 
> For example, the following commit supports x86, x86_64, i386,
> by using regular expression.
> 
> commit fda9f9903be6c3b590472c175c514b0834bb3c83
> Author: Konstantin Khlebnikov <koct9i@gmail.com>
> Date:   Fri Aug 8 14:23:35 2014 -0700
> 
>     scripts/checkstack.pl: automatically handle 32-bit and 64-bit mode
> for ARCH=x86
> 
>     This patch adds support for ARCH=x86 into checkstack.
> 
> 
> 
> Following this pattern, does this work for you?
> 
> diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
> index 122aef5e4e14..371bd17a4983 100755
> --- a/scripts/checkstack.pl
> +++ b/scripts/checkstack.pl
> @@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
>         $x      = "[0-9a-f]";   # hex character
>         $xs     = "[0-9a-f ]";  # hex character or space
>         $funcre = qr/^$x* <(.*)>:$/;
> -       if ($arch eq 'aarch64') {
> +       if ($arch =~ '^(aarch|arm)64$') {

Yes, that works, thanks!

Will you submit a fix or would you like me to resubmit with the above suggested
fix?


Thanks again!

>                 #ffffffc0006325cc:       a9bb7bfd        stp     x29,
> x30, [sp, #-80]!
>                 #a110:       d11643ff        sub     sp, sp, #0x590
>                 $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;
> 
> 
> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Regards,
George

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-05-31 17:45         ` George G. Davis
  0 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-05-31 17:45 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Will Deacon, open list, Joe Perches, Andy Whitcroft,
	linux-arm-kernel

Hello Masahiro,

On Sat, Jun 01, 2019 at 02:22:36AM +0900, Masahiro Yamada wrote:

// CUT

> As far as I understood, checkstack.pl is supposed to
> understand both ARCH= and 'uname -m'.
> 
> 
> For example, the following commit supports x86, x86_64, i386,
> by using regular expression.
> 
> commit fda9f9903be6c3b590472c175c514b0834bb3c83
> Author: Konstantin Khlebnikov <koct9i@gmail.com>
> Date:   Fri Aug 8 14:23:35 2014 -0700
> 
>     scripts/checkstack.pl: automatically handle 32-bit and 64-bit mode
> for ARCH=x86
> 
>     This patch adds support for ARCH=x86 into checkstack.
> 
> 
> 
> Following this pattern, does this work for you?
> 
> diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
> index 122aef5e4e14..371bd17a4983 100755
> --- a/scripts/checkstack.pl
> +++ b/scripts/checkstack.pl
> @@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
>         $x      = "[0-9a-f]";   # hex character
>         $xs     = "[0-9a-f ]";  # hex character or space
>         $funcre = qr/^$x* <(.*)>:$/;
> -       if ($arch eq 'aarch64') {
> +       if ($arch =~ '^(aarch|arm)64$') {

Yes, that works, thanks!

Will you submit a fix or would you like me to resubmit with the above suggested
fix?


Thanks again!

>                 #ffffffc0006325cc:       a9bb7bfd        stp     x29,
> x30, [sp, #-80]!
>                 #a110:       d11643ff        sub     sp, sp, #0x590
>                 $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;
> 
> 
> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Regards,
George

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
  2019-05-31 17:45         ` George G. Davis
@ 2019-06-01  2:09           ` Masahiro Yamada
  -1 siblings, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2019-06-01  2:09 UTC (permalink / raw)
  To: George G. Davis
  Cc: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Michal Marek, Linux Kbuild mailing list,
	open list

On Sat, Jun 1, 2019 at 2:45 AM George G. Davis <george_davis@mentor.com> wrote:
> > Following this pattern, does this work for you?
> >
> > diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
> > index 122aef5e4e14..371bd17a4983 100755
> > --- a/scripts/checkstack.pl
> > +++ b/scripts/checkstack.pl
> > @@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
> >         $x      = "[0-9a-f]";   # hex character
> >         $xs     = "[0-9a-f ]";  # hex character or space
> >         $funcre = qr/^$x* <(.*)>:$/;
> > -       if ($arch eq 'aarch64') {
> > +       if ($arch =~ '^(aarch|arm)64$') {
>
> Yes, that works, thanks!
>
> Will you submit a fix or would you like me to resubmit with the above suggested
> fix?

Please send v2.

Thanks.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-06-01  2:09           ` Masahiro Yamada
  0 siblings, 0 replies; 15+ messages in thread
From: Masahiro Yamada @ 2019-06-01  2:09 UTC (permalink / raw)
  To: George G. Davis
  Cc: Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Will Deacon, open list, Joe Perches, Andy Whitcroft,
	linux-arm-kernel

On Sat, Jun 1, 2019 at 2:45 AM George G. Davis <george_davis@mentor.com> wrote:
> > Following this pattern, does this work for you?
> >
> > diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
> > index 122aef5e4e14..371bd17a4983 100755
> > --- a/scripts/checkstack.pl
> > +++ b/scripts/checkstack.pl
> > @@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
> >         $x      = "[0-9a-f]";   # hex character
> >         $xs     = "[0-9a-f ]";  # hex character or space
> >         $funcre = qr/^$x* <(.*)>:$/;
> > -       if ($arch eq 'aarch64') {
> > +       if ($arch =~ '^(aarch|arm)64$') {
>
> Yes, that works, thanks!
>
> Will you submit a fix or would you like me to resubmit with the above suggested
> fix?

Please send v2.

Thanks.

-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
  2019-06-01  2:09           ` Masahiro Yamada
@ 2019-06-03 14:34             ` George G. Davis
  -1 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-06-03 14:34 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Andy Whitcroft, Joe Perches, Catalin Marinas, Will Deacon,
	linux-arm-kernel, Michal Marek, Linux Kbuild mailing list,
	open list

Hello Masahiro,

On Sat, Jun 01, 2019 at 11:09:15AM +0900, Masahiro Yamada wrote:
> On Sat, Jun 1, 2019 at 2:45 AM George G. Davis <george_davis@mentor.com> wrote:
> > > Following this pattern, does this work for you?
> > >
> > > diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
> > > index 122aef5e4e14..371bd17a4983 100755
> > > --- a/scripts/checkstack.pl
> > > +++ b/scripts/checkstack.pl
> > > @@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
> > >         $x      = "[0-9a-f]";   # hex character
> > >         $xs     = "[0-9a-f ]";  # hex character or space
> > >         $funcre = qr/^$x* <(.*)>:$/;
> > > -       if ($arch eq 'aarch64') {
> > > +       if ($arch =~ '^(aarch|arm)64$') {
> >
> > Yes, that works, thanks!
> >
> > Will you submit a fix or would you like me to resubmit with the above suggested
> > fix?
> 
> Please send v2.

Done:

https://patchwork.kernel.org/patch/10972965/

Thanks!

> 
> Thanks.
> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Regards,
George

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture
@ 2019-06-03 14:34             ` George G. Davis
  0 siblings, 0 replies; 15+ messages in thread
From: George G. Davis @ 2019-06-03 14:34 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Will Deacon, open list, Joe Perches, Andy Whitcroft,
	linux-arm-kernel

Hello Masahiro,

On Sat, Jun 01, 2019 at 11:09:15AM +0900, Masahiro Yamada wrote:
> On Sat, Jun 1, 2019 at 2:45 AM George G. Davis <george_davis@mentor.com> wrote:
> > > Following this pattern, does this work for you?
> > >
> > > diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
> > > index 122aef5e4e14..371bd17a4983 100755
> > > --- a/scripts/checkstack.pl
> > > +++ b/scripts/checkstack.pl
> > > @@ -46,7 +46,7 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
> > >         $x      = "[0-9a-f]";   # hex character
> > >         $xs     = "[0-9a-f ]";  # hex character or space
> > >         $funcre = qr/^$x* <(.*)>:$/;
> > > -       if ($arch eq 'aarch64') {
> > > +       if ($arch =~ '^(aarch|arm)64$') {
> >
> > Yes, that works, thanks!
> >
> > Will you submit a fix or would you like me to resubmit with the above suggested
> > fix?
> 
> Please send v2.

Done:

https://patchwork.kernel.org/patch/10972965/

Thanks!

> 
> Thanks.
> 
> -- 
> Best Regards
> Masahiro Yamada

-- 
Regards,
George

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-06-03 14:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 15:26 [RFC][PATCH] Makefile: Fix checkstack.pl arm64 wrong or unknown architecture George G. Davis
2019-05-31 15:26 ` George G. Davis
2019-05-31 15:26 ` George G. Davis
2019-05-31 16:02 ` Masahiro Yamada
2019-05-31 16:02   ` Masahiro Yamada
2019-05-31 16:39   ` George G. Davis
2019-05-31 16:39     ` George G. Davis
2019-05-31 17:22     ` Masahiro Yamada
2019-05-31 17:22       ` Masahiro Yamada
2019-05-31 17:45       ` George G. Davis
2019-05-31 17:45         ` George G. Davis
2019-06-01  2:09         ` Masahiro Yamada
2019-06-01  2:09           ` Masahiro Yamada
2019-06-03 14:34           ` George G. Davis
2019-06-03 14:34             ` George G. Davis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.