Skip to contentSkip to conversation

Xenomai stable ppc64 I-pipe sync

PATCH Applied Heikki Lindholm 2 participants 2 messages Nov 14, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Xenomai stable ppc64 I-pipe sync

Sync the ppc64 arch of the stable tree to work with I-pipe kernel also.

-- Heikki Lindholm

arch/ppc64/hal/switch.S +0 -1
diff -Nru xenomai/arch/ppc64/hal/switch.S xenomai-devel/arch/ppc64/hal/switch.S
@@ -26,7 +26,6 @@
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/page.h>
-#include <asm/offsets.h>
 #include <asm/ppc_asm.h>
 #include <xeno_config.h> 
 
include/nucleus/asm-ppc64/hal.h +4 -0
diff -Nru xenomai/include/nucleus/asm-ppc64/hal.h xenomai-devel/include/nucleus/asm-ppc64/hal.h
@@ -98,7 +98,11 @@
 #include <nucleus/asm/atomic.h>
 #include <asm/processor.h>
 
+#ifdef CONFIG_ADEOS_CORE
 #define RTHAL_TIMER_IRQ   ADEOS_TIMER_VIRQ
+#else /* !CONFIG_ADEOS_CORE */
+#define RTHAL_TIMER_IRQ   IPIPE_TIMER_VIRQ
+#endif /* CONFIG_ADEOS_CORE */
 
 #define rthal_irq_descp(irq)	(&irq_desc[(irq)])
 
include/nucleus/asm-ppc64/system.h +10 -0
diff -Nru xenomai/include/nucleus/asm-ppc64/system.h xenomai-devel/include/nucleus/asm-ppc64/system.h
@@ -31,10 +31,12 @@
 #include <linux/config.h>
 #include <linux/ptrace.h>
 
+#ifdef CONFIG_ADEOS_CORE
 #if ADEOS_RELEASE_NUMBER < 0x02060201
 #error "Adeos 2.6r2c1/ppc64 or above is required to run this software; please upgrade."
 #error "See http://download.gna.org/adeos/patches/v2.6/ppc64/"
 #endif
+#endif /* CONFIG_ADEOS_CORE */
 
 #define XNARCH_DEFAULT_TICK     1000000 /* ns, i.e. 1ms */
 #define XNARCH_HOST_TICK        (1000000000UL/HZ)
@@ -102,11 +104,19 @@
 
 /* The following predicates are only usable over a regular Linux stack
  *    context. */
+#ifdef CONFIG_ADEOS_CORE
 #define xnarch_fault_pf_p(fi)   ((fi)->exception == ADEOS_ACCESS_TRAP)
 #define xnarch_fault_bp_p(fi)   ((current->ptrace & PT_PTRACED) && \
 				((fi)->exception == ADEOS_IABR_TRAP || \
 				(fi)->exception == ADEOS_SSTEP_TRAP || \
 				(fi)->exception == ADEOS_PERFMON_TRAP))
+#else /* !CONFIG_ADEOS_CORE */
+#define xnarch_fault_pf_p(fi)   ((fi)->exception == IPIPE_TRAP_ACCESS)
+#define xnarch_fault_bp_p(fi)   ((current->ptrace & PT_PTRACED) && \
+				((fi)->exception == IPIPE_TRAP_IABR || \
+				(fi)->exception == IPIPE_TRAP_SSTEP || \
+				(fi)->exception == IPIPE_TRAP_PERFMON))
+#endif /* CONFIG_ADEOS_CORE */
 
 #define xnarch_fault_notify(fi) (!xnarch_fault_bp_p(fi))
 
#1 lore raw
Quoted 2 lines · Heikki Lindholm

Sync the ppc64 arch of the stable tree to work with I-pipe kernel also.

Applied, thanks.

Quoted 75 lines

-- Heikki Lindholm

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

diff -Nru xenomai/arch/ppc64/hal/switch.S xenomai-devel/arch/ppc64/hal/switch.S

arch/ppc64/hal/switch.S +0 -1
@@ -26,7 +26,6 @@
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/page.h>
-#include <asm/offsets.h>
 #include <asm/ppc_asm.h>
 #include <xeno_config.h> 
 

diff -Nru xenomai/include/nucleus/asm-ppc64/hal.h xenomai-devel/include/nucleus/asm-ppc64/hal.h

include/nucleus/asm-ppc64/hal.h +4 -0
@@ -98,7 +98,11 @@
 #include <nucleus/asm/atomic.h>
 #include <asm/processor.h>
 
+#ifdef CONFIG_ADEOS_CORE
 #define RTHAL_TIMER_IRQ   ADEOS_TIMER_VIRQ
+#else /* !CONFIG_ADEOS_CORE */
+#define RTHAL_TIMER_IRQ   IPIPE_TIMER_VIRQ
+#endif /* CONFIG_ADEOS_CORE */
 
 #define rthal_irq_descp(irq)	(&irq_desc[(irq)])
 

diff -Nru xenomai/include/nucleus/asm-ppc64/system.h xenomai-devel/include/nucleus/asm-ppc64/system.h

include/nucleus/asm-ppc64/system.h +10 -1
@@ -31,10 +31,12 @@
 #include <linux/config.h>
 #include <linux/ptrace.h>
 
+#ifdef CONFIG_ADEOS_CORE
 #if ADEOS_RELEASE_NUMBER < 0x02060201
 #error "Adeos 2.6r2c1/ppc64 or above is required to run this software; please upgrade."
 #error "See http://download.gna.org/adeos/patches/v2.6/ppc64/"
 #endif
+#endif /* CONFIG_ADEOS_CORE */
 
 #define XNARCH_DEFAULT_TICK     1000000 /* ns, i.e. 1ms */
 #define XNARCH_HOST_TICK        (1000000000UL/HZ)
@@ -102,11 +104,19 @@
 
 /* The following predicates are only usable over a regular Linux stack
  *    context. */
+#ifdef CONFIG_ADEOS_CORE
 #define xnarch_fault_pf_p(fi)   ((fi)->exception == ADEOS_ACCESS_TRAP)
 #define xnarch_fault_bp_p(fi)   ((current->ptrace & PT_PTRACED) && \
 				((fi)->exception == ADEOS_IABR_TRAP || \
 				(fi)->exception == ADEOS_SSTEP_TRAP || \
 				(fi)->exception == ADEOS_PERFMON_TRAP))
+#else /* !CONFIG_ADEOS_CORE */
+#define xnarch_fault_pf_p(fi)   ((fi)->exception == IPIPE_TRAP_ACCESS)
+#define xnarch_fault_bp_p(fi)   ((current->ptrace & PT_PTRACED) && \
+				((fi)->exception == IPIPE_TRAP_IABR || \
+				(fi)->exception == IPIPE_TRAP_SSTEP || \
+				(fi)->exception == IPIPE_TRAP_PERFMON))
+#endif /* CONFIG_ADEOS_CORE */
 
 #define xnarch_fault_notify(fi) (!xnarch_fault_bp_p(fi))
 
 
 
------------------------------------------------------------------------

_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core

Signature · 1 line
Philippe.