Module: xenomai-2.4
Branch: master
Commit: 56c5c4f09879aba2a3693866f485ef31949c5d0e
URL:    
http://git.xenomai.org/?p=xenomai-2.4.git;a=commit;h=56c5c4f09879aba2a3693866f485ef31949c5d0e

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Jul 19 23:12:42 2009 +0200

x86: fix 2.6.30 build in 32bit mode

---

 include/asm-x86/bits/shadow_32.h |   37 ++++---------------------------------
 ksrc/arch/x86/hal-common.c       |    6 ++++--
 2 files changed, 8 insertions(+), 35 deletions(-)

diff --git a/include/asm-x86/bits/shadow_32.h b/include/asm-x86/bits/shadow_32.h
index 9bad44a..152f7f0 100644
--- a/include/asm-x86/bits/shadow_32.h
+++ b/include/asm-x86/bits/shadow_32.h
@@ -53,45 +53,16 @@ static inline void xnarch_lock_xirqs(rthal_pipeline_stage_t 
* ipd, int cpuid)
 {
        unsigned irq;
 
-       for (irq = 0; irq < IPIPE_NR_XIRQS; irq++) {
-               switch (irq) {
-#ifdef CONFIG_SMP
-               case RTHAL_CRITICAL_IPI:
-               case ipipe_apic_vector_irq(INVALIDATE_TLB_VECTOR):
-               case ipipe_apic_vector_irq(CALL_FUNCTION_VECTOR):
-               case ipipe_apic_vector_irq(RESCHEDULE_VECTOR):
-
-                       /* Never lock out these ones. */
-                       continue;
-#endif /* CONFIG_SMP */
-
-               default:
-
-                       rthal_lock_irq(ipd, cpuid, irq);
-               }
-       }
+       for (irq = 0; irq < NR_IRQS; irq++)
+               rthal_lock_irq(ipd, cpuid, irq);
 }
 
 static inline void xnarch_unlock_xirqs(rthal_pipeline_stage_t * ipd, int cpuid)
 {
        unsigned irq;
 
-       for (irq = 0; irq < IPIPE_NR_XIRQS; irq++) {
-               switch (irq) {
-#ifdef CONFIG_SMP
-               case RTHAL_CRITICAL_IPI:
-               case ipipe_apic_vector_irq(INVALIDATE_TLB_VECTOR):
-               case ipipe_apic_vector_irq(CALL_FUNCTION_VECTOR):
-               case ipipe_apic_vector_irq(RESCHEDULE_VECTOR):
-
-                       continue;
-#endif /* CONFIG_SMP */
-
-               default:
-
-                       rthal_unlock_irq(ipd, irq);
-               }
-       }
+       for (irq = 0; irq < NR_IRQS; irq++)
+               rthal_unlock_irq(ipd, irq);
 }
 
 static inline int xnarch_local_syscall(struct pt_regs *regs)
diff --git a/ksrc/arch/x86/hal-common.c b/ksrc/arch/x86/hal-common.c
index ab60eeb..1497fee 100644
--- a/ksrc/arch/x86/hal-common.c
+++ b/ksrc/arch/x86/hal-common.c
@@ -107,9 +107,11 @@ static inline void send_IPI_allbutself(int vector)
                          | vector);
        rthal_local_irq_restore_hw(flags);
 }
-#elif defined(__i386__)
+#elif defined(__i386__) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
 #include <mach_ipi.h>
-#endif
+#else
+#define send_IPI_allbutself(vector)    apic->send_IPI_allbutself(vector)
+#endif /* __i386__ && < 2.6.30 */
 
 DECLARE_LINUX_IRQ_HANDLER(rthal_broadcast_to_local_timers, irq, dev_id)
 {


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to