Skip to contentSkip to conversation

xenomai: Add configuration opt for SMP in Xenomai

PATCH New Pawel Sikora 2 participants 3 messages Mar 21, 2017 – Mar 25, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/2 xenomai: Add configuration opt for SMP in Xenomai

Change from v1:
Adding enabling smp in Xenomai in Config.in instead of hardcoding it in xenomai.mk

#1 lore raw

PATCH 2/2 xenomai: Add configuration opt for SMP in Xenomai

Add new option for Xenomai target package for
enabling SMP: BR2_PACKAGE_XENOMAI_ENABLE_SMP

If enabled, append to XENOMAI_CONF_OPTS in xenomai.mk.

---
 package/xenomai/Config.in  | 11 +++++++++++
 package/xenomai/xenomai.mk |  4 ++++
 2 files changed, 15 insertions(+)
package/xenomai/Config.in +11 -0
index 32c5124ef..ce88f6185 100644
@@ -51,6 +51,17 @@ 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 configuration"
+	help
+	  Manually enable SMP in Xenomai. If left empty, the default
+	  SMP will be disabled.
+
+	  Make sure that in your kernel config you also have SMP
+	  enabled. If configuration will differ regarding this
+	  config between Xenomai package and the Linux kernel
+	  you will not be able to run Xenomai testsuite
+
 config BR2_PACKAGE_XENOMAI_TESTSUITE
 	bool "Install testsuite"
 	help
package/xenomai/xenomai.mk +4 -0
index 28875b944..aed459809 100644
@@ -23,6 +23,10 @@ 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
+endif
+
 define XENOMAI_REMOVE_DEVFILES
 	for i in xeno-config xeno-info wrap-link.sh ; do \
 		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
Signature · 1 line
2.12.0
#2 lore raw

PATCH 2/2 xenomai: Add configuration opt for SMP in Xenomai

Hello,

package/xenomai/Config.in config BR2_PACKAGE_XENOMAI_VERSION · line 58

Quoted 5 lines · Pawel Sikora
package/xenomai/Config.in +5 -0
+config BR2_PACKAGE_XENOMAI_ENABLE_SMP
+	bool "Enable SMP configuration"
+	help
+	  Manually enable SMP in Xenomai. If left empty, the default
+	  SMP will be disabled.

I don't understand what you mean by "the default SMP will be disabled". Your current patch does *not* pass anything if BR2_PACKAGE_XENOMAI_ENABLE_SMP is disabled, i.e it lets Xenomai decide whether SMP should be enabled or not.

And with Xenomai 2.6, the default is:

$ ./configure --help | grep smp
  --enable-smp            Enable SMP support [default=yes on x86, Power, ARM]

So in fact, with your option disabled, SMP would still be enabled on x86, Power and ARM.

So it should forcefully disable SMP by passing --disable-smp if the option is disabled (that normally how we do things in Buildroot).

However, such a change will break things for existing users of Xenomai on x86, Power and ARM, because they will now have SMP being disabled. Not sure how to handle that.

Has the semantic of this option changed with Xenomai 3.x ?

package/xenomai/Config.in config BR2_PACKAGE_XENOMAI_VERSION · line 63

Quoted 4 lines
package/xenomai/Config.in +4 -0
+	  Make sure that in your kernel config you also have SMP
+	  enabled. If configuration will differ regarding this
+	  config between Xenomai package and the Linux kernel
+	  you will not be able to run Xenomai testsuite

This is not completely correct English I believe. A better wording is
probably: "If there is a mismatch between the kernel configuration and Xenomai configuration in terms of SMP support, the Xenomai testsuite will fail to run.".

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com