arm: mpu: Adjust to use opaque kernel data types
This patch adjusts the ARM MPU implementation to be compliant to the
recent changes that introduced the opaque kernel data types.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
diff --git a/arch/arm/core/thread.c b/arch/arm/core/thread.c
index 3f0b1ad..492a65a 100644
--- a/arch/arm/core/thread.c
+++ b/arch/arm/core/thread.c
@@ -64,8 +64,7 @@
char *stackEnd = pStackMem + stackSize;
struct __esf *pInitCtx;
- _new_thread_init(thread, K_THREAD_STACK_BUFFER(pStackMem), stackSize,
- priority, options);
+ _new_thread_init(thread, pStackMem, stackSize, priority, options);
/* carve the thread entry struct from the "base" of the stack */
diff --git a/include/arch/arm/arch.h b/include/arch/arm/arch.h
index 57bce90..4553dea 100644
--- a/include/arch/arm/arch.h
+++ b/include/arch/arm/arch.h
@@ -69,7 +69,8 @@
* @param size Size of the stack memory region
*/
#define _ARCH_THREAD_STACK_DEFINE(sym, size) \
- char __noinit __aligned(STACK_ALIGN) sym[size+STACK_ALIGN]
+ struct _k_thread_stack_element __noinit __aligned(STACK_ALIGN) \
+ sym[size+STACK_ALIGN]
/**
* @brief Declare a toplevel array of thread stack memory regions
@@ -85,7 +86,8 @@
* @param size Size of the stack memory region
*/
#define _ARCH_THREAD_STACK_ARRAY_DEFINE(sym, nmemb, size) \
- char __noinit __aligned(STACK_ALIGN) sym[nmemb][size+STACK_ALIGN]
+ struct _k_thread_stack_element __noinit __aligned(STACK_ALIGN) \
+ sym[nmemb][size+STACK_ALIGN]
/**
* @brief Declare an embedded stack memory region
@@ -100,7 +102,8 @@
* @param size Size of the stack memory region
*/
#define _ARCH_THREAD_STACK_MEMBER(sym, size) \
- char __aligned(STACK_ALIGN) sym[size+STACK_ALIGN]
+ struct _k_thread_stack_element __aligned(STACK_ALIGN) \
+ sym[size+STACK_ALIGN]
/**
* @brief Return the size in bytes of a stack memory region
@@ -128,7 +131,7 @@
* @param sym Declared stack symbol name
* @return The buffer itself, a char *
*/
-#define _ARCH_THREAD_STACK_BUFFER(sym) (sym + STACK_ALIGN)
+#define _ARCH_THREAD_STACK_BUFFER(sym) ((char *)(sym + STACK_ALIGN))
#ifdef __cplusplus
}