I-pipe patch for ARM S3C24xx
Subsystems (2)
Hi all,
I'm currently working on porting I-pipe to the ARM S3C24xx. The patch is attached, it must be applied after the shipped adeos-ipipe-2.6.15-arm-1.5-01.patch. Unfortunately, there is still a severe bug somewhere. I built Xenomai as modules. When I try to modprobe xeno_native, the system hangs. No reaction at all, inlcuding serial console and network access. I guess that interrupts are not handled any more. From what I see if I spread some debug printk() into my code, the timer starts working under the control of the Xenomai domain and one or two calls to the Linux timer interrupt handler are made. But after that nothing happens any more.
As I try to find the bug for some days now but wasn't successful maybe the experts have any hints where to continue searching. Or perhaps there is someone who can test it and confirm or disprove my observation? It would be great to support one more ARM model.
Sebastian
arch/arm/mach-s3c2410/irq.c +80 -1
@@ -3,6 +3,8 @@* Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks <[email protected]> * +* Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or
@@ -48,7 +50,10 @@* * 25-Jul-2005 Ben Dooks * Split the S3C2440 IRQ code to seperate file -*/ +* +* 11-Oct-2006 Sebastian Smolorz +* Added Adeos/Ipipe support +*/ #include <linux/init.h> #include <linux/module.h>
@@ -56,6 +61,7 @@#include <linux/ioport.h> #include <linux/ptrace.h> #include <linux/sysdev.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/irq.h>
@@ -70,6 +76,14 @@#include "pm.h" #include "irq.h" +#ifdef CONFIG_IPIPE +#ifdef CONFIG_CPU_S3C2440 +extern void __ipipe_s3c_irq_demux_wdtac97 (unsigned int irq, +struct pt_regs *regs); +extern void __ipipe_s3c_irq_demux_cam (unsigned int irq,struct pt_regs *regs); +#endif /* CONFIG_CPU_S3C2440 */ +#endif /* CONFIG_IPIPE */ +/* wakeup irq control */ #ifdef CONFIG_PM
@@ -573,6 +587,71 @@ s3c_irq_demux_uart2(unsigned int irq, } +#ifdef CONFIG_IPIPE +static void __ipipe_s3c_irq_demux_uart (unsigned int start, +unsigned int subsrc, +struct pt_regs *regs) +{ +unsigned int offset = start -IRQ_S3CUART_RX0 ; + + subsrc >>= offset; + subsrc &=7 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (start, regs); +if (subsrc &2 ) +__ipipe_handle_irq (start+1 , regs); +if (subsrc &4 ) +__ipipe_handle_irq (start+2 , regs); + } +} + +static void __ipipe_s3c_irq_demux_adc (unsigned int subsrc, +struct pt_regs *regs) +{ + subsrc >>=9 ; + subsrc &=3 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (IRQ_TC , regs); +if (subsrc &2 ) +__ipipe_handle_irq (IRQ_ADC , regs); + } +} + +void __ipipe_mach_demux_irq (unsigned irq,struct pt_regs *regs) +{ +unsigned int subsrc, submsk; +struct irqdesc *desc_unused = irq_desc + irq; + +/* read the current pending interrupts, and the mask +* for what it is available */ + subsrc =__raw_readl (S3C2410_SUBSRCPND ); + submsk =__raw_readl (S3C2410_INTSUBMSK ); + + subsrc &= ~submsk; + +if (irq ==IRQ_UART0 ) +__ipipe_s3c_irq_demux_uart (IRQ_S3CUART_RX0 , subsrc, regs); +else if (irq ==IRQ_UART1 ) +__ipipe_s3c_irq_demux_uart (IRQ_S3CUART_RX1 , subsrc, regs); +else if (irq ==IRQ_UART2 ) +__ipipe_s3c_irq_demux_uart (IRQ_S3CUART_RX2 , subsrc, regs); +else if (irq ==IRQ_ADCPARENT ) +__ipipe_s3c_irq_demux_adc (subsrc, regs); +#ifdef CONFIG_CPU_S3C2440 + else if (irq == IRQ_WDT) + __ipipe_s3c_irq_demux_wdtac97(subsrc, regs); + else if (irq == IRQ_CAM) + __ipipe_s3c_irq_demux_cam(subsrc, regs); +#endif /* CONFIG_CPU_S3C2440 */ + + desc_unused->chip->unmask (irq); +} +#endif /* CONFIG_IPIPE */ +/* s3c24xx_init_irq * * Initialise S3C2410 IRQ system
arch/arm/mach-s3c2410/s3c2440-irq.c +34 -1
@@ -3,6 +3,8 @@* Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks <[email protected]> * +* Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or
@@ -19,8 +21,10 @@* * Changelog: * 25-Jul-2005 BJD Split from irq.c +* 11-Oct-2006 Sebastian Smolorz +* Added Adeos/Ipipe support * -*/ +*/ #include <linux/init.h> #include <linux/module.h>
@@ -28,6 +32,7 @@#include <linux/ioport.h> #include <linux/ptrace.h> #include <linux/sysdev.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/irq.h>
@@ -157,6 +162,34 @@ static struct irqchip s3c_irq_cam = { .ack = s3c_irq_cam_ack, }; +#ifdef CONFIG_IPIPE +void __ipipe_s3c_irq_demux_wdtac97 (unsigned int subsrc,struct pt_regs *regs) +{ + subsrc >>=13 ; + subsrc &=3 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (IRQ_S3C2440_WDT , regs); +if (subsrc &2 ) +__ipipe_handle_irq (IRQ_S3C2440_AC97 , regs); + } +} + +void __ipipe_s3c_irq_demux_cam (unsigned int subsrc,struct pt_regs *regs) +{ + subsrc >>=11 ; + subsrc &=3 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (IRQ_S3C2440_CAM_C , regs); +if (subsrc &2 ) +__ipipe_handle_irq (IRQ_S3C2440_CAM_P , regs); + } +} +#endif /* CONFIG_IPIPE */ +static int s3c2440_irq_add (struct sys_device *sysdev) {unsigned int irqno;
arch/arm/mach-s3c2410/time.c +109 -46
225 lines not on this page · raw message
include/asm-arm/arch-s3c2410/irqs.h +18 -0
@@ -3,6 +3,8 @@* Copyright (c) 2003-2005 Simtec Electronics * Ben Dooks <[email protected]> * +* Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation.
@@ -13,6 +15,7 @@* 12-Mar-2004 BJD Fixed bug in header protection * 10-Feb-2005 BJD Added camera IRQ from [email protected] * 28-Feb-2005 BJD Updated s3c2440 IRQs +* 11-Oct-2006 Added Adeos/Ipipe support */
@@ -122,5 +125,20 @@#define NR_IRQS (IRQ_S3C2440_AC97+1) +#ifdef CONFIG_IPIPE +#ifdef CONFIG_CPU_S3C2440 +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_UART0 || \ + (irq) == IRQ_UART1 || \ + (irq) == IRQ_UART2 || \ + (irq) == IRQ_ADCPARENT || \ + (irq) == IRQ_WDT || \ + (irq) == IRQ_CAM) +#else /* !CONFIG_CPU_S3C2440 */ +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_UART0 || \ + (irq) == IRQ_UART1 || \ + (irq) == IRQ_UART2 || \ + (irq) == IRQ_ADCPARENT) +#endif /* CONFIG_CPU_S3C2440 */ +#endif /* CONFIG_IPIPE */ #endif /* __ASM_ARCH_IRQ_H */
Quoted 13 lines
Hi all,
I'm currently working on porting I-pipe to the ARM S3C24xx. The patch is attached, it must be applied after the shipped adeos-ipipe-2.6.15-arm-1.5-01.patch. Unfortunately, there is still a severe bug somewhere. I built Xenomai as modules. When I try to modprobe
xeno_native, the system hangs. No reaction at all, inlcuding serial console and network access. I guess that interrupts are not handled any more. From what I see if I spread some debugprintk()into my code, the timer starts working under the control of the Xenomai domain and one or two calls to the Linux timer interrupt handler are made. But after that nothing happens any more.
Quoted 4 lines
As I try to find the bug for some days now but wasn't successful maybe the experts have any hints where to continue searching. Or perhaps there is someone who can test it and confirm or disprove my observation? It would be great to support one more ARM model.
Small update with new infos: After Xenomai has (re)started the system timer the Linux timer interrupt handler ist called only once, but xnintr_clock_handler() is called several thousand times. So it seems that the timer interrupt handler of Linux is not properly called or Xenomai is starving Linux.
Sebastian
Quoted 24 lines · Sebastian Smolorz
Quoted 13 lines
Hi all,
I'm currently working on porting I-pipe to the ARM S3C24xx. The patch is attached, it must be applied after the shipped adeos-ipipe-2.6.15-arm-1.5-01.patch. Unfortunately, there is still a severe bug somewhere. I built Xenomai as modules. When I try to modprobe
xeno_native, the system hangs. No reaction at all, inlcuding serial console and network access. I guess that interrupts are not handled any more. From what I see if I spread some debugprintk()into my code, the timer starts working under the control of the Xenomai domain and one or two calls to the Linux timer interrupt handler are made. But after that nothing happens any more.Quoted 4 lines
As I try to find the bug for some days now but wasn't successful maybe the experts have any hints where to continue searching. Or perhaps there is someone who can test it and confirm or disprove my observation? It would be great to support one more ARM model.
Small update with new infos: After Xenomai has (re)started the system timer the Linux timer interrupt handler ist called only once, but
xnintr_clock_handler()is called several thousand times. So it seems that the timer interrupt handler of Linux is not properly called or Xenomai is starving Linux.
Quoted 6 lines
Sebastian
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Hi. I had the same Problem on my Netsilicon board.
I changed my timer-clock from CPU_CLK/64 to CPU_CLK so Xenomai is able to use it with a higher granularity (set_dec/get_dec). So my machine has 1769472 ticks per jiffy instead of 27648. (works only with 32bit timers)
Further I had to set CLOCK_TICK_RATE (/include/asm/arch-xxxx/timex.h) to real cpu frequency (im my case around 176000000).
Now I'm able to run latency with periods > 200us
- Manfred
Quoted 34 lines · Schlägl Manfred jun.
Quoted 24 lines · Sebastian Smolorz
Quoted 13 lines
Hi all,
I'm currently working on porting I-pipe to the ARM S3C24xx. The patch is attached, it must be applied after the shipped adeos-ipipe-2.6.15-arm-1.5-01.patch. Unfortunately, there is still a severe bug somewhere. I built Xenomai as modules. When I try to modprobe
xeno_native, the system hangs. No reaction at all, inlcuding serial console and network access. I guess that interrupts are not handled any more. From what I see if I spread some debugprintk()into my code, the timer starts working under the control of the Xenomai domain and one or two calls to the Linux timer interrupt handler are made. But after that nothing happens any more.Quoted 4 lines
As I try to find the bug for some days now but wasn't successful maybe the experts have any hints where to continue searching. Or perhaps there is someone who can test it and confirm or disprove my observation? It would be great to support one more ARM model.
Small update with new infos: After Xenomai has (re)started the system timer the Linux timer interrupt handler ist called only once, but
xnintr_clock_handler()is called several thousand times. So it seems that the timer interrupt handler of Linux is not properly called or Xenomai is starving Linux.Quoted 6 lines
Sebastian
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-coreHi. I had the same Problem on my Netsilicon board.
Quoted 8 lines
I changed my timer-clock from CPU_CLK/64 to
CPU_CLKso Xenomai is able to use it with a higher granularity (set_dec/get_dec). So my machine has 1769472 ticks per jiffy instead of 27648. (works only with 32bit timers)Further I had to set
CLOCK_TICK_RATE(/include/asm/arch-xxxx/timex.h) to real cpu frequency (im my case around 176000000).Now I'm able to run latency with periods > 200us
I think we have different problems. I will give a more detailed description in a separate mail.
Sebastian
P.S. Why did you change the mailing list within a thread? :-)
Hi,
here comes version 2 of the I-pipe patch for the S3C24xx ARM. The reported problem is solved, the timer works as expected as far as I can see. Linux is still there after insmod'ding the native skin. More test results will follow next week after I tortured the new patch with the whole testsuite arsenal. ;-)
The patch has got two suboptimal characteristics due to the generic ARM I-pipe implementation which I did not want to change during the first steps:
1. Regarding the demux of chained IRQs (See [1]). As the S3C24xx has more than one chained IRQ there are two consecutive queries for them in __ipipe_mach_irq_mux_p() and __ipipe_mach_demux_irq(). This could be optimized.
2. If the xenomai timer is stopped the first two jiffies for Linux are one timer tick too long. The solution could be a change of this line [2]. The patch for the S3C24xx needs a timer reload value of __ipipe_mach_ticks_per_jiffy-1 when Xenomai's timer is inactive. For example we could introduce a new inline function which is called in line 98 of hal.c. The new I-pipe patch would then call __ipipe_mach_set_dec(__ipipe_mach_ticks_per_jiffy-1) and the other ARM patches __ipipe_mach_set_dec(__ipipe_mach_ticks_per_jiffy).
Sebastian
[1]
http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/arch/arm/patches/adeos-ipipe-2.6.15-arm-1.5-01.patch?v=SVN-trunk;a=arm#L3761
[2]
http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/arch/arm/hal.c?v=SVN-trunk;a=arm#L98
arch/arm/mach-s3c2410/irq.c +80 -1
@@ -3,6 +3,8 @@* Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks <[email protected]> * +* Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or
@@ -48,7 +50,10 @@* * 25-Jul-2005 Ben Dooks * Split the S3C2440 IRQ code to seperate file -*/ +* +* 11-Oct-2006 Sebastian Smolorz +* Added Adeos/Ipipe support +*/ #include <linux/init.h> #include <linux/module.h>
@@ -56,6 +61,7 @@#include <linux/ioport.h> #include <linux/ptrace.h> #include <linux/sysdev.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/irq.h>
@@ -70,6 +76,14 @@#include "pm.h" #include "irq.h" +#ifdef CONFIG_IPIPE +#ifdef CONFIG_CPU_S3C2440 +extern void __ipipe_s3c_irq_demux_wdtac97 (unsigned int irq, +struct pt_regs *regs); +extern void __ipipe_s3c_irq_demux_cam (unsigned int irq,struct pt_regs *regs); +#endif /* CONFIG_CPU_S3C2440 */ +#endif /* CONFIG_IPIPE */ +/* wakeup irq control */ #ifdef CONFIG_PM
@@ -573,6 +587,71 @@ s3c_irq_demux_uart2(unsigned int irq, } +#ifdef CONFIG_IPIPE +static void __ipipe_s3c_irq_demux_uart (unsigned int start, +unsigned int subsrc, +struct pt_regs *regs) +{ +unsigned int offset = start -IRQ_S3CUART_RX0 ; + + subsrc >>= offset; + subsrc &=7 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (start, regs); +if (subsrc &2 ) +__ipipe_handle_irq (start+1 , regs); +if (subsrc &4 ) +__ipipe_handle_irq (start+2 , regs); + } +} + +static void __ipipe_s3c_irq_demux_adc (unsigned int subsrc, +struct pt_regs *regs) +{ + subsrc >>=9 ; + subsrc &=3 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (IRQ_TC , regs); +if (subsrc &2 ) +__ipipe_handle_irq (IRQ_ADC , regs); + } +} + +void __ipipe_mach_demux_irq (unsigned irq,struct pt_regs *regs) +{ +unsigned int subsrc, submsk; +struct irqdesc *desc_unused = irq_desc + irq; + +/* read the current pending interrupts, and the mask +* for what it is available */ + subsrc =__raw_readl (S3C2410_SUBSRCPND ); + submsk =__raw_readl (S3C2410_INTSUBMSK ); + + subsrc &= ~submsk; + +if (irq ==IRQ_UART0 ) +__ipipe_s3c_irq_demux_uart (IRQ_S3CUART_RX0 , subsrc, regs); +else if (irq ==IRQ_UART1 ) +__ipipe_s3c_irq_demux_uart (IRQ_S3CUART_RX1 , subsrc, regs); +else if (irq ==IRQ_UART2 ) +__ipipe_s3c_irq_demux_uart (IRQ_S3CUART_RX2 , subsrc, regs); +else if (irq ==IRQ_ADCPARENT ) +__ipipe_s3c_irq_demux_adc (subsrc, regs); +#ifdef CONFIG_CPU_S3C2440 + else if (irq == IRQ_WDT) + __ipipe_s3c_irq_demux_wdtac97(subsrc, regs); + else if (irq == IRQ_CAM) + __ipipe_s3c_irq_demux_cam(subsrc, regs); +#endif /* CONFIG_CPU_S3C2440 */ + + desc_unused->chip->unmask (irq); +} +#endif /* CONFIG_IPIPE */ +/* s3c24xx_init_irq * * Initialise S3C2410 IRQ system
arch/arm/mach-s3c2410/s3c2440-irq.c +34 -1
@@ -3,6 +3,8 @@* Copyright (c) 2003,2004 Simtec Electronics * Ben Dooks <[email protected]> * +* Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or
@@ -19,8 +21,10 @@* * Changelog: * 25-Jul-2005 BJD Split from irq.c +* 11-Oct-2006 Sebastian Smolorz +* Added Adeos/Ipipe support * -*/ +*/ #include <linux/init.h> #include <linux/module.h>
@@ -28,6 +32,7 @@#include <linux/ioport.h> #include <linux/ptrace.h> #include <linux/sysdev.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/irq.h>
@@ -157,6 +162,34 @@ static struct irqchip s3c_irq_cam = { .ack = s3c_irq_cam_ack, }; +#ifdef CONFIG_IPIPE +void __ipipe_s3c_irq_demux_wdtac97 (unsigned int subsrc,struct pt_regs *regs) +{ + subsrc >>=13 ; + subsrc &=3 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (IRQ_S3C2440_WDT , regs); +if (subsrc &2 ) +__ipipe_handle_irq (IRQ_S3C2440_AC97 , regs); + } +} + +void __ipipe_s3c_irq_demux_cam (unsigned int subsrc,struct pt_regs *regs) +{ + subsrc >>=11 ; + subsrc &=3 ; + +if (subsrc !=0 ) { +if (subsrc &1 ) +__ipipe_handle_irq (IRQ_S3C2440_CAM_C , regs); +if (subsrc &2 ) +__ipipe_handle_irq (IRQ_S3C2440_CAM_P , regs); + } +} +#endif /* CONFIG_IPIPE */ +static int s3c2440_irq_add (struct sys_device *sysdev) {unsigned int irqno;
arch/arm/mach-s3c2410/time.c +133 -26
230 lines not on this page · raw message
include/asm-arm/arch-s3c2410/irqs.h +18 -0
@@ -3,6 +3,8 @@* Copyright (c) 2003-2005 Simtec Electronics * Ben Dooks <[email protected]> * +* Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH +* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation.
@@ -13,6 +15,7 @@* 12-Mar-2004 BJD Fixed bug in header protection * 10-Feb-2005 BJD Added camera IRQ from [email protected] * 28-Feb-2005 BJD Updated s3c2440 IRQs +* 11-Oct-2006 Added Adeos/Ipipe support */
@@ -122,5 +125,20 @@#define NR_IRQS (IRQ_S3C2440_AC97+1) +#ifdef CONFIG_IPIPE +#ifdef CONFIG_CPU_S3C2440 +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_UART0 || \ + (irq) == IRQ_UART1 || \ + (irq) == IRQ_UART2 || \ + (irq) == IRQ_ADCPARENT || \ + (irq) == IRQ_WDT || \ + (irq) == IRQ_CAM) +#else /* !CONFIG_CPU_S3C2440 */ +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_UART0 || \ + (irq) == IRQ_UART1 || \ + (irq) == IRQ_UART2 || \ + (irq) == IRQ_ADCPARENT) +#endif /* CONFIG_CPU_S3C2440 */ +#endif /* CONFIG_IPIPE */ #endif /* __ASM_ARCH_IRQ_H */
Quoted 7 lines · Sebastian Smolorz
Hi,
here comes version 2 of the I-pipe patch for the S3C24xx ARM. The reported problem is solved, the timer works as expected as far as I can see. Linux is still there after insmod'ding the native skin. More test results will follow next week after I tortured the new patch with the whole testsuite arsenal. ;-)
The patch has got two suboptimal characteristics due to the generic ARM I-pipe implementation which I did not want to change during the first steps:
1. Regarding the demux of chained IRQs (See [1]). As the S3C24xx has more than one chained IRQ there are two consecutive queries for them in
__ipipe_mach_irq_mux_p()and__ipipe_mach_demux_irq(). This could be optimized.
You should use switch/case instead of if else if else if, the generated code would be better optimized.
Signature · 1 line
Gilles Chanteperdrix
Quoted 6 lines · Gilles Chanteperdrix
Quoted 4 lines · Sebastian Smolorz
Hi,
here comes version 2 of the I-pipe patch for the S3C24xx ARM. The reported problem is solved, the timer works as expected as far as I can see. Linux is still there after insmod'ding the native skin. More test results will follow next week after I tortured the new patch with the whole testsuite arsenal. ;-)
Quoted 8 lines
Quoted 3 lines
The patch has got two suboptimal characteristics due to the generic ARM I-pipe implementation which I did not want to change during the first steps:
1. Regarding the demux of chained IRQs (See [1]). As the S3C24xx has more than one chained IRQ there are two consecutive queries for them in
__ipipe_mach_irq_mux_p()and__ipipe_mach_demux_irq(). This could be optimized.You should use switch/case instead of if else if else if, the generated code would be better optimized.
You can make the test cheap test by using a mask.
#define __ipipe_irqbit(irq) (1 << ((irq) - S3C2410_CPUIRQ_OFFSET)) #ifdef CONFIG_CPU_S3C2440
#define __ipipe_muxed_irqmask (__ipipe_irqbit(IRQ_UART0) \ | __ipipe_irqbit(IRQ_UART1) \ | __ipipe_irqbit(IRQ_UART2) \ | __ipipe_irqbit(IRQ_ADCPARENT) \ | __ipipe_irqbit(IRQ_WDT) \ | __ipipe_irqbit(IRQ_CAM)) #else /* !CONFIG_CPU_S3C2440 */ #define __ipipe_muxed_irqmask (__ipipe_irqbit(IRQ_UART0) \ | __ipipe_irqbit(IRQ_UART1) \ | __ipipe_irqbit(IRQ_UART2) \ | __ipipe_irqbit(IRQ_ADCPARENT))
#endif /* CONFIG_CPU_S3C2440 */
#define __ipipe_mach_irq_mux_p(irq) \ ((irq) <= IRQ_ADCPARENT \ && (__ipipe_irqbit(irq) & __ipipe_muxed_irqmask(irq)))
Signature · 1 line
Gilles Chanteperdrix
Quoted 19 lines · Gilles Chanteperdrix
Quoted 18 lines · Gilles Chanteperdrix
Quoted 16 lines · Sebastian Smolorz
Hi,
here comes version 2 of the I-pipe patch for the S3C24xx ARM. The reported problem is solved, the timer works as expected as far as I can see. Linux is still there after insmod'ding the native skin. More test results will follow next week after I tortured the new patch with the whole testsuite arsenal. ;-)
The patch has got two suboptimal characteristics due to the generic ARM I-pipe implementation which I did not want to change during the first steps:
1. Regarding the demux of chained IRQs (See [1]). As the S3C24xx has more than one chained IRQ there are two consecutive queries for them in
__ipipe_mach_irq_mux_p()and__ipipe_mach_demux_irq(). This could be optimized.
Quoted 4 lines
Quoted 2 lines
You should use switch/case instead of if else if else if, the generated code would be better optimized.
You can make the test cheap test by using a mask.
Yes, I will do it that way. Thanks!
Sebastian