diff mbox

[v3] xenomai: Add config for enabling/disabling SMP

Message ID 20170410124412.4526-1-sikor6@gmail.com
State Superseded
Headers show

Commit Message

sikor6@gmail.com April 10, 2017, 12:44 p.m. UTC
Add a config option for enabling/disabling SMP
in Xenomai userspace in version 3.x

Enabled by default.

Signed-off-by: Pawel Sikora <sikor6@gmail.com>
---
Changes v2 -> v3:
 - Corrections in help (Arnout V.)

 package/xenomai/Config.in  | 17 +++++++++++++++++
 package/xenomai/xenomai.mk |  6 ++++++
 2 files changed, 23 insertions(+)

Comments

Arnout Vandecappelle April 10, 2017, 1:42 p.m. UTC | #1
On 10-04-17 14:44, Pawel Sikora wrote:
> Add a config option for enabling/disabling SMP
> in Xenomai userspace in version 3.x
> 
> Enabled by default.
> 
> Signed-off-by: Pawel Sikora <sikor6@gmail.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 One small detail: your two patches are conflicting with each other, which makes
life difficult for the maintainers. You should keep them together in a patch
series where they are kept in the correct order.


 Regards,
 Arnout

> ---
> Changes v2 -> v3:
>  - Corrections in help (Arnout V.)
> 
>  package/xenomai/Config.in  | 17 +++++++++++++++++
>  package/xenomai/xenomai.mk |  6 ++++++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/package/xenomai/Config.in b/package/xenomai/Config.in
> index b548ee810..8bf9c4ae1 100644
> --- a/package/xenomai/Config.in
> +++ b/package/xenomai/Config.in
> @@ -51,6 +51,23 @@ config BR2_PACKAGE_XENOMAI_VERSION
>  	  BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, in the Linux
>  	  Kernel -> Linux Kernel Extensions menu.
>  
> +config BR2_PACKAGE_XENOMAI_ENABLE_SMP
> +	bool "Enable SMP"
> +	default y
> +	help
> +	  This option enables SMP support in Xenomai userspace.
> +
> +	  If this option is turned on while no SMP support is enabled
> +	  in the kernel, things will still work. However, if SMP is
> +	  enabled in the kernel but this option is not turned on,
> +	  Xenomai applications will complain with 'feature mismatch:
> +	  missing="smp/nosmp'.
> +
> +	  Please refer to this troubleshooting guide for more
> +	  information:
> +
> +	  http://xenomai.org/troubleshooting-a-dual-kernel-configuration/#feature_mismatch_missing8221smpnosmp8221
> +
>  config BR2_PACKAGE_XENOMAI_TESTSUITE
>  	bool "Install testsuite"
>  	help
> diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
> index c9e810e05..04880e69a 100644
> --- a/package/xenomai/xenomai.mk
> +++ b/package/xenomai/xenomai.mk
> @@ -23,6 +23,12 @@ XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
>  
>  XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/ --disable-doc-install
>  
> +ifeq ($(BR2_PACKAGE_XENOMAI_ENABLE_SMP),y)
> +XENOMAI_CONF_OPTS += --enable-smp
> +else
> +XENOMAI_CONF_OPTS += --disable-smp
> +endif
> +
>  define XENOMAI_REMOVE_DEVFILES
>  	for i in xeno-config xeno-info wrap-link.sh ; do \
>  		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
>
diff mbox

Patch

diff --git a/package/xenomai/Config.in b/package/xenomai/Config.in
index b548ee810..8bf9c4ae1 100644
--- a/package/xenomai/Config.in
+++ b/package/xenomai/Config.in
@@ -51,6 +51,23 @@  config BR2_PACKAGE_XENOMAI_VERSION
 	  BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, in the Linux
 	  Kernel -> Linux Kernel Extensions menu.
 
+config BR2_PACKAGE_XENOMAI_ENABLE_SMP
+	bool "Enable SMP"
+	default y
+	help
+	  This option enables SMP support in Xenomai userspace.
+
+	  If this option is turned on while no SMP support is enabled
+	  in the kernel, things will still work. However, if SMP is
+	  enabled in the kernel but this option is not turned on,
+	  Xenomai applications will complain with 'feature mismatch:
+	  missing="smp/nosmp'.
+
+	  Please refer to this troubleshooting guide for more
+	  information:
+
+	  http://xenomai.org/troubleshooting-a-dual-kernel-configuration/#feature_mismatch_missing8221smpnosmp8221
+
 config BR2_PACKAGE_XENOMAI_TESTSUITE
 	bool "Install testsuite"
 	help
diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
index c9e810e05..04880e69a 100644
--- a/package/xenomai/xenomai.mk
+++ b/package/xenomai/xenomai.mk
@@ -23,6 +23,12 @@  XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
 
 XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/ --disable-doc-install
 
+ifeq ($(BR2_PACKAGE_XENOMAI_ENABLE_SMP),y)
+XENOMAI_CONF_OPTS += --enable-smp
+else
+XENOMAI_CONF_OPTS += --disable-smp
+endif
+
 define XENOMAI_REMOVE_DEVFILES
 	for i in xeno-config xeno-info wrap-link.sh ; do \
 		rm -f $(TARGET_DIR)/usr/bin/$$i ; \