Skip to contentSkip to conversation

Preventing kernel misconfiguration.

Xenomai-core Gilles Chanteperdrix 3 participants 3 messages Apr 6, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

Here is a patch that "selects" the I-pipe option when Xenomai is enabled, it should help preventing kernel misconfigurations.

Signature · 1 line
					    Gilles Chanteperdrix.
Kconfig.frag +7 -0
Index: scripts/Kconfig.frag
===================================================================
@@ -4,7 +4,14 @@
 config XENOMAI
 	bool "Xenomai"
 	default y
+        select IPIPE
 
+        help
+          Xenomai is a real-time extension to the Linux kernel. Note 
+          that Xenomai relies on Adeos interrupt pipeline (CONFIG_IPIPE 
+          option) to be enabled, so enabling this option selects the
+          CONFIG_IPIPE option.
+
 source "arch/@LINUX_ARCH@/xenomai/Kconfig"
 
 endmenu
arch/powerpc/Config.in +7 -3
Index: ksrc/arch/powerpc/Config.in
===================================================================
@@ -1,15 +1,19 @@
 mainmenu_option next_comment
 comment 'Real-time sub-system'
 
-bool 'Xenomai' CONFIG_XENOMAI
+if [ "$CONFIG_IPIPE" = "n" ]; then
+    comment "Xenomai depends on Adeos interrupt pipeline"
+else
+    bool 'Xenomai' CONFIG_XENOMAI
 
-source kernel/xenomai/Config.in
+    source kernel/xenomai/Config.in
 
-if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
+    if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
 	mainmenu_option next_comment
 	comment 'Machine'
 	bool 'Enable FPU support' CONFIG_XENO_HW_FPU
 	endmenu
+    fi
 fi
 
 endmenu
arch/i386/Config.in +7 -3
Index: ksrc/arch/i386/Config.in
===================================================================
@@ -1,11 +1,14 @@
 mainmenu_option next_comment
 comment 'Real-time sub-system'
 
-bool 'Xenomai' CONFIG_XENOMAI
+if [ "$CONFIG_IPIPE" = "n" ]; then
+    comment "Xenomai depends on Adeos interrupt pipeline"
+else
+    bool 'Xenomai' CONFIG_XENOMAI
 
-source kernel/xenomai/Config.in
+    source kernel/xenomai/Config.in
 
-if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
+    if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
 
 	mainmenu_option next_comment
 	comment 'Machine'
@@ -42,6 +45,7 @@
 	fi
 	endmenu
 	endmenu
+    fi
 fi
 
 endmenu
#1 lore raw
Quoted 3 lines · Gilles Chanteperdrix

Here is a patch that "selects" the I-pipe option when Xenomai is enabled, it should help preventing kernel misconfigurations.

We definitely need this.

Quoted 81 lines

------------------------------------------------------------------------

Index: scripts/Kconfig.frag
===================================================================

Kconfig.frag +7 -0
@@ -4,7 +4,14 @@
 config XENOMAI
 	bool "Xenomai"
 	default y
+        select IPIPE
 
+        help
+          Xenomai is a real-time extension to the Linux kernel. Note 
+          that Xenomai relies on Adeos interrupt pipeline (CONFIG_IPIPE 
+          option) to be enabled, so enabling this option selects the
+          CONFIG_IPIPE option.
+
 source "arch/@LINUX_ARCH@/xenomai/Kconfig"
 
 endmenu

Index: ksrc/arch/powerpc/Config.in
===================================================================

arch/powerpc/Config.in +7 -3
@@ -1,15 +1,19 @@
 mainmenu_option next_comment
 comment 'Real-time sub-system'
 
-bool 'Xenomai' CONFIG_XENOMAI
+if [ "$CONFIG_IPIPE" = "n" ]; then
+    comment "Xenomai depends on Adeos interrupt pipeline"
+else
+    bool 'Xenomai' CONFIG_XENOMAI
 
-source kernel/xenomai/Config.in
+    source kernel/xenomai/Config.in
 
-if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
+    if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
 	mainmenu_option next_comment
 	comment 'Machine'
 	bool 'Enable FPU support' CONFIG_XENO_HW_FPU
 	endmenu
+    fi
 fi
 
 endmenu

Index: ksrc/arch/i386/Config.in
===================================================================

arch/i386/Config.in +7 -3
@@ -1,11 +1,14 @@
 mainmenu_option next_comment
 comment 'Real-time sub-system'
 
-bool 'Xenomai' CONFIG_XENOMAI
+if [ "$CONFIG_IPIPE" = "n" ]; then
+    comment "Xenomai depends on Adeos interrupt pipeline"
+else
+    bool 'Xenomai' CONFIG_XENOMAI
 
-source kernel/xenomai/Config.in
+    source kernel/xenomai/Config.in
 
-if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
+    if [ "$CONFIG_XENOMAI" = "y" -a "$CONFIG_XENO_OPT_NUCLEUS" != "n" ]; then
 
 	mainmenu_option next_comment
 	comment 'Machine'
@@ -42,6 +45,7 @@
 	fi
 	endmenu
 	endmenu
+    fi
 fi
 
 endmenu
Signature · 1 line
Philippe.
#2 lore raw
Quoted 7 lines · Philippe Gerum
Quoted 3 lines · Gilles Chanteperdrix

Here is a patch that "selects" the I-pipe option when Xenomai is enabled, it should help preventing kernel misconfigurations.

We definitely need this.

What about thinking further: warn in the Xenomai menu (via "comment ... if") when problematic switches like power management are on? Just a quick idea.

Jan