ARCv2: [plat-hsdk]: Save accl reg pair by default
authorVineet Gupta <vgupta@synopsys.com>
Tue, 17 Jul 2018 22:21:56 +0000 (15:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jul 2018 09:25:07 +0000 (11:25 +0200)
commit af1fc5baa724c63ce1733dfcf855bad5ef6078e3 upstream.

This manifsted as strace segfaulting on HSDK because gcc was targetting
the accumulator registers as GPRs, which kernek was not saving/restoring
by default.

Cc: stable@vger.kernel.org #4.14+
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/Kconfig
arch/arc/plat-hsdk/Kconfig

index 4383313b064a0439a74a8b8184d210d0d9160a12..5c8caf85c35054722402d86f58033820d3de7640 100644 (file)
@@ -408,7 +408,7 @@ config ARC_HAS_DIV_REM
 
 config ARC_HAS_ACCL_REGS
        bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)"
-       default n
+       default y
        help
          Depending on the configuration, CPU can contain accumulator reg-pair
          (also referred to as r58:r59). These can also be used by gcc as GPR so
index 19ab3cf98f0f34904b8431a6d4cf36642066c513..fcc9a9e27e9cb6696c333d93a9cda99a0ebfc5a8 100644 (file)
@@ -7,5 +7,7 @@
 
 menuconfig ARC_SOC_HSDK
        bool "ARC HS Development Kit SOC"
+       depends on ISA_ARCV2
+       select ARC_HAS_ACCL_REGS
        select CLK_HSDK
        select RESET_HSDK