Skip to contentSkip to conversation

Adeos support for 2.6.18 merged PowerPC architecture.

PATCH In review Benjamin Zores 5 participants 33 messages Nov 24, 2006 – Dec 7, 2006 1 message not in the archive PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Adeos support for 2.6.18 merged PowerPC architecture.

Hi,

I've downloaded latest Adeos/Ipipe patch for PPC and unfortunately this latest doesn't (yet) support the ARCH=powerpc architecture from kernel but only the PPC one.

I've tried porting the changes to support the PPC_MERGE and be able to still use Xenomai on 2.6.18 with ARCH=powerpc.

Attached is a patch that has to be applied after regular adeos-2.6.18-ppc patch to extends supports for PowerPC.
Please consider it for review only right now as it might not yet compiles to the end (i'm facing problems with includes inter-race which required me to change the radix-tree.h header file which is something i don't want to).

I also have problems booting my latest kernel with this patch on
(but booting regular 2.6.18 in merged PowerPC architecture already is a hassle atm) and I'd like you to help me know whether it cames from my patch's content or not.

FYI, I've tried to port all Adeos architecture dependant parts but i only focused
on PPC32 (PPC64 support might be in but i won't test on it). I'm also trying to boot an MPC8349 chip but i don't think I'll have to address anything with it as it used to work with Xenomai on 2.6.14.

Thanks for the review,

Ben

arch/powerpc/Kconfig +2 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/Kconfig linux.edit/arch/powerpc/Kconfig
@@ -590,6 +590,8 @@
 
 menu "Kernel options"
 
+source kernel/ipipe/Kconfig
+
 config HIGHMEM
 	bool "High memory support"
 	depends on PPC32
arch/powerpc/kernel/entry_32.S +92 -0

140 lines not on this page · raw message

arch/powerpc/kernel/head_32.S +14 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/head_32.S linux.edit/arch/powerpc/kernel/head_32.S
@@ -329,6 +329,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+        
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -418,7 +424,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -443,7 +453,11 @@
 	EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_44x.S +4 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/head_44x.S linux.edit/arch/powerpc/kernel/head_44x.S
@@ -427,7 +427,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/head_4xx.S +14 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/head_4xx.S linux.edit/arch/powerpc/kernel/head_4xx.S
@@ -228,6 +228,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -396,7 +402,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* 0x0500 - External Interrupt Exception */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* 0x0600 - Alignment Exception */
 	START_EXCEPTION(0x0600, Alignment)
@@ -434,7 +444,11 @@
 	lis	r0,TSR_PIS@h
 	mtspr	SPRN_TSR,r0		/* Clear the PIT exception */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
+#ifdef CONFIG_IPIPE
+	EXC_XFER_IPIPE(0x1000, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 	EXC_XFER_LITE(0x1000, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #if 0
 /* NOTE:
arch/powerpc/kernel/head_8xx.S +14 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/head_8xx.S linux.edit/arch/powerpc/kernel/head_8xx.S
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(n, hdlr, n, NOCOPY, transfer_to_handler_full,	\
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+        
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(n, hdlr, n+1, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -238,7 +244,11 @@
 	EXC_XFER_EE_LITE(0x400, handle_page_fault)
 
 /* External interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x500, HardwareInterrupt, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x500, HardwareInterrupt, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 /* Alignment exception */
 	. = 0x600
@@ -259,7 +269,11 @@
 	EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x900, Decrementer, __ipipe_grab_timer, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
arch/powerpc/kernel/head_booke.h +16 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/head_booke.h linux.edit/arch/powerpc/kernel/head_booke.h
@@ -187,6 +187,12 @@
 	EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \
 			  ret_from_except_full)
 
+#ifdef CONFIG_IPIPE
+#define EXC_XFER_IPIPE(n, hdlr)		\
+	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
+			  __ipipe_ret_from_except)
+#endif /* CONFIG_IPIPE */
+
 #define EXC_XFER_LITE(n, hdlr)		\
 	EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \
 			  ret_from_except)
@@ -345,6 +351,15 @@
 	addi	r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_STD(0x0700, program_check_exception)
 
+#ifdef CONFIG_IPIPE
+#define DECREMENTER_EXCEPTION						      \
+	START_EXCEPTION(Decrementer)					      \
+	NORMAL_EXCEPTION_PROLOG;					      \
+	lis     r0,TSR_DIS@h;           /* Setup the DEC interrupt mask */    \
+	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
+	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
+	EXC_XFER_IPIPE(0x0900, __ipipe_grab_timer)
+#else /* !CONFIG_IPIPE */
 #define DECREMENTER_EXCEPTION						      \
 	START_EXCEPTION(Decrementer)					      \
 	NORMAL_EXCEPTION_PROLOG;					      \
@@ -352,6 +367,7 @@
 	mtspr   SPRN_TSR,r0;		/* Clear the DEC interrupt */	      \
 	addi    r3,r1,STACK_FRAME_OVERHEAD;				      \
 	EXC_XFER_LITE(0x0900, timer_interrupt)
+#endif /* CONFIG_IPIPE */
 
 #define FP_UNAVAILABLE_EXCEPTION					      \
 	START_EXCEPTION(FloatingPointUnavailable)			      \
arch/powerpc/kernel/head_fsl_booke.S +4 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/head_fsl_booke.S linux.edit/arch/powerpc/kernel/head_fsl_booke.S
@@ -526,7 +526,11 @@
 	INSTRUCTION_STORAGE_EXCEPTION
 
 	/* External Input Interrupt */
+#ifdef CONFIG_IPIPE
+	EXCEPTION(0x0500, ExternalInput, __ipipe_grab_irq, EXC_XFER_IPIPE)
+#else /* !CONFIG_IPIPE */
 	EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
+#endif /* CONFIG_IPIPE */
 
 	/* Alignment Interrupt */
 	ALIGNMENT_EXCEPTION
arch/powerpc/kernel/ipipe-core.c +265 -0

265 lines not on this page · raw message

arch/powerpc/kernel/ipipe-root.c +498 -0

498 lines not on this page · raw message

arch/powerpc/kernel/Makefile +2 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/Makefile linux.edit/arch/powerpc/kernel/Makefile
@@ -58,6 +58,8 @@
 obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_IPIPE)		+= ipipe-core.o ipipe-root.o
+obj-$(CONFIG_IPIPE_TRACE)	+= ipipe-mcount.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_PPC_UDBG_16550)	+= legacy_serial.o udbg_16550.o
 obj-$(CONFIG_KGDB)		+= kgdb.o
arch/powerpc/kernel/traps.c +32 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/kernel/traps.c linux.edit/arch/powerpc/kernel/traps.c
@@ -326,6 +326,9 @@
 	int recover = 0;
 	unsigned long reason = get_mc_reason(regs);
 
+        if (ipipe_trap_notify(IPIPE_TRAP_MCE,regs))
+                return;
+        
 	/* See if any machine dependent calls */
 	if (ppc_md.machine_check_exception)
 		recover = ppc_md.machine_check_exception(regs);
