summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBenjamin Walsh <benjamin.walsh@windriver.com>2017-01-12 16:49:58 -0500
committerAnas Nashif <nashif@linux.intel.com>2017-01-13 01:36:08 +0000
commit3c39e55ab1ada5eb1aa44ae6808bbee9ce76becc (patch)
treedc1d2b4aee6d135e15cc984fc684b9119c988e75 /arch
parentedf981d44c5eae37a1c27f9d55c0df21ac17f453 (diff)
arc: fix unaligned variables resulting in unaligned k_cpu_sleep_mode
Force-align all variables defined via asm .word to ensure 4-byte alignment. The straddled_tick_on_idle_enter variable was a bool, which resolved in an one-byte quantity. Changing it to a 32-bit integer. It would have occupied 4 bytes anyway with alignment. Fixes ZEP-1549. Change-Id: If5e0aa1a75dbc73d896b44616f059d221fe191c6 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/core/cpu_idle.S1
-rw-r--r--arch/arc/core/fault_s.S1
-rw-r--r--arch/arc/core/isr_wrapper.S1
3 files changed, 3 insertions, 0 deletions
diff --git a/arch/arc/core/cpu_idle.S b/arch/arc/core/cpu_idle.S
index 3cdf0f33c..08e34c2f7 100644
--- a/arch/arc/core/cpu_idle.S
+++ b/arch/arc/core/cpu_idle.S
@@ -33,6 +33,7 @@ GTEXT(k_cpu_idle)
GTEXT(k_cpu_atomic_idle)
GDATA(k_cpu_sleep_mode)
+ .balign 4
SECTION_VAR(BSS, k_cpu_sleep_mode)
.word 0
diff --git a/arch/arc/core/fault_s.S b/arch/arc/core/fault_s.S
index 77496212b..cc6ce8301 100644
--- a/arch/arc/core/fault_s.S
+++ b/arch/arc/core/fault_s.S
@@ -45,6 +45,7 @@ GTEXT(__ev_div_zero)
GTEXT(__ev_dc_error)
GTEXT(__ev_maligned)
+ .balign 4
SECTION_VAR(BSS, saved_stack_pointer)
.word 0
diff --git a/arch/arc/core/isr_wrapper.S b/arch/arc/core/isr_wrapper.S
index c3950d12b..a7fef580e 100644
--- a/arch/arc/core/isr_wrapper.S
+++ b/arch/arc/core/isr_wrapper.S
@@ -38,6 +38,7 @@ GTEXT(_isr_demux)
#if CONFIG_RGF_NUM_BANKS == 1
GDATA(saved_r0)
+ .balign 4
SECTION_VAR(BSS, saved_r0)
.word 0
#endif