Commit de3bd3e1 authored by Eugeniy Paltsev's avatar Eugeniy Paltsev Committed by Greg Kroah-Hartman

ARCv2: Enable unaligned access in early ASM code

commit 252f6e8e 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: #4.4+
Signed-off-by: 's avatarEugeniy Paltsev <>
Signed-off-by: 's avatarVineet Gupta <>
[vgupta: rewrote changelog]
Signed-off-by: 's avatarGreg Kroah-Hartman <>
parent 594b5b09
......@@ -17,6 +17,7 @@
#include <asm/entry.h>
#include <asm/arcregs.h>
#include <asm/cache.h>
#include <asm/irqflags.h>
......@@ -47,6 +48,15 @@
sr r5, [ARC_REG_DC_CTRL]
; 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
.section .init.text, "ax",@progbits
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment