[meta-freescale] [meta-fsl-arm][PATCH 2/4] kernel-module-mcc: Only include mvf_sema4.h if building in kernel

Max Krummenacher max.oss.09 at gmail.com
Wed Jan 7 06:59:52 PST 2015


Thank you for these patches addressing issues with libmcc.

> ++#ifdef __KERNEL__
> + #include <linux/mvf_sema4.h>
> ++#endif

mvf_sema4.h defines MVF_SHMEM_SEMAPHORE_NUMBER, so I would also
conditionally define #define MCC_SHMEM_SEMAPHORE_NUMBER
(MVF_SHMEM_SEMAPHORE_NUMBER)
e.g.
+diff --git a/mcc_config.h b/mcc_config.h
+--- a/mcc_config.h
++++ b/mcc_config.h
+@@ -18,8 +18,13 @@
+ #ifndef __MCC_CONFIG__
+ #define __MCC_CONFIG__
+
++#ifdef __KERNEL__
+ #include <linux/mvf_sema4.h>
+
++/* semaphore number */
++#define MCC_SHMEM_SEMAPHORE_NUMBER      (MVF_SHMEM_SEMAPHORE_NUMBER)
++#endif
++
+ /* used OS */
+ #define MCC_OS_USED                    (MCC_LINUX)
+
+@@ -47,7 +52,5 @@
+ /* other cores, besides this participating in mcc */
+ #define MCC_OTHER_CORES                       {1}
+
+-/* semaphore number */
+-#define MCC_SHMEM_SEMAPHORE_NUMBER      (MVF_SHMEM_SEMAPHORE_NUMBER)
+
+ #endif /* __MCC_CONFIG__ */

This still builds the kernel-module-mcc and libmcc. Running it on HW
is still pending.

Regards
Max Krummenacher


More information about the meta-freescale mailing list