detect conflict with INPUT_PCSPKR
PATCH 1/1 detect conflict with INPUT_PCSPKR
This is a simple patch to catch the very rare but fatal conflict between Xenomai's TSC emulation and the PC speaker driver on 2.6/x86.
Jan
asm-i386/hal.h (Arbeitskopie) renamed from asm-i386/hal.h (Revision 1390) +5 -0
@@ -169,6 +169,11 @@ static inline unsigned long long rthal_r return t; } #else /* !CONFIG_X86_TSC */ +#if defined(CONFIG_INPUT_PCSPKR) || defined(CONFIG_INPUT_PCSPKR_MODULE) +#error Please disable PC speaker driver (CONFIG_INPUT_PCSPKR). +#error It conflicts with Xenomai's TSC emulation. +#endif /* CONFIG_INPUT_PCSPKR */ + #define RTHAL_8254_COUNT2LATCH 0xfffe void rthal_setup_8254_tsc(void); rthal_time_t rthal_get_8254_tsc(void);
Quoted 10 lines · Jan Kiszka
This is a simple patch to catch the very rare but fatal conflict between Xenomai's TSC emulation and the PC speaker driver on 2.6/x86.
Jan
asm-i386/hal.h (Arbeitskopie) renamed from asm-i386/hal.h (Revision 1390) +0
-0@@ -169,6 +169,11 @@ static inline unsigned long long rthal_r return t;
asm-i386/hal.h (Arbeitskopie) static inline unsigned long long rthal_r · line 179
Quoted 10 lines
asm-i386/hal.h (Arbeitskopie) renamed from asm-i386/hal.h (Revision 1390) +5
-0} #else /* !CONFIG_X86_TSC */ +#if defined(CONFIG_INPUT_PCSPKR) || defined(CONFIG_INPUT_PCSPKR_MODULE) +#error Please disable PC speaker driver (CONFIG_INPUT_PCSPKR). +#error It conflicts with Xenomai's TSC emulation. +#endif /* CONFIG_INPUT_PCSPKR */ + #define RTHAL_8254_COUNT2LATCH 0xfffe void rthal_setup_8254_tsc(void); rthal_time_t rthal_get_8254_tsc(void);
How about solving this in Kconfig ?
Signature · 1 line
Gilles Chanteperdrix.
Kconfig.frag +1 -0
@@ -2,6 +2,7 @@ menu "Real-time sub-system" config XENOMAI + depends on CONFIG_X86_TSC || !X86 || !CONFIG_INPUT_PCSPKR bool "Xenomai" default y select IPIPE
Kconfig.frag line 8
Quoted 13 lines · Gilles Chanteperdrix
How about solving this in
Kconfig?
Index:scripts/Kconfig.frag
===================================================================Kconfig.frag +1
-0@@ -2,6 +2,7 @@ menu "Real-time sub-system" config XENOMAI + depends on CONFIG_X86_TSC || !X86 || !CONFIG_INPUT_PCSPKR bool "Xenomai" default y select IPIPE
Sorry, I meant:
Signature · 1 line
Gilles Chanteperdrix.
Kconfig.frag +1 -0
@@ -2,6 +2,7 @@ menu "Real-time sub-system" config XENOMAI + depends on X86_TSC || !X86 || !INPUT_PCSPKR bool "Xenomai" default y select IPIPE
Quoted 26 lines · Gilles Chanteperdrix
Kconfig.frag line 8
Quoted 13 lines · Gilles Chanteperdrix
How about solving this in
Kconfig?
Index:scripts/Kconfig.frag
===================================================================Kconfig.frag +1
-0@@ -2,6 +2,7 @@ menu "Real-time sub-system" config XENOMAI + depends on CONFIG_X86_TSC || !X86 || !CONFIG_INPUT_PCSPKR bool "Xenomai" default y select IPIPESorry, I meant:
------------------------------------------------------------------------
Index:
scripts/Kconfig.frag
===================================================================
Kconfig.frag line 8
Quoted 7 lines
Kconfig.frag +1
-0@@ -2,6 +2,7 @@ menu "Real-time sub-system" config XENOMAI + depends on X86_TSC || !X86 || !INPUT_PCSPKR bool "Xenomai" default y select IPIPE
No problem, but only when combining with a
comment "Switch off CONFIG_INPUT_PCSPKR to use Xenomai" (or so)
depends on !X86_TSC && X86 && INPUT_PCSPKR
Otherwise the user will be left alone here with a non-selectable Xenomai option...
This actually remind me of my suggestion some months ago to add Kconfig warnings for CONFIG_CPU_FREQ & friends. Might be a good chance to catch this all. Is scripts/Kconfig.frag the preferred place to add it?
Jan
Quoted 11 lines · Jan Kiszka
No problem, but only when combining with a
comment "Switch off
CONFIG_INPUT_PCSPKRto use Xenomai" (or so)depends on !X86_TSC && X86 && INPUT_PCSPKROtherwise the user will be left alone here with a non-selectable Xenomai option...
This actually remind me of my suggestion some months ago to add
Kconfigwarnings forCONFIG_CPU_FREQ& friends. Might be a good chance to catch this all. Isscripts/Kconfig.fragthe preferred place to add it?
Why not? Here is a second patch that follows your suggestions.
Signature · 1 line
Gilles Chanteperdrix.
Kconfig.frag +13 -0
@@ -1,7 +1,20 @@ menu "Real-time sub-system" +comment "WARNING! You enabled CPU Frequency scaling or use of ACPI" + depends on CPU_FREQ || ACPI_PROCESSOR +comment "processor C states as idle handler (ACPI 'processor' option)." + depends on CPU_FREQ || ACPI_PROCESSOR +comment "These options are known to cause troubles with Xenomai." + depends on CPU_FREQ || ACPI_PROCESSOR + +comment "NOTE: Xenomai conflicts with PC speaker support." + depends on !X86_TSC && X86 && INPUT_PCSPKR +comment "(menu Device Drivers/Input device support/Miscellaneous devices)" + depends on !X86_TSC && X86 && INPUT_PCSPKR + config XENOMAI + depends on X86_TSC || !X86 || !INPUT_PCSPKR bool "Xenomai" default y select IPIPE
Quoted 9 lines · Gilles Chanteperdrix
Quoted 8 lines · Jan Kiszka
No problem, but only when combining with a
comment "Switch off
CONFIG_INPUT_PCSPKRto use Xenomai" (or so)depends on !X86_TSC && X86 && INPUT_PCSPKROtherwise the user will be left alone here with a non-selectable Xenomai option...
Quoted 6 lines
Quoted 3 lines
This actually remind me of my suggestion some months ago to add
Kconfigwarnings forCONFIG_CPU_FREQ& friends. Might be a good chance to catch this all. Isscripts/Kconfig.fragthe preferred place to add it?Why not? Here is a second patch that follows your suggestions.
No objections! Looks good to me. But shouldn't we add APM as well?
Jan
Quoted 30 lines
------------------------------------------------------------------------
Index:
scripts/Kconfig.frag
===================================================================Kconfig.frag +13
-0@@ -1,7 +1,20 @@ menu "Real-time sub-system" +comment "WARNING! You enabled CPU Frequency scaling or use of ACPI" + depends on CPU_FREQ || ACPI_PROCESSOR +comment "processor C states as idle handler (ACPI 'processor' option)." + depends on CPU_FREQ || ACPI_PROCESSOR +comment "These options are known to cause troubles with Xenomai." + depends on CPU_FREQ || ACPI_PROCESSOR + +comment "NOTE: Xenomai conflicts with PC speaker support." + depends on !X86_TSC && X86 && INPUT_PCSPKR +comment "(menu Device Drivers/Input device support/Miscellaneous devices)" + depends on !X86_TSC && X86 && INPUT_PCSPKR + config XENOMAI + depends on X86_TSC || !X86 || !INPUT_PCSPKR bool "Xenomai" default y select IPIPE
Quoted 10 lines · Jan Kiszka
Quoted 9 lines · Gilles Chanteperdrix
Quoted 8 lines · Jan Kiszka
No problem, but only when combining with a
comment "Switch off
CONFIG_INPUT_PCSPKRto use Xenomai" (or so)depends on !X86_TSC && X86 && INPUT_PCSPKROtherwise the user will be left alone here with a non-selectable Xenomai option...
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
This actually remind me of my suggestion some months ago to add
Kconfigwarnings forCONFIG_CPU_FREQ& friends. Might be a good chance to catch this all. Isscripts/Kconfig.fragthe preferred place to add it?Why not? Here is a second patch that follows your suggestions.
No objections! Looks good to me. But shouldn't we add APM as well?
With APM, as well as with warnings for 2.4.
Signature · 1 line
Gilles Chanteperdrix.
Kconfig.frag +13 -0
@@ -1,7 +1,20 @@ menu "Real-time sub-system" +comment "WARNING! You enabled APM, CPU Frequency scaling or use of ACPI" + depends on APM || CPU_FREQ || ACPI_PROCESSOR +comment "processor C states as idle handler (ACPI 'processor' option)." + depends on APM || CPU_FREQ || ACPI_PROCESSOR +comment "These options are known to cause troubles with Xenomai." + depends on APM || CPU_FREQ || ACPI_PROCESSOR + +comment "NOTE: Xenomai conflicts with PC speaker support." + depends on !X86_TSC && X86 && INPUT_PCSPKR +comment "(menu Device Drivers/Input device support/Miscellaneous devices)" + depends on !X86_TSC && X86 && INPUT_PCSPKR + config XENOMAI + depends on X86_TSC || !X86 || !INPUT_PCSPKR bool "Xenomai" default y select IPIPE
arch/i386/Config.in +6 -0
@@ -1,6 +1,12 @@ mainmenu_option next_comment comment 'Real-time sub-system' +if [ "$CONFIG_APM" != "n" -o "$CONFIG_APM_CPU_IDLE" != "n" -o "$CONFIG_APM_DISPLAY_BLANK" != "n" -o "$CONFIG_ACPI_PROCESSOR" != "n" ]; then + comment "WARNING! You enabled APM or use of ACPI processor C states as" + comment "idle handler (ACPI 'processor' option)." + comment "These options are known to cause troubles with Xenomai" +fi + if [ "$CONFIG_IPIPE" = "n" ]; then comment "Xenomai depends on Adeos interrupt pipeline" else
Quoted 16 lines · Gilles Chanteperdrix
Quoted 15 lines · Jan Kiszka
Quoted 14 lines · Gilles Chanteperdrix
Quoted 11 lines · Jan Kiszka
No problem, but only when combining with a
comment "Switch off
CONFIG_INPUT_PCSPKRto use Xenomai" (or so)depends on !X86_TSC && X86 && INPUT_PCSPKROtherwise the user will be left alone here with a non-selectable Xenomai option...
This actually remind me of my suggestion some months ago to add
Kconfigwarnings forCONFIG_CPU_FREQ& friends. Might be a good chance to catch this all. Isscripts/Kconfig.fragthe preferred place to add it?
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Why not? Here is a second patch that follows your suggestions.
No objections! Looks good to me. But shouldn't we add APM as well?
With APM, as well as with warnings for 2.4.
Ack. Applique directement stp.
A+
Quoted 47 lines
plain text document attachment (xeno-kconfig-warnings.diff)
Index:scripts/Kconfig.frag
===================================================================Kconfig.frag +13
-0@@ -1,7 +1,20 @@ menu "Real-time sub-system" +comment "WARNING! You enabled APM, CPU Frequency scaling or use of ACPI" + depends on APM || CPU_FREQ || ACPI_PROCESSOR +comment "processor C states as idle handler (ACPI 'processor' option)." + depends on APM || CPU_FREQ || ACPI_PROCESSOR +comment "These options are known to cause troubles with Xenomai." + depends on APM || CPU_FREQ || ACPI_PROCESSOR + +comment "NOTE: Xenomai conflicts with PC speaker support." + depends on !X86_TSC && X86 && INPUT_PCSPKR +comment "(menu Device Drivers/Input device support/Miscellaneous devices)" + depends on !X86_TSC && X86 && INPUT_PCSPKR + config XENOMAI + depends on X86_TSC || !X86 || !INPUT_PCSPKR bool "Xenomai" default y select IPIPEIndex: ksrc/arch/i386/Config.in
===================================================================arch/i386/Config.in +6
-0@@ -1,6 +1,12 @@ mainmenu_option next_comment comment 'Real-time sub-system' +if [ "$CONFIG_APM" != "n" -o "$CONFIG_APM_CPU_IDLE" != "n" -o "$CONFIG_APM_DISPLAY_BLANK" != "n" -o "$CONFIG_ACPI_PROCESSOR" != "n" ]; then + comment "WARNING! You enabled APM or use of ACPI processor C states as" + comment "idle handler (ACPI 'processor' option)." + comment "These options are known to cause troubles with Xenomai" +fi + if [ "$CONFIG_IPIPE" = "n" ]; then comment "Xenomai depends on Adeos interrupt pipeline" else_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.