Skip to content

Commit

Permalink
arch: arm: mpu: arm_mpu: Fix compiler error on stack_obj
Browse files Browse the repository at this point in the history
This patch adds a required cast for the size calculation utilizing
pointer arithmetic.  The stack_obj needs a cast to u32_t.  This was
caught using a newer compiler.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
  • Loading branch information
Andy Gross authored and galak committed Jan 15, 2019
1 parent 9cc4b59 commit 0859f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/mpu/arm_mpu.c
Expand Up @@ -207,7 +207,7 @@ void arm_core_mpu_configure_user_context(struct k_thread *thread)
* it is essential to include this size increase, to avoid
* MPU faults.
*/
size += thread->stack_info.start - thread->stack_obj;
size += thread->stack_info.start - base;
#endif

arm_core_mpu_configure(THREAD_STACK_REGION, base, size);
Expand Down

0 comments on commit 0859f34

Please sign in to comment.