@@ -492,6 +495,8 @@
 
 void unknown_exception(struct pt_regs *regs)
 {
+        if (ipipe_trap_notify(IPIPE_TRAP_UNKNOWN,regs))
+	    	return;
 	printk("Bad trap at PC: %lx, SR: %lx, vector=%lx\n",
 	       regs->nip, regs->msr, regs->trap);
 
@@ -500,6 +505,8 @@
 
 void instruction_breakpoint_exception(struct pt_regs *regs)
 {
+        if (ipipe_trap_notify(IPIPE_TRAP_IABR,regs))
+	    	return;
 	if (notify_die(DIE_IABR_MATCH, "iabr_match", regs, 5,
 					5, SIGTRAP) == NOTIFY_STOP)
 		return;
@@ -510,12 +517,16 @@
 
 void RunModeException(struct pt_regs *regs)
 {
+        if (ipipe_trap_notify(IPIPE_TRAP_RM,regs))
+	    	return;
 	_exception(SIGTRAP, regs, 0, 0);
 }
 
 void __kprobes single_step_exception(struct pt_regs *regs)
 {
 	regs->msr &= ~(MSR_SE | MSR_BE);  /* Turn off 'trace' bits */
+        if (ipipe_trap_notify(IPIPE_TRAP_SSTEP,regs))
+	    	return;
 
 	if (notify_die(DIE_SSTEP, "single_step", regs, 5,
 					5, SIGTRAP) == NOTIFY_STOP)
@@ -763,6 +774,9 @@
 	unsigned int reason = get_reason(regs);
 	extern int do_mathemu(struct pt_regs *regs);
 
+        if (ipipe_trap_notify(IPIPE_TRAP_PCE,regs))
+	    	return;
+
 #ifdef CONFIG_MATH_EMULATION
 	/* (reason & REASON_ILLEGAL) would be the obvious thing here,
 	 * but there seems to be a hardware bug on the 405GP (RevD)
@@ -832,6 +846,9 @@
 		return;
 	}
 
+        if (ipipe_trap_notify(IPIPE_TRAP_ALIGNMENT,regs))
+	    	return;
+        
 	/* Operand address was bad */
 	if (fixed == -EFAULT) {
 		if (user_mode(regs))
@@ -855,6 +872,8 @@
 
 void nonrecoverable_exception(struct pt_regs *regs)
 {
+        if (ipipe_trap_notify(IPIPE_TRAP_NREC,regs))
+	    	return;
 	printk(KERN_ERR "Non-recoverable exception at PC=%lx MSR=%lx\n",
 	       regs->nip, regs->msr);
 	debugger(regs);
@@ -877,6 +896,8 @@
 
 void altivec_unavailable_exception(struct pt_regs *regs)
 {
+        if (ipipe_trap_notify(IPIPE_TRAP_ALTUNAVAIL,regs))
+	    	return;
 #if !defined(CONFIG_ALTIVEC)
 	if (user_mode(regs)) {
 		/* A user program has executed an altivec instruction,
@@ -902,6 +923,9 @@
 	extern int Soft_emulate_8xx(struct pt_regs *);
 	int errcode;
 
+        if (ipipe_trap_notify(IPIPE_TRAP_SOFTEMU,regs))
+	    	return;
+        
 	CHECK_FULL_REGS(regs);
 
 	if (!user_mode(regs)) {
@@ -930,6 +954,8 @@
 
 void DebugException(struct pt_regs *regs, unsigned long debug_status)
 {
+        if (ipipe_trap_notify(IPIPE_TRAP_DEBUG,regs))
+	    	return;
 	if (debug_status & DBSR_IC) {	/* instruction completion */
 		regs->msr &= ~MSR_DE;
 		if (user_mode(regs)) {
@@ -960,6 +986,9 @@
 {
 	int err;
 
+        if (ipipe_trap_notify(IPIPE_TRAP_ALTASSIST,regs))
+	    	return;
+        
 	if (!user_mode(regs)) {
 		printk(KERN_EMERG "VMX/Altivec assist exception in kernel mode"
 		       " at %lx\n", regs->nip);
@@ -1010,6 +1039,9 @@
 	int fpexc_mode;
 	int code = 0;
 
+        if (ipipe_trap_notify(IPIPE_TRAP_SPE,regs))
+	    	return;
+
 	spefscr = current->thread.spefscr;
 	fpexc_mode = current->thread.fpexc_mode;
 
arch/powerpc/mm/mmu_context_64.c +3 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/arch/powerpc/mm/mmu_context_64.c linux.edit/arch/powerpc/mm/mmu_context_64.c
@@ -59,9 +59,12 @@
 
 void destroy_context(struct mm_struct *mm)
 {
+        unsigned long flags;
+        local_irq_save_hw_cond(flags);
 	spin_lock(&mmu_context_lock);
 	idr_remove(&mmu_context_idr, mm->context.id);
 	spin_unlock(&mmu_context_lock);
 
 	mm->context.id = NO_CONTEXT;
+        local_irq_restore_hw_cond(flags);
 }
include/asm-powerpc/ipipe.h +218 -0

218 lines not on this page · raw message

include/asm-powerpc/mmu_context.h +2 -2
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/include/asm-powerpc/mmu_context.h linux.edit/include/asm-powerpc/mmu_context.h
@@ -74,9 +74,9 @@
 {
 	unsigned long flags;
 
-	local_irq_save(flags);
+        local_irq_save_hw_cond(flags);
 	switch_mm(prev, next, current);
-	local_irq_restore(flags);
+        local_irq_restore_hw_cond(flags);
 }
 
 #endif /* CONFIG_PPC64 */
include/asm-powerpc/pgalloc.h +5 -0
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/include/asm-powerpc/pgalloc.h linux.edit/include/asm-powerpc/pgalloc.h
@@ -155,6 +155,11 @@
 
 #define check_pgt_cache()	do { } while (0)
 
+static inline void set_pgdir(unsigned long address, pgd_t entry)
+{
+    /* nop */
+}
+
 #endif /* CONFIG_PPC64 */
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_PGALLOC_H */
include/linux/radix-tree.h +2 -1
diff -NEwabur -x '*~' -x linux.orig -x '*.rej' linux.orig/include/linux/radix-tree.h linux.edit/include/linux/radix-tree.h
@@ -19,7 +19,6 @@
 #ifndef _LINUX_RADIX_TREE_H
 #define _LINUX_RADIX_TREE_H
 
-#include <linux/sched.h>
 #include <linux/preempt.h>
 #include <linux/types.h>
 
@@ -32,6 +31,8 @@
 	struct radix_tree_node	*rnode;
 };
 
+#include <linux/sched.h>
+
 #define RADIX_TREE_INIT(mask)	{					\
 	.height = 0,							\
 	.gfp_mask = (mask),						\
#1 lore raw
Quoted 5 lines · Benjamin Zores

Hi,

I've downloaded latest Adeos/Ipipe patch for PPC and unfortunately this latest doesn't (yet) support the ARCH=powerpc architecture from kernel but only the PPC one.

Yes, the PowerPC tree is not yet supported.

Quoted 2 lines

I've tried porting the changes to support the PPC_MERGE and be able to still use Xenomai on 2.6.18 with ARCH=powerpc.

Nice.

Quoted 5 lines

Attached is a patch that has to be applied after regular adeos-2.6.18-ppc patch to extends supports for PowerPC.
Please consider it for review only right now as it might not yet compiles to the end (i'm facing problems with includes inter-race which required me to change the radix-tree.h header file which is something i don't want to).

You might have realized my hack to get ride of radix-tree.h for the ppc tree.

Quoted 3 lines

I also have problems booting my latest kernel with this patch on
(but booting regular 2.6.18 in merged PowerPC architecture already is a hassle atm) and I'd like you to help me know whether it cames from my patch's content or not.

What defconfig do you use? Unfortunately I do not have a board by hand supported by the PowerPC tree.

Quoted 4 lines

FYI, I've tried to port all Adeos architecture dependant parts but i only focused
on PPC32 (PPC64 support might be in but i won't test on it). I'm also trying to boot an MPC8349 chip but i don't think I'll have to address anything with it as it used to work with Xenomai on 2.6.14.

Thanks for the review,

I will have a look a.s.s.p.

Wolfgang.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 7 lines · Benjamin Zores
Quoted 1 line · On Fri, 24 Nov 2006 11:13:03 +0100 Wolfgang Grandegger <[email protected]> wrote:

Yes, the PowerPC tree is not yet supported.

Yes but as i need it now i've decided to port it ;-) Or at least of a try.

Good, :-)

Quoted 3 lines
Quoted 1 line

You might have realized my hack to get ride of radix-tree.h for the ppc tree.

Actually not, have some patch ?

For the ppc tree, I have added

  #ifdef CONFIG_PPC_MERGE
  #include <linux/radix-tree.h>
  #endif

to include/powerpc/irq.h to get rid of the trouble with radix-tree.h.

Quoted 3 lines
Quoted 1 line

What defconfig do you use? Unfortunately I do not have a board by hand supported by the PowerPC tree.

mpc834x_itx_defconfig

I briefly reviewed your patch. At a first glance, it looks OK, but it is not yet complete and it does not compile. Quickly, I spotted the following problems:

- NR_IRQS is not defined. This is a problem with the include weirdness due to radix-tree.h, IIRC. It is set to 512 for all PowerPC archs, puh, that's overkill (but not our problem for the time being).

_ipipe_grab_irq(): special IRQ numbers have changed. Check for NO_IRQ_IGNORE in the attached patch. Also the new IRQ handling needs a more detailed review (check irq.c in the powerpc tree).

- disarm_decr[] has disappeared. It was used to disable the programming of the decrementer in arch/ppc/kernel/time.c:timer_interrupt(). It needs an appropriate replacement in the powerpc tree. A quick, untested hack is in the attached patch.

There might be more issues.

We should also avoid code duplication of IPIPE files, but that's something I will fix later-on.

Hope this helps you to get a bit further (kernel booted).

Wolfgang.

#4 lore raw

Forgot to attach the patch, sorry.

Wolfgang.

Quoted 43 lines · Wolfgang Grandegger
Quoted 7 lines · Benjamin Zores
Quoted 1 line · On Fri, 24 Nov 2006 11:13:03 +0100 Wolfgang Grandegger <[email protected]> wrote:

Yes, the PowerPC tree is not yet supported.

Yes but as i need it now i've decided to port it ;-) Or at least of a try.

Good, :-)

Quoted 3 lines
Quoted 1 line

You might have realized my hack to get ride of radix-tree.h for the ppc tree.

Actually not, have some patch ?

For the ppc tree, I have added

  #ifdef CONFIG_PPC_MERGE
  #include <linux/radix-tree.h>
  #endif

to include/powerpc/irq.h to get rid of the trouble with radix-tree.h.

Quoted 3 lines
Quoted 1 line

What defconfig do you use? Unfortunately I do not have a board by hand supported by the PowerPC tree.

mpc834x_itx_defconfig

I briefly reviewed your patch. At a first glance, it looks OK, but it is not yet complete and it does not compile. Quickly, I spotted the following problems:

- NR_IRQS is not defined. This is a problem with the include weirdness
due to radix-tree.h, IIRC. It is set to 512 for all PowerPC archs, puh, that's overkill (but not our problem for the time being).

_ipipe_grab_irq(): special IRQ numbers have changed. Check for NO_IRQ_IGNORE in the attached patch. Also the new IRQ handling needs a more detailed review (check irq.c in the powerpc tree).

- disarm_decr[] has disappeared. It was used to disable the programming
of the decrementer in arch/ppc/kernel/time.c:timer_interrupt(). It needs an appropriate replacement in the powerpc tree. A quick, untested hack is in the attached patch.

There might be more issues.

We should also avoid code duplication of IPIPE files, but that's something I will fix later-on.

Hope this helps you to get a bit further (kernel booted).

Quoted 9 lines

Wolfgang.

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

arch/powerpc/kernel/time.c +7 -1
Index: linux-2.6.18/arch/powerpc/kernel/time.c
===================================================================
@@ -699,9 +699,15 @@ void timer_interrupt(struct pt_regs * re
 		}
 		write_sequnlock(&xtime_lock);
 	}
-	
+#ifdef CONFIG_IPIPE
+	if (__ipipe_decr_ticks == tb_ticks_per_jiffy) {
+		next_dec = tb_ticks_per_jiffy - ticks;
+		set_dec(next_dec);
+	}
+#else /* !CONFIG_IPIPE */
 	next_dec = tb_ticks_per_jiffy - ticks;
 	set_dec(next_dec);
+#endif /* CONFIG_IPIPE */
 
 #ifdef CONFIG_PPC_ISERIES
 	if (hvlpevent_is_pending())
arch/powerpc/kernel/ipipe-core.c +0 -1
Index: linux-2.6.18/arch/powerpc/kernel/ipipe-core.c
===================================================================
@@ -224,7 +224,6 @@ static void __ipipe_set_decr(void)
 
 	ipipe_load_cpuid();
 
-	disarm_decr[cpuid] = (__ipipe_decr_ticks != tb_ticks_per_jiffy);
 #ifdef CONFIG_40x
 	/* Enable and set auto-reload. */
 	mtspr(SPRN_TCR, mfspr(SPRN_TCR) | TCR_ARE);
arch/powerpc/kernel/ipipe-root.c +4 -2
Index: linux-2.6.18/arch/powerpc/kernel/ipipe-root.c
===================================================================
@@ -314,7 +314,9 @@ int __ipipe_grab_irq(struct pt_regs *reg
 	ipipe_declare_cpuid;
 	int irq;
 
-	if ((irq = ppc_md.get_irq(regs)) >= 0) {
+	irq = ppc_md.get_irq(regs);
+
+	if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) {
 #ifdef CONFIG_IPIPE_TRACE_IRQSOFF
 		ipipe_trace_begin(irq);
 #endif /* CONFIG_IPIPE_TRACE_IRQSOFF */
@@ -323,7 +325,7 @@ int __ipipe_grab_irq(struct pt_regs *reg
 		ipipe_trace_end(irq);
 #endif /* CONFIG_IPIPE_TRACE_IRQSOFF */
 	}
-	else if (irq != -2)
+	else if (irq != NO_IRQ_IGNORE)
 		ppc_spurious_interrupts++;
 
 	ipipe_load_cpuid();
#5 lore raw
In reply to Wolfgang Grandegger
Quoted 3 lines · On Sun, 26 Nov 2006 20:10:17 +0100 Wolfgang Grandegger <[email protected]> wrote:

- NR_IRQS is not defined. This is a problem with the include weirdness due to radix-tree.h, IIRC. It is set to 512 for all PowerPC archs, puh, that's overkill (but not our problem for the time being).

Indeed it seemed so.
On my private tree, i've fixed/redefined it to 512 to have it compile (ugly hack though).

Quoted 8 lines

_ipipe_grab_irq(): special IRQ numbers have changed. Check for NO_IRQ_IGNORE in the attached patch. Also the new IRQ handling needs a more detailed review (check irq.c in the powerpc tree).

- disarm_decr[] has disappeared. It was used to disable the programming of the decrementer in arch/ppc/kernel/time.c:timer_interrupt(). It needs an appropriate replacement in the powerpc tree. A quick, untested hack is in the attached patch.

I'll try to check on that.

Quoted 1 line

Hope this helps you to get a bit further (kernel booted).

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Ben

#6 lore raw
Quoted 9 lines · Benjamin Zores
Quoted 2 lines · On Sun, 26 Nov 2006 20:10:17 +0100 Wolfgang Grandegger <[email protected]> wrote:

- NR_IRQS is not defined. This is a problem with the include weirdness
due to radix-tree.h, IIRC. It is set to 512 for all PowerPC archs, puh, that's overkill (but not our problem for the time being).

Indeed it seemed so.
On my private tree, i've fixed/redefined it to 512 to have it compile (ugly hack though).

Yes, beause you need "irq.h" sooner than later in IPIPE files.

Quoted 5 lines
Quoted 4 lines

_ipipe_grab_irq(): special IRQ numbers have changed. Check for NO_IRQ_IGNORE in the attached patch. Also the new IRQ handling needs a more detailed review (check irq.c in the powerpc tree).

- disarm_decr[] has disappeared. It was used to disable the programming
of the decrementer in arch/ppc/kernel/time.c:timer_interrupt(). It needs an appropriate replacement in the powerpc tree. A quick, untested hack is in the attached patch.

Quoted 7 lines

I'll try to check on that.

Quoted 1 line

Hope this helps you to get a bit further (kernel booted).

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Problems with IRQs?

Wolfgang.

#7 lore raw
Quoted 5 lines · On Mon, 27 Nov 2006 12:21:25 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 3 lines

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Problems with IRQs?

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

Ben

#8 lore raw
Quoted 11 lines · Benjamin Zores
Quoted 4 lines · On Mon, 27 Nov 2006 12:21:25 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 3 lines

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Problems with IRQs?

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

As I pointed out in my previous mail, the IRQ handling is not yet correct for powerpc. Try to correct his first.

Wolfgang.

#9 lore raw
Quoted 7 lines · On Mon, 27 Nov 2006 13:11:23 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 6 lines · Benjamin Zores
Quoted 3 lines · On Mon, 27 Nov 2006 12:21:25 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 3 lines

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Problems with IRQs?

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

As I pointed out in my previous mail, the IRQ handling is not yet correct for powerpc. Try to correct his first.

The 2.6.19 having been released out, and working much better on my card than the vanilla 2.6.18 used to be, I'm now more kind to adapt my patch to this latest kernel.

However the IRQ handling API seem to have changed a lot
and i was wondering if some work on porting Adeos
(x86/ppc, not yet powerpc of course) patches already have been started by someone here ?

(i.e. something i can work from to adapt my new patch)

Ben

#10 lore raw
Quoted 17 lines · Benjamin Zores
Quoted 7 lines · On Mon, 27 Nov 2006 13:11:23 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 6 lines · Benjamin Zores
Quoted 3 lines · On Mon, 27 Nov 2006 12:21:25 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 3 lines

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Problems with IRQs?

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

As I pointed out in my previous mail, the IRQ handling is not yet correct for powerpc. Try to correct his first.

Quoted 8 lines

The 2.6.19 having been released out, and working much better on my card than the vanilla 2.6.18 used to be, I'm now more kind to adapt my patch to this latest kernel.

However the IRQ handling API seem to have changed a lot
and i was wondering if some work on porting Adeos
(x86/ppc, not yet powerpc of course) patches already have been started by someone here ?

I don't see that PPC is converted to genirq, that new API. And I'm not sure (while not being a PPC expert) if it ever will be, specifically as PowerPC is already on genirq and should obsolete PPC one day, right?

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Jan

#11 lore raw
Quoted 20 lines · Jan Kiszka
Quoted 19 lines · Benjamin Zores
Quoted 4 lines · On Mon, 27 Nov 2006 13:11:23 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 3 lines · Benjamin Zores

On Mon, 27 Nov 2006 12:21:25 +0100
Wolfgang Grandegger <[email protected]> wrote:

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Problems with IRQs?

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

As I pointed out in my previous mail, the IRQ handling is not yet correct for powerpc. Try to correct his first.

The 2.6.19 having been released out, and working much better on my card than the vanilla 2.6.18 used to be, I'm now more kind to adapt my patch to this latest kernel.

Quoted 8 lines
Quoted 4 lines

However the IRQ handling API seem to have changed a lot
and i was wondering if some work on porting Adeos
(x86/ppc, not yet powerpc of course) patches already have been started by someone here ?

I don't see that PPC is converted to genirq, that new API. And I'm not sure (while not being a PPC expert) if it ever will be, specifically as PowerPC is already on genirq and should obsolete PPC one day, right?

No, or at least partially wrong. I have to check what the new, fully implemented genirq does. But I realized, that the common IRQ structure is used now (resulting in some name changes, w.g. ->handler ->chip). Likely, PPC and PowerPC already use the new genirq.

Quoted 20 lines

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Jan

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

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

#12 lore raw
Quoted 30 lines · Wolfgang Grandegger
Quoted 29 lines · Jan Kiszka
Quoted 27 lines · Benjamin Zores
Quoted 8 lines · On Mon, 27 Nov 2006 13:11:23 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 7 lines · Benjamin Zores
Quoted 4 lines · On Mon, 27 Nov 2006 12:21:25 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 4 lines

Well, I hack a bit my patch to make it compile and the kernel already booted.
Though it hangs when loading the SATA driver.
I have no idea why atm.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Problems with IRQs?

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

As I pointed out in my previous mail, the IRQ handling is not yet correct for powerpc. Try to correct his first.

The 2.6.19 having been released out, and working much better on my card than the vanilla 2.6.18 used to be, I'm now more kind to adapt my patch to
this latest kernel.

However the IRQ handling API seem to have changed a lot
and i was wondering if some work on porting Adeos
(x86/ppc, not yet powerpc of course) patches already have been started by someone here ?

Quoted 8 lines
Quoted 3 lines

I don't see that PPC is converted to genirq, that new API. And I'm not sure (while not being a PPC expert) if it ever will be, specifically as PowerPC is already on genirq and should obsolete PPC one day, right?

No, or at least partially wrong. I have to check what the new, fully implemented genirq does. But I realized, that the common IRQ structure is used now (resulting in some name changes, w.g. ->handler ->chip). Likely, PPC and PowerPC already use the new genirq.

It is likely used under PPC as far it has to be: renamed structures, moved information. But the core issue is if the flow handling (edge, level, simple etc.) also moved to kernel/irq/chip.c, and that looks to me like only being the case for PowerPC.

Jan

#13 lore raw
In reply to Jan Kiszka
Quoted 3 lines · Jan Kiszka

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

I have an x86_64 box waiting for a Xenomai port - I don't see much point in hacking 2.6.17 and earlier when 2.6.19 is going to be a major change in key areas.. It also looks like there is a closer integration of x86_64 and plain old ix86 code in the 2.6.19 tree, so this may simplify the task of maintaining a 64bit patch.

Regards, Paul.

#14 lore raw
Quoted 10 lines · Paul
Quoted 3 lines · Jan Kiszka

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

I have an x86_64 box waiting for a Xenomai port - I don't see much point in hacking 2.6.17 and earlier when 2.6.19 is going to be a major change in key areas.. It also looks like there is a closer integration of x86_64 and plain old ix86 code in the 2.6.19 tree, so this may simplify the task of maintaining a 64bit patch.

For sure, there is not much point in starting on old code (the "stable" 2.6.16 series /may/ turn out to be an exception one day).

An x86_64 port will be highly welcome! Feel invited to post I-pipe related topics also to [email protected].

One hint that may ease testing/debugging: Have a look at qemu for x86_64. At least on x86, it already helped me a lot to debug weird kernel issues without long run-instrument-build-rerun cycles. All it takes is a minimal system image for a target. You can easily attach a debugger to the kernel, and you can even emulate SMP (though debugging is not perfect in that case). Of course, you cannot identify latency issues this way, but you will likely already be happy when things don't crash anymore. :)

Jan

#15 lore raw
In reply to Jan Kiszka
Quoted 9 lines · Jan Kiszka

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Actually, the draft patch I sent you did not boot on my SMP box today, so qemu seems to have been a bit too friendly. Knowing that, issuing a half-baked patch would have made no sense, so I finally refrained from doing that. Since I'm now basically in love with the genirq layer (at least for x86) compared to the utter mess that we had to endure previously, I've decided to tackle the issue completely, and rewrite the I-pipe interrupt flow in order to leverage it. Will post something asap.

Signature · 1 line
Philippe.
#16 lore raw
Quoted 12 lines · Philippe Gerum
Quoted 9 lines · Jan Kiszka

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Quoted 8 lines

Actually, the draft patch I sent you did not boot on my SMP box today, so qemu seems to have been a bit too friendly. Knowing that, issuing a half-baked patch would have made no sense, so I finally refrained from doing that. Since I'm now basically in love with the genirq layer (at least for x86) compared to the utter mess that we had to endure previously, I've decided to tackle the issue completely, and rewrite the I-pipe interrupt flow in order to leverage it. Will post something asap.

Ok, here we are. I've just merged 2.6.19-ipipe-1.6-00. It has been tested on a low-end classic Pentium 90Mhz, a dusty two-way Celeron 750Mhz, and on a terrible Celeron 1GHz oldish laptop. Looks ok so far, and even passed the horrid "dohell" test on the SMP box, just smiling. However, I don't have the required hw at hand to check if our friend the MSI support is not killing us once more. This said, the MSI support in 2.6.19 also conforms to the genirq specs, so there's hope.

The patch is available from the Adeos download area, and I've also committed it to the SVN trunk/.

Feedback welcome,

PS: I have the corresponding quilt-managed patches available upon request, to the people who want to use this work as a reference for porting to other archs.

Signature · 1 line
Philippe.
#17 lore raw
Quoted 29 lines · Philippe Gerum
Quoted 11 lines · Philippe Gerum
Quoted 9 lines · Jan Kiszka

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Quoted 8 lines

Actually, the draft patch I sent you did not boot on my SMP box today, so qemu seems to have been a bit too friendly. Knowing that, issuing a half-baked patch would have made no sense, so I finally refrained from doing that. Since I'm now basically in love with the genirq layer (at least for x86) compared to the utter mess that we had to endure previously, I've decided to tackle the issue completely, and rewrite the I-pipe interrupt flow in order to leverage it. Will post something asap.

Ok, here we are. I've just merged 2.6.19-ipipe-1.6-00. It has been tested on a low-end classic Pentium 90Mhz, a dusty two-way Celeron 750Mhz, and on a terrible Celeron 1GHz oldish laptop. Looks ok so far, and even passed the horrid "dohell" test on the SMP box, just smiling. However, I don't have the required hw at hand to check if our friend the MSI support is not killing us once more. This said, the MSI support in 2.6.19 also conforms to the genirq specs, so there's hope.

Quoted 8 lines

The patch is available from the Adeos download area, and I've also committed it to the SVN trunk/.

Feedback welcome,

PS: I have the corresponding quilt-managed patches available upon request, to the people who want to use this work as a reference for porting to other archs.

You mean that you have separate patches for the common and arch dependent part. That would be nice. I'm interested! As a consequence we could provide separated patches in general and prepare-kernel.sh applies them in sequence. Just an idea for the future.

Wolfgang.

#18 lore raw
Quoted 33 lines · Wolfgang Grandegger
Quoted 32 lines · Philippe Gerum
Quoted 11 lines · Philippe Gerum
Quoted 9 lines · Jan Kiszka

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Quoted 8 lines

Actually, the draft patch I sent you did not boot on my SMP box today, so qemu seems to have been a bit too friendly. Knowing that, issuing a half-baked patch would have made no sense, so I finally refrained from doing that. Since I'm now basically in love with the genirq layer (at least for x86) compared to the utter mess that we had to endure previously, I've decided to tackle the issue completely, and rewrite the I-pipe interrupt flow in order to leverage it. Will post something asap.

Ok, here we are. I've just merged 2.6.19-ipipe-1.6-00. It has been tested on a low-end classic Pentium 90Mhz, a dusty two-way Celeron 750Mhz, and on a terrible Celeron 1GHz oldish laptop. Looks ok so far, and even passed the horrid "dohell" test on the SMP box, just smiling. However, I don't have the required hw at hand to check if our friend the MSI support is not killing us once more. This said, the MSI support in 2.6.19 also conforms to the genirq specs, so there's hope.

The patch is available from the Adeos download area, and I've also committed it to the SVN trunk/.

Quoted 8 lines
Quoted 5 lines

Feedback welcome,

PS: I have the corresponding quilt-managed patches available upon request, to the people who want to use this work as a reference for porting to other archs.

You mean that you have separate patches for the common and arch dependent part.

Mostly, yes. The patches are split by function, but this usually correlates with the noarch / arch-specific break down view too.

Quoted 1 line

That would be nice. I'm interested!

http://download.gna.org/adeos/patches/v2.6/i386/split/

Quoted 4 lines

As a consequence we
could provide separated patches in general and prepare-kernel.sh applies them in sequence. Just an idea for the future.

Problem is that we would have to store a set of patches for each Adeos version/arch combo, instead of a single one. What advantage do you see in breaking the Adeos patches down for prepare-kernel.sh?

Quoted 2 lines

Wolfgang.

Signature · 1 line
Philippe.
#19 lore raw
Quoted 47 lines · Philippe Gerum
Quoted 32 lines · Wolfgang Grandegger
Quoted 31 lines · Philippe Gerum
Quoted 11 lines · Philippe Gerum
Quoted 9 lines · Jan Kiszka

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Quoted 8 lines

Actually, the draft patch I sent you did not boot on my SMP box today, so qemu seems to have been a bit too friendly. Knowing that, issuing a half-baked patch would have made no sense, so I finally refrained from doing that. Since I'm now basically in love with the genirq layer (at least for x86) compared to the utter mess that we had to endure previously, I've decided to tackle the issue completely, and rewrite the I-pipe interrupt flow in order to leverage it. Will post something asap.

Ok, here we are. I've just merged 2.6.19-ipipe-1.6-00. It has been tested on a low-end classic Pentium 90Mhz, a dusty two-way Celeron 750Mhz, and on a terrible Celeron 1GHz oldish laptop. Looks ok so far, and even passed the horrid "dohell" test on the SMP box, just smiling. However, I don't have the required hw at hand to check if our friend the MSI support is not killing us once more. This said, the MSI support in 2.6.19 also conforms to the genirq specs, so there's hope.

The patch is available from the Adeos download area, and I've also committed it to the SVN trunk/.

Quoted 6 lines
Quoted 5 lines

Feedback welcome,

PS: I have the corresponding quilt-managed patches available upon request, to the people who want to use this work as a reference for porting to other archs.

You mean that you have separate patches for the common and arch dependent part.

Mostly, yes. The patches are split by function, but this usually correlates with the noarch / arch-specific break down view too.

Quoted 1 line

That would be nice. I'm interested!

http://download.gna.org/adeos/patches/v2.6/i386/split/

Quoted 7 lines
Quoted 3 lines

As a consequence we
could provide separated patches in general and prepare-kernel.sh applies them in sequence. Just an idea for the future.

Problem is that we would have to store a set of patches for each Adeos version/arch combo, instead of a single one. What advantage do you see in breaking the Adeos patches down for prepare-kernel.sh?

Maintenance issues for the noarch part, e.g., if you fix a bug in the common part or add new features it's available for all arch. But I see your point. It's a bit more complicated and there are also patch version numbers.

Wolfgang.

#20 lore raw
Quoted 54 lines · Wolfgang Grandegger
Quoted 53 lines · Philippe Gerum
Quoted 32 lines · Wolfgang Grandegger
Quoted 31 lines · Philippe Gerum
Quoted 11 lines · Philippe Gerum
Quoted 9 lines · Jan Kiszka

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Quoted 8 lines

Actually, the draft patch I sent you did not boot on my SMP box today, so qemu seems to have been a bit too friendly. Knowing that, issuing a half-baked patch would have made no sense, so I finally refrained from doing that. Since I'm now basically in love with the genirq layer (at least for x86) compared to the utter mess that we had to endure previously, I've decided to tackle the issue completely, and rewrite the I-pipe interrupt flow in order to leverage it. Will post something asap.

Ok, here we are. I've just merged 2.6.19-ipipe-1.6-00. It has been tested on a low-end classic Pentium 90Mhz, a dusty two-way Celeron 750Mhz, and on a terrible Celeron 1GHz oldish laptop. Looks ok so far, and even passed the horrid "dohell" test on the SMP box, just smiling. However, I don't have the required hw at hand to check if our friend the MSI support is not killing us once more. This said, the MSI support in 2.6.19 also conforms to the genirq specs, so there's hope.

The patch is available from the Adeos download area, and I've also committed it to the SVN trunk/.

Quoted 7 lines
Quoted 5 lines

Feedback welcome,

PS: I have the corresponding quilt-managed patches available upon request, to the people who want to use this work as a reference for porting to other archs.

You mean that you have separate patches for the common and arch dependent part.

Mostly, yes. The patches are split by function, but this usually correlates with the noarch / arch-specific break down view too.

Quoted 1 line

That would be nice. I'm interested!

http://download.gna.org/adeos/patches/v2.6/i386/split/

Quoted 4 lines

As a consequence we
could provide separated patches in general and prepare-kernel.sh applies them in sequence. Just an idea for the future.

Quoted 6 lines
Quoted 3 lines

Problem is that we would have to store a set of patches for each Adeos version/arch combo, instead of a single one. What advantage do you see in breaking the Adeos patches down for prepare-kernel.sh?

Maintenance issues for the noarch part, e.g., if you fix a bug in the common part or add new features it's available for all arch.

I think this should be easier once we have moved to git, pulling commits is made simple (yeah, I'm late on this too...)

Quoted 5 lines

But I see
your point. It's a bit more complicated and there are also patch version numbers.

Wolfgang.

Signature · 1 line
Philippe.
#21 lore raw
Quoted 52 lines · Philippe Gerum
Quoted 51 lines · Wolfgang Grandegger
Quoted 50 lines · Philippe Gerum
Quoted 32 lines · Wolfgang Grandegger
Quoted 31 lines · Philippe Gerum
Quoted 11 lines · Philippe Gerum
Quoted 9 lines · Jan Kiszka

Anyway, there is an unreleased work-in-progress patch for x86 over -rc6 by Philippe. I recently had the chance to test it and hack a bit on the SMP IO-APIC part. It seems to work fine under UP, but SMP had some issues that are identified, but still need to be addressed - thanks to genirq, now in a widely arch-independent way.

Philippe, I know you are very busy, but shouldn't we make a pre-release available already, also to discuss further how to deal best with genirq on other platforms beyond x86?

Quoted 8 lines

Actually, the draft patch I sent you did not boot on my SMP box today, so qemu seems to have been a bit too friendly. Knowing that, issuing a half-baked patch would have made no sense, so I finally refrained from doing that. Since I'm now basically in love with the genirq layer (at least for x86) compared to the utter mess that we had to endure previously, I've decided to tackle the issue completely, and rewrite the I-pipe interrupt flow in order to leverage it. Will post something asap.

Ok, here we are. I've just merged 2.6.19-ipipe-1.6-00. It has been tested on a low-end classic Pentium 90Mhz, a dusty two-way Celeron 750Mhz, and on a terrible Celeron 1GHz oldish laptop. Looks ok so far, and even passed the horrid "dohell" test on the SMP box, just smiling. However, I don't have the required hw at hand to check if our friend the MSI support is not killing us once more. This said, the MSI support in 2.6.19 also conforms to the genirq specs, so there's hope.

The patch is available from the Adeos download area, and I've also committed it to the SVN trunk/.

Quoted 7 lines
Quoted 5 lines

Feedback welcome,

PS: I have the corresponding quilt-managed patches available upon request, to the people who want to use this work as a reference for porting to other archs.

You mean that you have separate patches for the common and arch dependent part.

Mostly, yes. The patches are split by function, but this usually correlates with the noarch / arch-specific break down view too.

Quoted 1 line

That would be nice. I'm interested!

http://download.gna.org/adeos/patches/v2.6/i386/split/

Quoted 4 lines

As a consequence we
could provide separated patches in general and prepare-kernel.sh applies them in sequence. Just an idea for the future.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Problem is that we would have to store a set of patches for each Adeos version/arch combo, instead of a single one. What advantage do you see in breaking the Adeos patches down for prepare-kernel.sh?

Maintenance issues for the noarch part, e.g., if you fix a bug in the common part or add new features it's available for all arch.

I think this should be easier once we have moved to git, pulling commits is made simple (yeah, I'm late on this too...)

Ah, I just read the keyword: git! ;)

Rough idea from my side on a potential organisation of the git trees:

o A generic I-pipe core tree that primarily targets git head (i.e. 2.6)
o One branch for git head, pulls both from Linus' tree and the I-pipe core
o One tree for each major 2.6 version in maintenance mode, pulls from related stable branch and I-pipe core (when applicable)
o Only if required: a generic I-pipe core tree for 2.4
o One tree for 2.4 head to maintain x86
o One tree for 2.4 ELDK to maintain PPC

Quite a lot trees... Do you this this may work?

Jan

#22 lore raw

[Xenomai-core] I-pipe git trees

On Sat, 2006-12-02 at 18:59 +0100, Jan Kiszka wrote:

[...Resuming the discussion on both interested lists...]

Quoted 5 lines

Rough idea from my side on a potential organisation of the git trees:

o A generic I-pipe core tree that primarily targets git head (i.e. 2.6)
o One branch for git head, pulls both from Linus' tree and the I-pipe core

What would be the purpose of this branch?

Quoted 3 lines

o One tree for each major 2.6 version in maintenance mode, pulls from related stable branch and I-pipe core (when applicable)
o Only if required: a generic I-pipe core tree for 2.4

It should not be needed. I-pipe for 2.4 is in deep maintenance mode, and the latest 2.6 pipeline core is no more compatible with the 2.4 version anyway, due to several infrastructure changes in the vanilla kernel, e.g. genirq. So from now on, we won't backport much from the 2.6 series to 2.4, except perhaps critical bug fixes. Most (if not all) of the changes on those trees are much likely to be 2.4-specific, as time passes.

Quoted 3 lines

o One tree for 2.4 head to maintain x86
o One tree for 2.4 ELDK to maintain PPC

Yes, we definitely need those.

Quoted 1 line

Quite a lot trees... Do you this this may work?

It really depends on what we try to achieve with implementing a new workflow. At least, I can tell why we need a new workflow, which could give us some hint about the one we should pick.

Basically, the reason is that I don't scale anymore when it comes to maintain the six I-pipe ports, even if for a few of them, I'm not directly maintaining the arch-dependent parts (just reviewing), but only the generic core. Given that the Xenomai maintenance is now unfortunately done on my free time too, something needs to be done in order to optimize those processes.

Now that some recurrent contributors showed up for helping with some ports, it's time to allow the various I-pipe ports to develop at their own pace, while still being reasonably in sync with a reference implementation. There are quite talented people out there who know better than me when it comes to hw platforms they are dealing with on a daily basis, so let them tackle the issue, if they accept to.

The bottom-line:

- Not all trees are going to be cloned from mainline; some architectures are not even mainline yet (e.g. blackfin). This is why relying on competent people for tracking the right kernel source for any given architecture is critical, and beyond that, people who know enough about the technical trends going on for the Linux port in question (e.g. ppc and arm).

- In the new workflow, I'm going to keep working on the generic I-pipe core, and lead the maintenance for the ports which have no better maintainer in sight.

- I want this process to add flexibility, by decoupling the evolution of the various ports, without introducing chaos. This should be possible with all the maintainers keeping an eye on the reference implementation I'll be working on, and improving with their input.

- Keep it simple. I'm slow, damnit!

Signature · 1 line
Philippe.
#23 lore raw

[Xenomai-core] Re: I-pipe git trees

Quoted 11 lines · Philippe Gerum

On Sat, 2006-12-02 at 18:59 +0100, Jan Kiszka wrote:

[...Resuming the discussion on both interested lists...]

Quoted 5 lines

Rough idea from my side on a potential organisation of the git trees:

o A generic I-pipe core tree that primarily targets git head (i.e. 2.6)
o One branch for git head, pulls both from Linus' tree and the I-pipe core

What would be the purpose of this branch?

Let me first sort the term chaos of "trees" and "branches" I left behind. Each line in the following ascii graphic represents a git repository (or tree). The 2.6 repositories may have branches to maintain I-pipe patches for certain kernel releases.

  ^        ^          ^        ^       ^    ^
  |        | ...      |        |       |    |
  |        |/         |        |       |    |
  |        | 2.6.19   |        | ...   |    |
  |        |/         |        |/      |    |
  |        | 2.6.17   |        | ?     |    |
  |        |/         |        |/      |    |
  |        | 2.6.16   |        | ?     |    |
  |        |/         |        |/      |    |
I-pipe  Mainline   Blackfin [other    2.4  2.4
 Core     Head     CVS HEAD archs?]   x86  ELDK

Except for the 2.4 repositories or if some branch is in maintenance mode and only tracks bug fixes, all trees pull their generic I-pipe support regularly from the core tree.

Centre of gravity is the mainline tree. Its head tries to follow Linus' tree closely (probably best during the last weeks of a -rc cycle). Meanwhile, it's branches maintain support for official releases. This support is kept up-to-date until we have a more recent Linux version for all archs in question. Or we keep it running as a stable branch (I have 2.6.16 in mind here).

If some arch is not in mainline or has a better tree to follow, we need a separate repository like for Blackfin. Another reason for separation could be access control, i.e. granting some arch maintainer exclusive access to a tree.

And for I-pipe support based on vendor-specific board patches, maintained by people "out-of-tree", we will then have the core + the mainline repository to cherry-pick I-pipe changes, helping to build I-pipe patches "from scratch" - when really required.

Jan

#24 lore raw
In reply to Benjamin Zores
Quoted 11 lines · Benjamin Zores
Quoted 8 lines · On Mon, 27 Nov 2006 13:11:23 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 7 lines · Benjamin Zores
Quoted 4 lines · On Mon, 27 Nov 2006 12:21:25 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 3 lines

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Problems with IRQs?

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

As I pointed out in my previous mail, the IRQ handling is not yet correct for powerpc. Try to correct his first.

The 2.6.19 having been released out, and working much better on my card than the vanilla 2.6.18 used to be, I'm now more kind to adapt my patch to this latest kernel.

I know this problem very well. The PowerPC Linux kernel is currently a fast moving target and 2.6.19 breaks the Adeos-IPIPE ppc patch again, grrr.

Quoted 6 lines

However the IRQ handling API seem to have changed a lot
and i was wondering if some work on porting Adeos
(x86/ppc, not yet powerpc of course) patches already have been started by someone here ?

(i.e. something i can work from to adapt my new patch)

I will have a look when time permits. Hopefully end of this week. If I'm lucky, I may get the PowerPC tree up and running on my Lite5200. There are already some promising patches around.

Wolfgang.

#25 lore raw
In reply to Benjamin Zores
Quoted 11 lines · Benjamin Zores
Quoted 8 lines · On Mon, 27 Nov 2006 13:11:23 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 7 lines · Benjamin Zores
Quoted 4 lines · On Mon, 27 Nov 2006 12:21:25 +0100 Wolfgang Grandegger <[email protected]> wrote:
Quoted 3 lines

Well, I hack a bit my patch to make it compile and the kernel already booted. Though it hangs when loading the SATA driver.
I have no idea why atm.

Problems with IRQs?

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

Probably, as when unplugging the SATA drive, the boot goes further but then hang at USB detection (both are handlign IRQs a lot i guess). Would be interesting if someone could test on other board than just mine.

As I pointed out in my previous mail, the IRQ handling is not yet correct for powerpc. Try to correct his first.

The 2.6.19 having been released out, and working much better on my card than the vanilla 2.6.18 used to be, I'm now more kind to adapt my patch to this latest kernel.

OK.

Quoted 4 lines

However the IRQ handling API seem to have changed a lot
and i was wondering if some work on porting Adeos
(x86/ppc, not yet powerpc of course) patches already have been started by someone here ?

I have now a preliminary patch for adeos-ipipe-2.6.19-ppc-1.5-00. The porting was rather straight-forward, as the ppc tree does not use the new "genirq" interface, in contrast to the powerpc tree (that's what you have realized as well).

Quoted 1 line

(i.e. something i can work from to adapt my new patch)

Therefore the port of the powerpc tree should be based on Philippe's new adeos-ipipe-2.6.19-i386-1.6-00. Unfortunately, I still do not have a board by hand supported by the powerpc tree.

Wolfgang.

#26 lore raw
Quoted 4 lines · On Tue, 05 Dec 2006 11:17:07 +0100 Wolfgang Grandegger <[email protected]> wrote:

I have now a preliminary patch for adeos-ipipe-2.6.19-ppc-1.5-00. The porting was rather straight-forward, as the ppc tree does not use the new "genirq" interface, in contrast to the powerpc tree (that's what you have realized as well).

Well, i guess the old "ppc" arch is bound to die sooner or later. New developments should always be done against "powerpc" arch imho.

Quoted 3 lines

Therefore the port of the powerpc tree should be based on Philippe's new adeos-ipipe-2.6.19-i386-1.6-00. Unfortunately, I still do not have a board by hand supported by the powerpc tree.

I haven't had much much time investigating the problem till now. But from what i've seen from Philippe's splitted patches, many of them that were supposed to be generic (i.e. don't have i386 in their name) still have references to x86 changes.
Is it a normal behavior ?

(about dev board, no one's developing on lite5200 or sth like that ?)

Ben

#27 lore raw
Quoted 7 lines · Benjamin Zores
Quoted 1 line · On Tue, 05 Dec 2006 11:17:07 +0100 Wolfgang Grandegger <[email protected]> wrote:

I have now a preliminary patch for adeos-ipipe-2.6.19-ppc-1.5-00. The porting was rather straight-forward, as the ppc tree does not use the new "genirq" interface, in contrast to the powerpc tree (that's what you have realized as well).

Well, i guess the old "ppc" arch is bound to die sooner or later. New developments should always be done against "powerpc" arch imho.

Well, the powerpc tree is still highly experimental and only a few embedded boards are already supported. I guess it will take a long time before the ppc tree finally gets buried, especially because porting is not really trivial (due to OF, IRQ layer, etc.),

Quoted 7 lines
Quoted 1 line

Therefore the port of the powerpc tree should be based on Philippe's new adeos-ipipe-2.6.19-i386-1.6-00. Unfortunately, I still do not have a board by hand supported by the powerpc tree.

I haven't had much much time investigating the problem till now. But from what i've seen from Philippe's splitted patches, many of them that were supposed to be generic (i.e. don't have i386 in their name) still have references to x86 changes.
Is it a normal behavior ?

Unfortunately, "generic" applies only to the Linux part. I realized, that the new IPIPE support for the genirqs requires even more arch-specific modifications than the old interface :-( on PowerPC.

Quoted 2 lines

(about dev board, no one's developing on lite5200 or sth like that ?)

Have you ever worked with that board under 2.6? It is not even well supported by the old ppc tree and you need patches, which are available somewhere but still require extra tweaking. I have such a board on my table and if I'm lucky, I will get U-Boot with OF support up and booting Linux PowerPC 2.6.19 ... but I need plenty of luck.

Wolfgang.

#28 lore raw
Quoted 3 lines · On Tue, 05 Dec 2006 14:09:38 +0100 Wolfgang Grandegger <[email protected]> wrote:

Unfortunately, "generic" applies only to the Linux part. I realized, that the new IPIPE support for the genirqs requires even more arch-specific modifications than the old interface :-( on PowerPC.

That's pretty bad news :-(

Quoted 5 lines

Have you ever worked with that board under 2.6? It is not even well supported by the old ppc tree and you need patches, which are available somewhere but still require extra tweaking. I have such a board on my table and if I'm lucky, I will get U-Boot with OF support up and booting Linux PowerPC 2.6.19 ... but I need plenty of luck.

Nope, but i've seen recent commits for better support on kernel git for upcoming 2.6.20.

Btw, Freescale have GIT trees for UBoot with support for many of their CPUs (and support for OF as well). See http://opensource.freescale.com/

Ben

#29 lore raw
Quoted 6 lines · Benjamin Zores
Quoted 1 line · On Tue, 05 Dec 2006 14:09:38 +0100 Wolfgang Grandegger <[email protected]> wrote:

Unfortunately, "generic" applies only to the Linux part. I realized, that the new IPIPE support for the genirqs requires even more arch-specific modifications than the old interface :-( on PowerPC.

That's pretty bad news :-(

Well, but that part is not really tricky.

Quoted 4 lines
Quoted 1 line

Have you ever worked with that board under 2.6? It is not even well supported by the old ppc tree and you need patches, which are available somewhere but still require extra tweaking. I have such a board on my table and if I'm lucky, I will get U-Boot with OF support up and booting Linux PowerPC 2.6.19 ... but I need plenty of luck.

Nope, but i've seen recent commits for better support on kernel git for upcoming 2.6.20.

Yes, but till now it was not working out of the box.

Quoted 2 lines

Btw, Freescale have GIT trees for UBoot with support for many of their CPUs (and support for OF as well). See http://opensource.freescale.com/

OK,

Thanks.

Wolfgang.

#30 lore raw
In reply to Wolfgang Grandegger
Quoted 27 lines · Wolfgang Grandegger
Quoted 10 lines · Benjamin Zores
Quoted 4 lines · On Tue, 05 Dec 2006 11:17:07 +0100 Wolfgang Grandegger <[email protected]> wrote:

I have now a preliminary patch for adeos-ipipe-2.6.19-ppc-1.5-00. The porting was rather straight-forward, as the ppc tree does not use the new "genirq" interface, in contrast to the powerpc tree (that's what you have realized as well).

Well, i guess the old "ppc" arch is bound to die sooner or later. New developments should always be done against "powerpc" arch imho.

Well, the powerpc tree is still highly experimental and only a few embedded boards are already supported. I guess it will take a long time before the ppc tree finally gets buried, especially because porting is not really trivial (due to OF, IRQ layer, etc.),

Quoted 9 lines
Quoted 3 lines

Therefore the port of the powerpc tree should be based on Philippe's new adeos-ipipe-2.6.19-i386-1.6-00. Unfortunately, I still do not have a board by hand supported by the powerpc tree.

I haven't had much much time investigating the problem till now. But from what i've seen from Philippe's splitted patches, many of them that were supposed to be generic (i.e. don't have i386 in their name) still have references to x86 changes.
Is it a normal behavior ?

Quoted 3 lines

Unfortunately, "generic" applies only to the Linux part. I realized, that the new IPIPE support for the genirqs requires even more arch-specific modifications than the old interface :-( on PowerPC.

How comes? I haven't found time to analyse this for the latest x86 patch, but there it should be "more generic" than before. Do you think this is a genirq issue or an I-pipe problem?

Jan

#31 lore raw
Quoted 24 lines · Jan Kiszka
Quoted 23 lines · Wolfgang Grandegger
Quoted 9 lines · Benjamin Zores
Quoted 4 lines · On Tue, 05 Dec 2006 11:17:07 +0100 Wolfgang Grandegger <[email protected]> wrote:

I have now a preliminary patch for adeos-ipipe-2.6.19-ppc-1.5-00. The porting was rather straight-forward, as the ppc tree does not use the new "genirq" interface, in contrast to the powerpc tree (that's what you have realized as well).

Well, i guess the old "ppc" arch is bound to die sooner or later. New developments should always be done against "powerpc" arch imho.

Well, the powerpc tree is still highly experimental and only a few embedded boards are already supported. I guess it will take a long time before the ppc tree finally gets buried, especially because porting is not really trivial (due to OF, IRQ layer, etc.),

Quoted 8 lines
Quoted 3 lines

Therefore the port of the powerpc tree should be based on Philippe's new adeos-ipipe-2.6.19-i386-1.6-00. Unfortunately, I still do not have a board by hand supported by the powerpc tree.

I haven't had much much time investigating the problem till now. But from what i've seen from Philippe's splitted patches, many of them that were supposed to be generic (i.e. don't have i386 in their name) still have references to x86 changes.
Is it a normal behavior ?

Quoted 7 lines
Quoted 3 lines

Unfortunately, "generic" applies only to the Linux part. I realized, that the new IPIPE support for the genirqs requires even more arch-specific modifications than the old interface :-( on PowerPC.

How comes? I haven't found time to analyse this for the latest x86 patch, but there it should be "more generic" than before. Do you think this is a genirq issue or an I-pipe problem?

Well, it's nothing serious and we should discuss this issue in a separated thread. I just wanted to have a closer look to the new port before asking. At a first glance I saw that the irq_chip structure has two new elements, ipipe_ack and ipipe_eoi. This requires patching of every PIC interface. There are a few for x86 but plenty for PowerPC. Philippe, is this really necessary? I would prefer the old style using "#ifndef CONFIG_IPIPE" around the "chip->ack" in common code.

Wolfgang,

#32 lore raw
Quoted 33 lines · Wolfgang Grandegger
Quoted 24 lines · Jan Kiszka
Quoted 23 lines · Wolfgang Grandegger
Quoted 9 lines · Benjamin Zores
Quoted 4 lines · On Tue, 05 Dec 2006 11:17:07 +0100 Wolfgang Grandegger <[email protected]> wrote:

I have now a preliminary patch for adeos-ipipe-2.6.19-ppc-1.5-00. The porting was rather straight-forward, as the ppc tree does not use the new "genirq" interface, in contrast to the powerpc tree (that's what you have realized as well).

Well, i guess the old "ppc" arch is bound to die sooner or later. New developments should always be done against "powerpc" arch imho.

Well, the powerpc tree is still highly experimental and only a few embedded boards are already supported. I guess it will take a long time before the ppc tree finally gets buried, especially because porting is not really trivial (due to OF, IRQ layer, etc.),

Quoted 8 lines
Quoted 3 lines

Therefore the port of the powerpc tree should be based on Philippe's new adeos-ipipe-2.6.19-i386-1.6-00. Unfortunately, I still do not have a board by hand supported by the powerpc tree.

I haven't had much much time investigating the problem till now. But from what i've seen from Philippe's splitted patches, many of them that were supposed to be generic (i.e. don't have i386 in their name) still have references to x86 changes.
Is it a normal behavior ?

Quoted 7 lines
Quoted 3 lines

Unfortunately, "generic" applies only to the Linux part. I realized, that the new IPIPE support for the genirqs requires even more arch-specific modifications than the old interface :-( on PowerPC.

How comes? I haven't found time to analyse this for the latest x86 patch, but there it should be "more generic" than before. Do you think this is a genirq issue or an I-pipe problem?

Quoted 7 lines

Well, it's nothing serious and we should discuss this issue in a separated thread. I just wanted to have a closer look to the new port before asking. At a first glance I saw that the irq_chip structure has two new elements, ipipe_ack and ipipe_eoi. This requires patching of every PIC interface. There are a few for x86 but plenty for PowerPC. Philippe, is this really necessary? I would prefer the old style using "#ifndef CONFIG_IPIPE" around the "chip->ack" in common code.

As just replied to Jan, this is a matter of the arch maintainer's taste. If you ask me, I would see no issue changing kernel/irq/chip.c on a per-port basis, for implementing the best/safest approach. Changes in the I-pipe core layer are not likely to happen there, anyway, so I don't see any maintenance hell showing up because we fork the implementation there.

Quoted 7 lines

Wolfgang,

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

Signature · 1 line
Philippe.
#33 lore raw
Quoted 32 lines · Philippe Gerum
Quoted 31 lines · Wolfgang Grandegger
Quoted 30 lines · Jan Kiszka
Quoted 18 lines · Wolfgang Grandegger
Quoted 9 lines · Benjamin Zores
Quoted 4 lines · On Tue, 05 Dec 2006 11:17:07 +0100 Wolfgang Grandegger <[email protected]> wrote:

I have now a preliminary patch for adeos-ipipe-2.6.19-ppc-1.5-00. The porting was rather straight-forward, as the ppc tree does not use the new "genirq" interface, in contrast to the powerpc tree (that's what you have realized as well).

Well, i guess the old "ppc" arch is bound to die sooner or later. New developments should always be done against "powerpc" arch imho.

Well, the powerpc tree is still highly experimental and only a few embedded boards are already supported. I guess it will take a long time before the ppc tree finally gets buried, especially because porting is not really trivial (due to OF, IRQ layer, etc.),

Quoted 3 lines
Quoted 3 lines

Therefore the port of the powerpc tree should be based on Philippe's new adeos-ipipe-2.6.19-i386-1.6-00. Unfortunately, I still do not have a board by hand supported by the powerpc tree.

Quoted 8 lines
Quoted 5 lines

I haven't had much much time investigating the problem till now. But from what i've seen from Philippe's splitted patches, many of them that were supposed to be generic (i.e. don't have i386 in their name) still have references to x86 changes.
Is it a normal behavior ?

Unfortunately, "generic" applies only to the Linux part. I realized, that the new IPIPE support for the genirqs requires even more arch-specific modifications than the old interface :-( on PowerPC.

How comes? I haven't found time to analyse this for the latest x86 patch, but there it should be "more generic" than before. Do you think this is a genirq issue or an I-pipe problem?

Quoted 8 lines
Quoted 1 line

Well, it's nothing serious and we should discuss this issue in a separated thread. I just wanted to have a closer look to the new port before asking. At a first glance I saw that the irq_chip structure has two new elements, ipipe_ack and ipipe_eoi. This requires patching of every PIC interface. There are a few for x86 but plenty for PowerPC. Philippe, is this really necessary? I would prefer the old style using "#ifndef CONFIG_IPIPE" around the "chip->ack" in common code.

As just replied to Jan, this is a matter of the arch maintainer's taste. If you ask me, I would see no issue changing kernel/irq/chip.c on a per-port basis, for implementing the best/safest approach. Changes in the I-pipe core layer are not likely to happen there, anyway, so I don't see any maintenance hell showing up because we fork the implementation there.

OK, I actually prefer a common solution. When I have my Icecube board up and running with the powerpc tree (I'm fighting hard), I'm going to work on this topic.

Wolfgang.