Skip to contentSkip to conversation

Xenomai 2.6.2 user-space compilation error on ARM < armv6

Xenomai Applied Romain Naour 2 participants 6 messages Dec 30, 2012 – Jan 3, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Gilles,

First of all, thank you for the new release of Xenomai :)

I'm compiling Xenomai 2.6.2 and Linux kernel 3.5.3 for mini2440 with buildroot 2012.11.

During compilation I get the following error:
error: #error "SMP not supported below armv6, compile with -march=armv6 or above"

This error is caused by the SMP mode which is now enabled by default on ARM. So I added the option --disable-smp on the buildroot's command line for ./configure (buildroot assumes that the SMP mode is not enabled when it compile Xenomai for arm)

This option became mandatory for ARM < armv6 to pass this test: (xenomai-2.6/include/asm-arm/feature.h)

#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
#error "SMP not supported below armv6, compile with -march=armv6 or above" #endif

The error message may be advisable to add the option --disable-smp ?
However, since your objective is to allow to run the same binary on UP and SMP system, it is safe to remove this test for ARM < armv6 now ?

Regards,
Romain

#1 lore raw
Quoted 13 lines · Romain Naour

Hi Gilles,

First of all, thank you for the new release of Xenomai :)

I'm compiling Xenomai 2.6.2 and Linux kernel 3.5.3 for mini2440 with buildroot 2012.11.

During compilation I get the following error:
error: #error "SMP not supported below armv6, compile with -march=armv6 or above"

This error is caused by the SMP mode which is now enabled by default on ARM. So I added the option --disable-smp on the buildroot's command line for ./configure (buildroot assumes that the SMP mode is not enabled when it compile Xenomai for arm)

Quoted 8 lines

This option became mandatory for ARM < armv6 to pass this test: (xenomai-2.6/include/asm-arm/feature.h)

#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
#error "SMP not supported below armv6, compile with -march=armv6 or above" #endif

The error message may be advisable to add the option --disable-smp ?
However, since your objective is to allow to run the same binary on UP and SMP system, it is safe to remove this test for ARM < armv6 now ?

Hi Romain,

thanks for the report, this test only makes sense if compiling with the "ad-hoc" atomic operations, with the default setting which is to use gcc atomic operations, we can remove the test.

Will fix for 2.6.2.1, thanks for the report.

Regards.

Signature · 1 line
                                                                Gilles.
#2 lore raw
In reply to Romain Naour
Quoted 18 lines · Romain Naour

Hi Gilles,

First of all, thank you for the new release of Xenomai :)

I'm compiling Xenomai 2.6.2 and Linux kernel 3.5.3 for mini2440 with buildroot 2012.11.

During compilation I get the following error: error: #error "SMP not supported below armv6, compile with -march=armv6 or above"

This error is caused by the SMP mode which is now enabled by default on ARM. So I added the option --disable-smp on the buildroot's command line for ./configure (buildroot assumes that the SMP mode is not enabled when it compile Xenomai for arm)

This option became mandatory for ARM < armv6 to pass this test:
(xenomai-2.6/include/asm-arm/feature.h)

Quoted 7 lines

#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP) #error "SMP not supported below armv6, compile with -march=armv6 or above" #endif

The error message may be advisable to add the option --disable-smp ? However, since your objective is to allow to run the same binary on UP and SMP system, it is safe to remove this test for ARM < armv6 now ?

Could you try the following patch?

include/asm-arm/atomic_asm.h +4 -0
index 47f17c9..ef62690 100644
@@ -27,6 +27,10 @@
 #error "please don't include asm/atomic_asm.h directly"
 #endif
 
+#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
+#error "SMP not supported below armv6 with ad-hoc atomic operations, compile without SMP or with -march=armv6 or above"
+#endif
+
 extern void __xnarch_xchg_called_with_bad_pointer(void);
 
 #define xnarch_read_memory_barrier()		xnarch_memory_barrier()
include/asm-arm/features.h +0 -4
index 279f752..bddaa5e 100644
@@ -73,10 +73,6 @@
 #error "Could not find current ARM architecture"
 #endif
 
-#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
-#error "SMP not supported below armv6, compile with -march=armv6 or above"
-#endif
-
 #define CONFIG_XENO_FASTSYNCH 1
 
 #if CONFIG_XENO_ARM_TSC_TYPE == __XN_TSC_TYPE_KUSER
Signature · 1 line
                                                                Gilles.
#3 lore raw
Quoted 52 lines · Gilles Chanteperdrix
Quoted 18 lines · Romain Naour

Hi Gilles,

First of all, thank you for the new release of Xenomai :)

I'm compiling Xenomai 2.6.2 and Linux kernel 3.5.3 for mini2440 with buildroot 2012.11.

During compilation I get the following error: error: #error "SMP not supported below armv6, compile with -march=armv6 or above"

This error is caused by the SMP mode which is now enabled by default on ARM. So I added the option --disable-smp on the buildroot's command line for ./configure (buildroot assumes that the SMP mode is not enabled when it compile Xenomai for arm)

This option became mandatory for ARM < armv6 to pass this test:
(xenomai-2.6/include/asm-arm/feature.h)

Quoted 7 lines

#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP) #error "SMP not supported below armv6, compile with -march=armv6 or above" #endif

The error message may be advisable to add the option --disable-smp ? However, since your objective is to allow to run the same binary on UP and SMP system, it is safe to remove this test for ARM < armv6 now ?

Could you try the following patch?

include/asm-arm/atomic_asm.h +4 -0
index 47f17c9..ef62690 100644
@@ -27,6 +27,10 @@
 #error "please don't include asm/atomic_asm.h directly"
 #endif
 
+#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
+#error "SMP not supported below armv6 with ad-hoc atomic operations, compile without SMP or with -march=armv6 or above"
+#endif
+
 extern void __xnarch_xchg_called_with_bad_pointer(void);
 
 #define xnarch_read_memory_barrier()		xnarch_memory_barrier()
include/asm-arm/features.h +0 -0
index 279f752..bddaa5e 100644

include/asm-arm/features.h line 78

Quoted 10 lines
include/asm-arm/features.h +0 -4
@@ -73,10 +73,6 @@
 #error "Could not find current ARM architecture"
 #endif
 
-#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
-#error "SMP not supported below armv6, compile with -march=armv6 or above"
-#endif
-
 #define CONFIG_XENO_FASTSYNCH 1
 
 #if CONFIG_XENO_ARM_TSC_TYPE == __XN_TSC_TYPE_KUSER

Hi Gilles,

I applied your patch and tried to compile with the following options:
--with-atomic-ops=ad-hoc
As expected, the build fails with this error:
#error "SMP not supported below armv6 with ad-hoc atomic operations, compile without SMP or with -march=armv6 or above"

--with-atomic-ops=builtins (or when this option is not specified) The build ends correctly.
I haven't the board at this time, I'll do a test this week.

Regards,
Romain

#4 lore raw
Quoted 76 lines · Romain Naour
Quoted 52 lines · Gilles Chanteperdrix
Quoted 18 lines · Romain Naour

Hi Gilles,

First of all, thank you for the new release of Xenomai :)

I'm compiling Xenomai 2.6.2 and Linux kernel 3.5.3 for mini2440 with buildroot 2012.11.

During compilation I get the following error: error: #error "SMP not supported below armv6, compile with -march=armv6 or above"

This error is caused by the SMP mode which is now enabled by default on ARM. So I added the option --disable-smp on the buildroot's command line for ./configure (buildroot assumes that the SMP mode is not enabled when it compile Xenomai for arm)

This option became mandatory for ARM < armv6 to pass this test:
(xenomai-2.6/include/asm-arm/feature.h)

Quoted 7 lines

#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP) #error "SMP not supported below armv6, compile with -march=armv6 or above" #endif

The error message may be advisable to add the option --disable-smp ? However, since your objective is to allow to run the same binary on UP and SMP system, it is safe to remove this test for ARM < armv6 now ?

Could you try the following patch?

include/asm-arm/atomic_asm.h +4 -0
index 47f17c9..ef62690 100644
@@ -27,6 +27,10 @@
 #error "please don't include asm/atomic_asm.h directly"
 #endif
 
+#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
+#error "SMP not supported below armv6 with ad-hoc atomic operations, compile without SMP or with -march=armv6 or above"
+#endif
+
 extern void __xnarch_xchg_called_with_bad_pointer(void);
 
 #define xnarch_read_memory_barrier()		xnarch_memory_barrier()
include/asm-arm/features.h +0 -0
index 279f752..bddaa5e 100644

include/asm-arm/features.h line 78

Quoted 10 lines
include/asm-arm/features.h +0 -4
@@ -73,10 +73,6 @@
 #error "Could not find current ARM architecture"
 #endif
 
-#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP)
-#error "SMP not supported below armv6, compile with -march=armv6 or above"
-#endif
-
 #define CONFIG_XENO_FASTSYNCH 1
 
 #if CONFIG_XENO_ARM_TSC_TYPE == __XN_TSC_TYPE_KUSER

Hi Gilles,

I applied your patch and tried to compile with the following options:
--with-atomic-ops=ad-hoc
As expected, the build fails with this error:
#error "SMP not supported below armv6 with ad-hoc atomic operations, compile without SMP or with -march=armv6 or above"

--with-atomic-ops=builtins (or when this option is not specified) The build ends correctly.
I haven't the board at this time, I'll do a test this week.

Quoted 8 lines

Regards,
Romain

_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Hi Gilles,

I did a test today with your previous patch, it works correctly. However the following patch is required since the new ipipe-core.

---

We need a minimal reload value for s3c2410_itimer, otherwise the hardware timer stops.

 arch/arm/plat-samsung/time.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/plat-samsung/time.c +2 -0
index 8d14b85..97fbdc5 100644
@@ -364,6 +364,8 @@ static void s3c2410_timer_setup (void)
 
 #ifdef CONFIG_IPIPE
 	s3c2410_itimer.freq = tcnt * HZ;
+	/* hardware timer can't be reloaded below 120ns */
+	s3c2410_itimer.min_delay_ticks = ipipe_timer_ns2ticks(&s3c2410_itimer, 120);
 	ipipe_timer_register(&s3c2410_itimer);
 #endif /* CONFIG_IPIPE */
 }
Signature · 1 line
1.8.0.3
#5 lore raw
Quoted 18 lines · Romain Naour

Hi Gilles,

I did a test today with your previous patch, it works correctly. However the following patch is required since the new ipipe-core.

---

We need a minimal reload value for s3c2410_itimer, otherwise the hardware timer stops.

 arch/arm/plat-samsung/time.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/plat-samsung/time.c +0 -0
index 8d14b85..97fbdc5 100644

arch/arm/plat-samsung/time.c static void s3c2410_timer_setup (void) · line 371

Quoted 8 lines
arch/arm/plat-samsung/time.c +2 -0
@@ -364,6 +364,8 @@ static void s3c2410_timer_setup (void)
 
 #ifdef CONFIG_IPIPE
 	s3c2410_itimer.freq = tcnt * HZ;
+	/* hardware timer can't be reloaded below 120ns */
+	s3c2410_itimer.min_delay_ticks = ipipe_timer_ns2ticks(&s3c2410_itimer, 120);
 	ipipe_timer_register(&s3c2410_itimer);
 #endif /* CONFIG_IPIPE */
 }

Merged, thanks.

Signature · 1 line
                                                                Gilles.