Skip to contentSkip to conversation

SMI update

Xenomai-core Applied Ulrich Schwab 3 participants 6 messages Aug 9, 2006 – Aug 12, 2006

lore
Share & tools
lore
#0 lore raw

I saw some bad latency behaviour on a new system, it is a
P4 with ICH7 chipset. It showed more than 300 us max. latency without any load.
This chipset was not detected as SMI generating and SMI disable was not done.

Finally I figured out where to add this DEVICE_ID
to the SMI detection in smi.c
It is done in the attached patch.

Now, the max. latency values on this new system are below 10 us. Although, not tested very long.

Regards,
Ulrich Schwab

Signature · 9 lines
====================================================
  inmess GmbH
  Frankfurter Str. 74
  D - 64521 Gross-Gerau
  Phone: +49 6152 97790
  Fax  : +49 6152 977920
  mail : [email protected]
  web:   www.inmess.de
====================================================
ksrc/arch/i386/smi.c +1 -0
diff -urp xenomai-2.2.0/ksrc/arch/i386/smi.c xenomai-2.2-patched/ksrc/arch/i386/smi.c
@@ -45,6 +45,7 @@ static struct pci_device_id rthal_smi_pc
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0) },
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1) },
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2) },
+{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0) },
 { 0, },
 };
 
#1 lore raw
Quoted 11 lines · Ulrich Schwab

I saw some bad latency behaviour on a new system, it is a
P4 with ICH7 chipset. It showed more than 300 us max. latency without any load.
This chipset was not detected as SMI generating and SMI disable was not done.

Finally I figured out where to add this DEVICE_ID
to the SMI detection in smi.c
It is done in the attached patch.

Now, the max. latency values on this new system are below 10 us. Although, not tested very long.

...and not under load. ;)

Thanks for the patch, we just need some additional define of PCI_DEVICE_ID_INTEL_ICH7_0 for kernel 2.4 compatibility. And if you additionally provide a ChangeLog fragment, your patch would be perfect! (I tend to forget the last part often too... :) )

Jan

#2 lore raw
Quoted 4 lines · Jan Kiszka

Thanks for the patch, we just need some additional define of PCI_DEVICE_ID_INTEL_ICH7_0 for kernel 2.4 compatibility. And if you additionally provide a ChangeLog fragment, your patch would be perfect! (I tend to forget the last part often too... :) )

Where to add the new define for kernel 2.4 ?

Ulrich

Signature · 9 lines
====================================================
  inmess GmbH
  Frankfurter Str. 74
  D - 64521 Gross-Gerau
  Phone: +49 6152 97790
  Fax  : +49 6152 977920
  mail : [email protected]
  web:   www.inmess.de
====================================================
#3 lore raw
Quoted 7 lines · Ulrich Schwab
Quoted 4 lines · Jan Kiszka

Thanks for the patch, we just need some additional define of PCI_DEVICE_ID_INTEL_ICH7_0 for kernel 2.4 compatibility. And if you additionally provide a ChangeLog fragment, your patch would be perfect! (I tend to forget the last part often too... :) )

Where to add the new define for kernel 2.4 ?

I would say to smi.c directly as there are no other users in sight. Otherwise, wrapping code goes to include/asm-{generic|<arch>}/wrapper.h.

Jan

#4 lore raw
Quoted 11 lines · Jan Kiszka
Quoted 7 lines · Ulrich Schwab
Quoted 4 lines · Jan Kiszka

Thanks for the patch, we just need some additional define of PCI_DEVICE_ID_INTEL_ICH7_0 for kernel 2.4 compatibility. And if you additionally provide a ChangeLog fragment, your patch would be perfect! (I tend to forget the last part often too... :) )

Where to add the new define for kernel 2.4 ?

I would say to smi.c directly as there are no other users in sight. Otherwise, wrapping code goes to include/asm-{generic|<arch>}/wrapper.h.

I did add the new Id to smi.c directly now.

Ulrich

Signature · 9 lines
====================================================
  inmess GmbH
  Frankfurter Str. 74
  D - 64521 Gross-Gerau
  Phone: +49 6152 97790
  Fax  : +49 6152 977920
  mail : [email protected]
  web:   www.inmess.de
====================================================
ChangeLog +4 -0
diff -urp xenomai-2.2.0-org/ChangeLog xenomai-2.2.0-patched/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-10  Ulrich Schwab  <[email protected]>
+
+	* ksrc/arch/i386/smi.c added id of Intel ICH7 to list of SMI chipsets
+	
 2006-07-17  Philippe Gerum  <[email protected]>
 
  	* RELEASE: Xenomai 2.2 (Engines Of Creation)
ksrc/arch/i386/smi.c +8 -0
diff -urp xenomai-2.2.0-org/ksrc/arch/i386/smi.c xenomai-2.2.0-patched/ksrc/arch/i386/smi.c
@@ -31,6 +31,13 @@
 #include <linux/reboot.h>
 #include <asm/xenomai/smi.h>
 
+/* DEVICE_IDs needed for 2.4 support */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#ifndef PCI_DEVICE_ID_INTEL_ICH7_0
+#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8
+#endif
+#endif
+
 static struct pci_device_id rthal_smi_pci_tbl[] = {
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0) },
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0) },
@@ -45,6 +52,7 @@ static struct pci_device_id rthal_smi_pc
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0) },
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1) },
 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2) },
+{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0) },
 { 0, },
 };
 
#5 lore raw
Quoted 8 lines · Ulrich Schwab
Quoted 7 lines · Jan Kiszka
Quoted 6 lines · Ulrich Schwab
Quoted 4 lines · Jan Kiszka

Thanks for the patch, we just need some additional define of PCI_DEVICE_ID_INTEL_ICH7_0 for kernel 2.4 compatibility. And if you additionally provide a ChangeLog fragment, your patch would be perfect! (I tend to forget the last part often too... :) )

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Where to add the new define for kernel 2.4 ?

I would say to smi.c directly as there are no other users in sight. Otherwise, wrapping code goes to include/asm-{generic|<arch>}/wrapper.h.

I did add the new Id to smi.c directly now.

Applied, thanks.

Signature · 1 line
					    Gilles Chanteperdrix.