diff options
author | Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 2019-01-16 14:29:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-27 10:09:00 +0100 |
commit | 5f7814c0ae6fd65928295d7e51095bbde71a3429 (patch) | |
tree | 930628a7b22bc697fd21b95a6b97930211ab4a67 /arch/arc | |
parent | ebe390b42e60c1a761b5ba69c174b6857c65dfab (diff) | |
download | linux-stable-5f7814c0ae6fd65928295d7e51095bbde71a3429.tar.gz linux-stable-5f7814c0ae6fd65928295d7e51095bbde71a3429.tar.bz2 linux-stable-5f7814c0ae6fd65928295d7e51095bbde71a3429.zip |
ARCv2: Enable unaligned access in early ASM code
commit 252f6e8eae909bc075a1b1e3b9efb095ae4c0b56 upstream.
It is currently done in arc_init_IRQ() which might be too late
considering gcc 7.3.1 onwards (GNU 2018.03) generates unaligned
memory accesses by default
Cc: stable@vger.kernel.org #4.4+
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
[vgupta: rewrote changelog]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/kernel/head.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S index 8b90d25a15cc..26e33a8b2d18 100644 --- a/arch/arc/kernel/head.S +++ b/arch/arc/kernel/head.S @@ -17,6 +17,7 @@ #include <asm/entry.h> #include <asm/arcregs.h> #include <asm/cache.h> +#include <asm/irqflags.h> .macro CPU_EARLY_SETUP @@ -47,6 +48,15 @@ sr r5, [ARC_REG_DC_CTRL] 1: + +#ifdef CONFIG_ISA_ARCV2 + ; Unaligned access is disabled at reset, so re-enable early as + ; gcc 7.3.1 (ARC GNU 2018.03) onwards generates unaligned access + ; by default + lr r5, [status32] + bset r5, r5, STATUS_AD_BIT + kflag r5 +#endif .endm .section .init.text, "ax",@progbits |