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

Otavio Salvador otavio at ossystems.com.br
Wed Jan 7 08:03:13 PST 2015


On Wed, Jan 7, 2015 at 12:59 PM, Max Krummenacher <max.oss.09 at gmail.com> wrote:
> Thank you for these patches addressing issues with libmcc.

Thanks for the feedback.

>> ++#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.

Great. I did this and prepared a v3 patchset.

> +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.

Good please let me know how it goes.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


More information about the meta-freescale mailing list