Xenomai v2.3.1
Subsystems (17)
Here is the first maintenance release for the v2.3.x branch. Short log follows:
[nucleus]
* Use ondemand-mapping disable feature if present (I-pipe).
* Allow creation of anonymous interrupt objects from kernel space.
* Allow sleeping scheduler lock.
* Fully rework priority tracking between schedulers (RPI).
* Provide for non-restartable syscalls upon signal receipt.
* Fix timer indexing in binary heap mode (timeout lossage).
* Fix synchronization issues regarding interrupt objects while reading /proc/xenomai/stat.
* Synchronize message pipe reading and streaming operations.
[psos]
* Add timer-related calls to the user-space interface.
* Fix ev_receive().
* Combine supervisor and user stack sizes in t_create().
[native]
* Fix rt_queue_delete(), rt_queue_unbind(), rt_heap_delete().
* Fix rt_cond_wait() upon signal receipt (grab mutex anew).
[posix]
* Fix pthread_cond_wait() upon signal receipt (grab mutex anew).
[rtai]
* Fix rt_task_make_periodic().
[rtdm]
* Support in-place re-initialisation of IPC objects.
[can]
* Fix delays in periodic mode.
* Implement either-or filtering of standard vs. extended frames.
* Stop device before unregistering it.
[arm]
* Add support for Atmel AT91-based platforms.
* Update support for IMX21 platforms.
* Upgrade 2.6.14 and 2.6.15 support to I-pipe 1.5 series.
* Upgrade to kernel 2.6.19 (I-pipe 1.6 series).
* Add support for GCC 4.1.
[powerpc]
* Upgrade to kernel 2.6.19.
[i386]
* Use regular IPI support code to broadcast the timer IRQ.
* Upgrade to kernel 2.6.20.
See the ChangeLog for details.
http://download.gna.org/xenomai/stable/xenomai-2.3.1.tar.bz2
Signature · 1 line
Philippe.
Quoted 8 lines · Philippe Gerum
Here is the first maintenance release for the v2.3.x branch. Short log follows:
[arm]
* Add support for Atmel AT91-based platforms.
* Update support for IMX21 platforms.
* Upgrade 2.6.14 and 2.6.15 support to I-pipe 1.5 series.
* Upgrade to kernel 2.6.19 (I-pipe 1.6 series).
* Add support for GCC 4.1.
An additional item on ARM: the lockup which occured when setting a too low period in the latency test is fixed. For this, we owe a big thanks to Steven Scholz.
Signature · 1 line
Gilles Chanteperdrix
Guys:
Quoted 3 lines · Philippe Gerum
[posix] * Fix pthread_cond_wait() upon signal receipt (grab mutex anew).
Probably OT, but someone was complaining to me the other day that pthreads running on SCHED_FIFO/SCHED_RR that are blocked on mutexes don't release in priority order. This was on a stock 2.6.18 kernel, "recent glibc" (I didn't catch which version or config), ARM9 platform.
First question: Is this actually true?
Second question: Does Xenomai fix this? Do more recent kernel developments fix this?
Point me at the appropriate RTFM or code if that's the appropriate answer. :)
Thanks,
b.g.
Signature · 2 lines
Bill Gatliff [email protected]
Quoted 14 lines · Bill Gatliff
Guys:
Quoted 3 lines · Philippe Gerum
[posix] * Fix pthread_cond_wait() upon signal receipt (grab mutex anew).Probably OT, but someone was complaining to me the other day that pthreads running on SCHED_FIFO/SCHED_RR that are blocked on mutexes don't release in priority order. This was on a stock 2.6.18 kernel, "recent glibc" (I didn't catch which version or config), ARM9 platform.
Quoted 7 lines
First question: Is this actually true?
Second question: Does Xenomai fix this? Do more recent kernel developments fix this?
Point me at the appropriate RTFM or code if that's the appropriate answer. :)
The appropriate RTFM is the POSIX spec [1]
In short, it says: "If there are threads blocked on the mutex object referenced by 'mutex' when pthread_mutex_unlock() is called, resulting in the mutex becoming available, the scheduling policy shall determine which thread shall acquire the mutex."
So, the correct implementation is to release a mutex in priority order.
I think the glibc implements this correctly (at least NPTL), on the other hand, I believe it is not true for threads running with the SCHED_OTHER policy, in order to prevent starvation.
Xenomai POSIX skin implements this correctly as well. To be more specific about this, Xenomai mutexes, like mutexes of all other skins, are built using the "xnsynch_t" objects [2] which has two possible ways of implementing its internal wait queue: either in FIFO order if xnsynch_init is passed the XNSYNCH_FIFO flag, or in priority order if xnsynch_init is passed the XNSYNCH_PRIO flag. pthread_mutex_init passes the XNSYNCH_PRIO flag to xnsynch_init.
[1]:http://www.opengroup.org/onlinepubs/000095399/functions/pthread_mutex_lock.html [2]:http://www.xenomai.org/documentation/trunk/html/api/group__synch.html
Signature · 1 line
Gilles Chanteperdrix
Quoted 9 lines · Gilles Chanteperdrix
Quoted 8 lines
Probably OT, but someone was complaining to me the other day that pthreads running on SCHED_FIFO/SCHED_RR that are blocked on mutexes don't release in priority order. This was on a stock 2.6.18 kernel, "recent glibc" (I didn't catch which version or config), ARM9 platform.
First question: Is this actually true?
Second question: Does Xenomai fix this? Do more recent kernel developments fix this?
Point me at the appropriate RTFM or code if that's the appropriate answer. :)
Quoted 9 lines
The appropriate RTFM is the POSIX spec [1]
In short, it says: "If there are threads blocked on the mutex object referenced by 'mutex' when
pthread_mutex_unlock()is called, resulting in the mutex becoming available, the scheduling policy shall determine which thread shall acquire the mutex."So, the correct implementation is to release a mutex in priority order.
Right, I'm fully aware of that (I teach a class on POSIX.1b from time to time).
But this person insisted that things didn't work that way in a stock 2.6.18--- which was a complete surprise to me. Just wondering if anyone here had noticed or not.
I suppose another possibility is that the "mutex" they were referring to was a kernel mutex used to implement blocking i/o in a driver, and not a userspace POSIX mutex. But I would expect that one to behave itself too...
Quoted 4 lines
I think the glibc implements this correctly (at least NPTL), on the other hand, I believe it is not true for threads running with the
SCHED_OTHERpolicy, in order to prevent starvation.
Right. All bets are off with SCHED_OTHER, which is the way things are supposed to be.
b.g.
Signature · 2 lines
Bill Gatliff [email protected]
Quoted 31 lines · Bill Gatliff
Quoted 15 lines · Gilles Chanteperdrix
Quoted 5 lines
Probably OT, but someone was complaining to me the other day that pthreads running on SCHED_FIFO/SCHED_RR that are blocked on mutexes don't release in priority order. This was on a stock 2.6.18 kernel, "recent glibc" (I didn't catch which version or config), ARM9 platform.
Quoted 9 lines
First question: Is this actually true?
Second question: Does Xenomai fix this? Do more recent kernel developments fix this?
Point me at the appropriate RTFM or code if that's the appropriate answer. :)
Quoted 10 lines
The appropriate RTFM is the POSIX spec [1]
In short, it says: "If there are threads blocked on the mutex object referenced by 'mutex' when
pthread_mutex_unlock()is called, resulting in the mutex becoming available, the scheduling policy shall determine which thread shall acquire the mutex."So, the correct implementation is to release a mutex in priority order.
Right, I'm fully aware of that (I teach a class on POSIX.1b from time to time).
Quoted 7 lines
But this person insisted that things didn't work that way in a stock 2.6.18--- which was a complete surprise to me. Just wondering if anyone here had noticed or not.
I suppose another possibility is that the "mutex" they were referring to was a kernel mutex used to implement blocking i/o in a driver, and not a userspace POSIX mutex. But I would expect that one to behave itself too...
Yet another possibility is that the pthreads that are believed to run in SCHED_FIFO or SCHED_RR policy are not really running with one of these policies. There is (or was, maybe it was fixed) a bug in the glibc:
setting scheduling parameters with pthread_attr_setsched* does not work.
Don't laugh, try it an call pthread_getschedparam from the created thread.
Signature · 1 line
Gilles Chanteperdrix
Quoted 29 lines · Gilles Chanteperdrix
Quoted 13 lines · Bill Gatliff
Guys:
Quoted 3 lines · Philippe Gerum
[posix] * Fix pthread_cond_wait() upon signal receipt (grab mutex anew).Probably OT, but someone was complaining to me the other day that pthreads running on SCHED_FIFO/SCHED_RR that are blocked on mutexes don't release in priority order. This was on a stock 2.6.18 kernel, "recent glibc" (I didn't catch which version or config), ARM9 platform.
Quoted 7 lines
First question: Is this actually true?
Second question: Does Xenomai fix this? Do more recent kernel developments fix this?
Point me at the appropriate RTFM or code if that's the appropriate answer. :)
The appropriate RTFM is the POSIX spec [1]
In short, it says: "If there are threads blocked on the mutex object referenced by 'mutex' when
pthread_mutex_unlock()is called, resulting in the mutex becoming available, the scheduling policy shall determine which thread shall acquire the mutex."
Quoted 5 lines
So, the correct implementation is to release a mutex in priority order.
I think the glibc implements this correctly (at least NPTL), on the other hand, I believe it is not true for threads running with the
SCHED_OTHERpolicy, in order to prevent starvation.
The problem with stock kernel is the FUTEX_WAIT operation: That one is used by glibc to block on non-PI mutexes. It dequeues in FIFO order, regardless of the waiter's priority. FUTEX_LOCK_PI (used e.g. for PTHREAD_PRIO_INHERIT mutexes since glibc 2.5) is fine again.
The -rt patch contains a fix for FUTEX_WAIT, and I think I saw some mainline patch once circulating as well. But it received a bit scepticism due to possible performance regression for futex users that don't care about priorities. And so nothing happened yet (I just checked latest git)...
Jan
Quoted 2 lines · Philippe Gerum
[arm] * Add support for Atmel AT91-based platforms.
The patches for AT91 are missing an important piece (the configuration of the interrupt controller priorities). Here are the correct ones. Sorry about this.
Signature · 1 line
Gilles Chanteperdrix.
arch/arm/mach-at91rm9200/Kconfig +18 -0
@@ -55,6 +55,24 @@ config AT91_PROGRAMMABLE_CLOCKS Select this if you need to program one or more of the PCK0..PCK3 programmable clock outputs. +config IPIPE_AT91_TC + depends on IPIPE + int "AT91 TC used as time base" + default 0 + help + When Adeos interrupt pipeline is enabled, TC0 is used by default + as time base, but you can use TC1 or TC2 by setting this variable to 1 + or 2. This should only be needed to avoid conflicts with other drivers. + +config IPIPE_AT91_MCK + depends on IPIPE + int "AT91 Master clock Frequency" + default 46080000 + help + When Adeos interrupt pipeline is enabled, AT91 timer is based on + the AT91 master clock, whose frequency need hence to be known at + compilation time. + endmenu endif
arch/arm/mach-at91rm9200/clock.c +28 -0
@@ -202,6 +202,29 @@ static struct clk ohci_clk = { .mode = pmc_periph_mode, }; +#ifdef CONFIG_IPIPE +static struct clk tc0 = { + .name ="tc0" , + .parent = &mck, + .pmc_mask =1 <<AT91_ID_TC0 , + .mode = pmc_periph_mode, +}; + +static struct clk tc1 = { + .name ="tc1" , + .parent = &mck, + .pmc_mask =1 <<AT91_ID_TC1 , + .mode = pmc_periph_mode, +}; + +static struct clk tc2 = { + .name ="tc2" , + .parent = &mck, + .pmc_mask =1 <<AT91_ID_TC2 , + .mode = pmc_periph_mode, +}; +#endif /* CONFIG_IPIPE */ +static struct clk *const clock_list[] = {/* four primary clocks -- MUST BE FIRST! */ &clk32k,
@@ -230,6 +253,11 @@ static struct clk *const clock_list[] =// spi // ssc0..ssc2 // tc0..tc5 +#ifdef CONFIG_IPIPE + &tc0, + &tc1, + &tc2, +#endif /* CONFIG_IPIPE */ &ohci_clk, // ether };
arch/arm/mach-at91rm9200/gpio.c +55 -0
77 lines not on this page · raw message
arch/arm/mach-at91rm9200/irq.c +37 -0
@@ -41,6 +41,7 @@* The default interrupt priority levels (0 = lowest, 7 = highest). */ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS ]__initdata = { +#ifndef CONFIG_IPIPE7 ,/* Advanced Interrupt Controller */ 7 ,/* System Peripheral */ 0, /* Parallel IO Controller A */
@@ -73,6 +74,42 @@ static unsigned int at91rm9200_default_i0 ,/* Advanced Interrupt Controller */ 0 ,/* Advanced Interrupt Controller */ 0 /* Advanced Interrupt Controller */ +#else /* CONFIG_IPIPE */ +/* Give the highest priority to TC, since they are used as timer interrupt by +I-pipe. */ +7 ,/* Advanced Interrupt Controller */ +6 ,/* System Peripheral */ +0 ,/* Parallel IO Controller A */ +0 ,/* Parallel IO Controller B */ +0 ,/* Parallel IO Controller C */ +0 ,/* Parallel IO Controller D */ +5 ,/* USART 0 */ +5 ,/* USART 1 */ +5 ,/* USART 2 */ +5 ,/* USART 3 */ +0 ,/* Multimedia Card Interface */ +3 ,/* USB Device Port */ +0 ,/* Two-Wire Interface */ +5 ,/* Serial Peripheral Interface */ +4 ,/* Serial Synchronous Controller */ +4 ,/* Serial Synchronous Controller */ +4 ,/* Serial Synchronous Controller */ +7 ,/* Timer Counter 0 */ +7 ,/* Timer Counter 1 */ +7 ,/* Timer Counter 2 */ +0 ,/* Timer Counter 3 */ +0 ,/* Timer Counter 4 */ +0 ,/* Timer Counter 5 */ +2 ,/* USB Host port */ +2 ,/* Ethernet MAC */ +0 ,/* Advanced Interrupt Controller */ +0 ,/* Advanced Interrupt Controller */ +0 ,/* Advanced Interrupt Controller */ +0 ,/* Advanced Interrupt Controller */ +0 ,/* Advanced Interrupt Controller */ +0 ,/* Advanced Interrupt Controller */ +0 /* Advanced Interrupt Controller */ +#endif /*CONFIG_IPIPE */ };
arch/arm/mach-at91rm9200/time.c +255 -1
278 lines not on this page · raw message
include/asm-arm/arch-at91rm9200/irqs.h +8 -0
@@ -49,4 +49,12 @@extern void at91rm9200_init_irq (unsigned int priority[]);#endif +#if defined(CONFIG_IPIPE ) && !defined(__ASSEMBLY__) +extern unsigned __ipipe_at91_gpio_banks; + +#define __ipipe_mach_irq_mux_p (irq) \ + ((unsigned) (irq - AT91_ID_PIOA) < __ipipe_at91_gpio_banks) + +#endif /* CONFIG_IPIPE && !__ASSEMBLY__ */ +#endif
include/asm-arm/arch-at91rm9200/timex.h +4 -0
@@ -23,6 +23,10 @@#include <asm/arch/hardware.h> +#ifndef CONFIG_IPIPE #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) +#else /* !CONFIG_IPIPE */ +#define CLOCK_TICK_RATE (CONFIG_IPIPE_AT91_MCK / 32) +#endif /* !CONFIG_IPIPE */ #endif
Makefile +4 -0
@@ -491,6 +491,10 @@ endif include $(srctree)/arch/$(ARCH)/Makefile +ifdef CONFIG_IPIPE_TRACE_MCOUNT +CFLAGS += -pg +endif + ifdef CONFIG_FRAME_POINTER CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) else
arch/arm/Kconfig +2 -0
@@ -487,6 +487,8 @@ config LOCAL_TIMERS accounting to be spread across the timer interval, preventing a "thundering herd" at every timer tick. +source "kernel/ipipe/Kconfig" + config PREEMPT bool "Preemptible Kernel (EXPERIMENTAL)" depends on EXPERIMENTAL
arch/arm/boot/compressed/head.S +10 -0
@@ -833,6 +833,16 @@ memdump: mov r12, r0 mov pc, r10 #endif +#ifdef CONFIG_IPIPE_TRACE_MCOUNT + .text + .align 0 + .type mcount %function + .global mcount +mcount: + mov pc, lr @ just return +#endif + + reloc_end: .align
arch/arm/kernel/Makefile +2 -0
@@ -20,6 +20,8 @@ obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o isa.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o +obj-$(CONFIG_IPIPE) += ipipe.o +obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += ipipe-mcount.o obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
arch/arm/kernel/entry-armv.S +89 -7
208 lines not on this page · raw message
arch/arm/kernel/entry-common.S +57 -9
116 lines not on this page · raw message
arch/arm/kernel/entry-header.S +9 -0
@@ -49,6 +49,15 @@ #endif .endm + .macro slow_restore_user_regs + ldr r1, [sp, #S_PSR] @ get calling cpsr + ldr lr, [sp, #S_PC]! @ get pc + msr spsr_cxsf, r1 @ save in spsr_svc + ldmdb sp, {r0 - lr}^ @ get calling r1 - lr + mov r0, r0 + add sp, sp, #S_FRAME_SIZE - S_PC + movs pc, lr @ return & move spsr_svc into cpsr + .endm /* * These are the registers used in the syscall handler, and allow us to
arch/arm/kernel/ipipe-mcount.S +38 -0
@@ -0,0 +1,38 @@ +/* + * linux/arch/arm/kernel/ipipe-mcount.S + * + * Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH + */ + +#ifdef CONFIG_FRAME_POINTER + + .text + .align 0 + .type mcount %function + .global mcount + +mcount: + + ldr ip, =ipipe_trace_enable @ leave early, if disabled + ldr ip, [ip] + cmp ip, #0 + moveq pc,lr + + mov ip, sp + stmdb sp!, {r0 - r3, fp, ip, lr, pc} @ create stack frame + + mov r3, #0 @ no additional value (v) + ldr r2, [fp, #-4] @ get lr (the return address + @ of the caller of the + @ instrumented function) + mov r1, lr @ get lr - (the return address + @ of the instrumented function) + mov r0, #0 @ IPIPE_TRACE_FN + + sub fp, ip, #4 @ point fp at this frame + + bl __ipipe_trace + + ldmdb fp, {r0 - r3, fp, sp, pc} @ pop entry frame and return + +#endif
arch/arm/kernel/ipipe.c +532 -0
532 lines not on this page · raw message
arch/arm/kernel/irq.c +2 -0
@@ -125,8 +125,10 @@ asmlinkage void asm_do_IRQ(unsigned intdesc_handle_irq (irq, desc); +#ifndef CONFIG_IPIPE /* AT91 specific workaround */ irq_finish (irq); +#endif /* !CONFIG_IPIPE */ irq_exit ();set_irq_regs (old_regs);
arch/arm/kernel/process.c +7 -0
@@ -125,6 +125,12 @@ static void default_idle(void)local_irq_disable ();if (!need_resched ()) {timer_dyn_reprogram (); +#ifdef CONFIG_IPIPE +__ipipe_unstall_root (); +#ifdef CONFIG_IPIPE_TRACE_IRQSOFF +ipipe_trace_end (0x8000000E ); +#endif /* CONFIG_IPIPE_TRACE_IRQSOFF */ +#endif /* CONFIG_IPIPE */ arch_idle (); }local_irq_enable ();
@@ -153,6 +159,7 @@ void cpu_idle(void)if (!idle) idle = default_idle; +ipipe_suspend_domain ();leds_event (led_idle_start);while (!need_resched ())idle ();
arch/arm/kernel/ptrace.c +4 -0
@@ -485,6 +485,10 @@ void ptrace_break(struct task_struct *tsstatic int break_trap (struct pt_regs *regs,unsigned int instr) { + +if (ipipe_trap_notify (IPIPE_TRAP_BREAK ,regs)) +return 0 ; +ptrace_break (current, regs);return 0 ; }
arch/arm/kernel/traps.c +3 -0
@@ -306,6 +306,9 @@ asmlinkage void do_undefinstr(struct pt_ }spin_unlock_irq (&undef_lock); +if (ipipe_trap_notify (IPIPE_TRAP_UNDEFINSTR ,regs)) +return ; +#ifdef CONFIG_DEBUG_USER if (user_debug &UDBG_UNDEFINED ) { printk(KERN_INFO "%s (%d): undefined instruction: pc=%p\n",
arch/arm/mach-at91rm9200/Kconfig +18 -0
@@ -82,6 +82,24 @@ config MACH_KAFA help Select this if you are using Sperry-Sun's KAFA board. +config IPIPE_AT91_TC + depends on IPIPE + int "AT91 TC used as time base" + default 0 + help + When Adeos interrupt pipeline is enabled, TC0 is used by default + as time base, but you can use TC1 or TC2 by setting this variable to 1 + or 2. This should only be needed to avoid conflicts with other drivers. + +config IPIPE_AT91_MCK + depends on IPIPE + int "AT91 Master clock Frequency" + default 46080000 + help + When Adeos interrupt pipeline is enabled, AT91 timer is based on + the AT91 master clock, whose frequency need hence to be known at + compilation time. + endif # ----------------------------------------------------------
arch/arm/mach-at91rm9200/at91rm9200.c +44 -0
62 lines not on this page · raw message
arch/arm/mach-at91rm9200/at91rm9200_time.c +265 -1
288 lines not on this page · raw message
arch/arm/mach-at91rm9200/gpio.c +55 -0
77 lines not on this page · raw message
arch/arm/mach-integrator/core.c +116 -48
221 lines not on this page · raw message
arch/arm/mach-integrator/integrator_cp.c +33 -1
@@ -2,6 +2,7 @@* linux/arch/arm/mach-integrator/integrator_cp.c * * Copyright (C) 2003 Deep Blue Solutions Ltd +* Copyright (C) 2005 Stelian Pop. * * 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
@@ -19,6 +20,7 @@#include <linux/amba/bus.h> #include <linux/amba/kmi.h> #include <linux/amba/clcd.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/io.h>
@@ -222,6 +224,31 @@ sic_handle_irq(unsigned int irq, struct }while (status); } +#ifdef CONFIG_IPIPE +void __ipipe_mach_demux_irq (unsigned irq,struct pt_regs *regs) +{ +unsigned long status =sic_readl (INTCP_VA_SIC_BASE +IRQ_STATUS ); +struct irqdesc *desc_unused = irq_desc + irq; +unsigned irq_unused = irq; + +if (status ==0 ) { +do_bad_IRQ (irq, desc_unused); +return ; + } + +do { + irq =ffs (status) -1 ; + status &= ~(1 << irq); + + irq +=IRQ_SIC_START ; + +__ipipe_handle_irq (irq, regs); + }while (status); + + desc_unused->chip->unmask (irq_unused); +} +#endif /* CONFIG_IPIPE */ +static void __init intcp_init_irq (void ) {unsigned int i;
@@ -568,9 +595,14 @@ static void __init intcp_init(void)#define TIMER_CTRL_IE (1 << 5)/* Interrupt Enable */ +#ifdef CONFIG_IPIPE +unsigned int __ipipe_mach_ticks_per_jiffy =1000000 * TICKS_PER_uSEC /HZ ; +EXPORT_SYMBOL (__ipipe_mach_ticks_per_jiffy); +#endif +static void __init intcp_timer_init (void ) { -integrator_time_init (1000000 /HZ ,TIMER_CTRL_IE ); +integrator_time_init (1000000 * TICKS_PER_uSEC /HZ ,TIMER_CTRL_IE ); }static struct sys_timer cp_timer = {
arch/arm/mach-pxa/irq.c +37 -0
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/interrupt.h> #include <linux/ptrace.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/irq.h>
@@ -216,6 +217,42 @@ static void pxa_gpio_demux_handler(unsig }while (loop); } +#ifdef CONFIG_IPIPE +void __ipipe_mach_demux_irq (unsigned irq,struct pt_regs *regs) +{ +struct irqdesc *desc_unused = irq_desc + irq; +unsigned irq_unused = irq; +unsigned int i, mask[4 ]; +int loop; + +do { + loop =0 ; + + mask[0 ] =GEDR0 & ~3 ; + mask[1 ] =GEDR1 ; + mask[2 ] =GEDR2 ; +#if PXA_LAST_GPIO <96 + i =3 ; +#else /* PXA_LAST_GPIO >= 96 */ + mask[3 ] =GEDR3 ; + i =4 ; +#endif /* PXA_LAST_GPIO >= 96 */ +for (; i; i--) { + loop |= mask[i -1 ]; +while (mask[i -1 ]) { + irq =fls (mask[i -1 ]) -1 ; + mask[i -1 ] &= ~(1 << irq); + irq =IRQ_GPIO ((i -1 ) *32 + irq); + +__ipipe_handle_irq (irq, regs); + } + } + }while (loop); + + desc_unused->chip->unmask (irq_unused); +} +#endif /* CONFIG_IPIPE */ +static void pxa_ack_muxed_gpio (unsigned int irq) {int gpio = irq -IRQ_GPIO (2 ) +2 ;
arch/arm/mach-pxa/time.c +119 -0
161 lines not on this page · raw message
arch/arm/mach-s3c2410/irq.c +88 -1
119 lines not on this page · raw message
arch/arm/mach-s3c2410/s3c2440-irq.c +31 -0
@@ -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
@@ -25,6 +27,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>
@@ -96,6 +99,34 @@ static struct irqchip s3c_irq_wdtac97 = .ack = s3c_irq_wdtac97_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 +149 -47
288 lines not on this page · raw message
arch/arm/mach-sa1100/irq.c +32 -0
@@ -16,6 +16,7 @@#include <linux/ioport.h> #include <linux/ptrace.h> #include <linux/sysdev.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/mach/irq.h>
@@ -137,6 +138,37 @@ sa1100_high_gpio_handler(unsigned int ir }while (mask); } +#ifdef CONFIG_IPIPE +void __ipipe_mach_demux_irq (unsigned irq,struct pt_regs *regs) +{ +struct irqdesc *desc_unused = irq_desc + irq; +unsigned irq_unused = irq; +unsigned int mask; + + mask =GEDR &0xfffff800 ; +do { +/* +* clear down all currently active IRQ sources. +* We will be processing them all. +*/ +GEDR = mask; + + irq =IRQ_GPIO11 ; + mask >>=11 ; +do { +if (mask &1 ) +__ipipe_handle_irq (irq, regs); + mask >>=1 ; + irq++; + }while (mask); + + mask =GEDR &0xfffff800 ; + }while (mask); + + desc_unused->chip->unmask (irq_unused); +} +#endif /* CONFIG_IPIPE */ +/* * Like GPIO0 to 10, GPIO11-27 IRQs need to be handled specially. * In addition, the IRQs are all collected up into one bit in the
arch/arm/mach-sa1100/time.c +116 -0
69 lines not on this page · raw message
arch/arm/mm/fault.c +48 -0
48 lines not on this page · raw message
include/asm-arm/arch-at91rm9200/hardware.h +3 -0
Lines of this file are not shown. View the raw message.
include/asm-arm/arch-at91rm9200/timex.h +4 -0
Lines of this file are not shown. View the raw message.
include/asm-arm/arch-integrator/entry-macro.S +5 -1
Lines of this file are not shown. View the raw message.
include/asm-arm/arch-integrator/platform.h +7 -2
Lines of this file are not shown. View the raw message.
include/asm-arm/arch-integrator/timex.h +2 -2
Lines of this file are not shown. View the raw message.
include/asm-arm/ipipe.h +207 -0
207 lines not on this page · raw message
include/asm-arm/irqflags.h +106 -18
124 lines not on this page · raw message
include/linux/ipipe.h +716 -0
716 lines not on this page · raw message
include/linux/ipipe_trace.h +44 -0
44 lines not on this page · raw message
include/linux/preempt.h +31 -16
47 lines not on this page · raw message
include/linux/spinlock.h +114 -13
127 lines not on this page · raw message
kernel/ipipe/Kconfig.debug +69 -0
69 lines not on this page · raw message
kernel/ipipe/core.c +1419 -0
1,419 lines not on this page · raw message
kernel/ipipe/tracer.c +1275 -0
1,275 lines not on this page · raw message
kernel/irq/chip.c +112 -0
112 lines not on this page · raw message
kernel/printk.c +73 -0
73 lines not on this page · raw message
kernel/sched.c +70 -3
73 lines not on this page · raw message
mm/memory.c +167 -30
197 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.