adeos-ipipe-2.6.15-arm-1.5-03.patch
Subsystems (14)
Hi Philippe and Gilles,
the updated I-pipe patch for ARM which was checked-in yesterday is not complete. Some files are missing e.g. entry-header.S or mach-integrator/core.c. The attached patch should be the correct replacement.
Moreover, my patch for ksrc/arch/arm/hal.c didn't find its way to Xenomai svn. The patch is required for the I-pipe patch to work.
--
Sebastian
arch/arm/boot/compressed/head.S +10 -0
@@ -710,6 +710,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/Kconfig +2 -0
@@ -368,6 +368,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/kernel/entry-armv.S +60 -2
128 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
@@ -67,6 +67,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-core.c +239 -0
239 lines not on this page · raw message
arch/arm/kernel/ipipe-mcount.S +40 -0
@@ -0,0 +1,40 @@ +/* + * linux/arch/arm/kernel/ipipe-mcount.S + * + * Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH + */ + +#include <linux/config.h> + +#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-root.c +391 -0
391 lines not on this page · raw message
arch/arm/kernel/irq.c +8 -1
@@ -54,10 +54,11 @@static int noirqdebug;static volatile unsigned long irq_err_count; -static DEFINE_SPINLOCK (irq_controller_lock); +DEFINE_SPINLOCK (irq_controller_lock);static LIST_HEAD (irq_pending);struct irqdesc irq_desc[NR_IRQS ]; +EXPORT_SYMBOL (irq_desc);void (*init_arch_irq)(void )__initdata =NULL ;/*
@@ -412,7 +413,9 @@ do_edge_IRQ(unsigned int irq, struct irq/* * Acknowledge and clear the IRQ, but don't mask it. */ +#ifndef CONFIG_IPIPE desc->chip->ack (irq); +#endif /* CONFIG_IPIPE */ /* * Mark the IRQ currently in progress.
@@ -450,8 +453,10 @@ do_edge_IRQ(unsigned int irq, struct irq* currently running. Delay it. */ desc->pending =1 ; +#ifndef CONFIG_IPIPE desc->chip->mask (irq); desc->chip->ack (irq); +#endif /* CONFIG_IPIPE */ }/*
@@ -468,7 +473,9 @@ do_level_IRQ(unsigned int irq, struct ir/* * Acknowledge, clear _AND_ disable the interrupt. */ +#ifndef CONFIG_IPIPE desc->chip->ack (irq); +#endif /* CONFIG_IPIPE */ if (likely (!desc->disable_depth)) {kstat_cpu (cpu).irqs[irq]++;
arch/arm/kernel/Makefile +2 -0
@@ -19,6 +19,8 @@ obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_IPIPE) += ipipe-core.o ipipe-root.o +obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += ipipe-mcount.o obj-$(CONFIG_IWMMXT) += iwmmxt.o AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
arch/arm/kernel/process.c +7 -0
@@ -92,6 +92,12 @@ 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 ();
@@ -120,6 +126,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
@@ -503,6 +503,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
@@ -303,6 +303,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-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
@@ -16,6 +17,7 @@#include <linux/slab.h> #include <linux/string.h> #include <linux/sysdev.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/io.h>
@@ -219,6 +221,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, regs); +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;
@@ -566,9 +593,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>
@@ -214,6 +215,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 +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 +149 -47
288 lines not on this page · raw message
arch/arm/mach-sa1100/irq.c +32 -0
@@ -14,6 +14,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>
@@ -136,6 +137,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
157 lines not on this page · raw message
arch/arm/mm/fault.c +16 -0
@@ -223,6 +223,9 @@ do_page_fault(unsigned long addr, unsignstruct mm_struct *mm;int fault, sig, code; +if (ipipe_trap_notify (IPIPE_TRAP_ACCESS ,regs)) +return 0 ; + tsk = current; mm = tsk->mm;
@@ -354,6 +357,9 @@ do_translation_fault(unsigned long addr, bad_area: tsk = current; +if (ipipe_trap_notify (IPIPE_TRAP_ACCESS ,regs)) +return 0 ; +do_bad_area (tsk, tsk->active_mm, addr, fsr, regs);return 0 ; }
@@ -366,6 +372,10 @@ static int do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { struct task_struct *tsk = current; + +if (ipipe_trap_notify (IPIPE_TRAP_SECTION ,regs)) +return 0 ; +do_bad_area (tsk, tsk->active_mm, addr, fsr, regs);return 0 ; }
@@ -376,6 +386,9 @@ do_sect_fault(unsigned long addr, unsignstatic int do_bad (unsigned long addr,unsigned int fsr,struct pt_regs *regs) { +if (ipipe_trap_notify (IPIPE_TRAP_DABT ,regs)) +return 0 ; +return 1 ; }
@@ -451,6 +464,9 @@ do_DataAbort(unsigned long addr, unsigneif (!inf->fn (addr, fsr, regs))return ; +if (ipipe_trap_notify (IPIPE_TRAP_UNKNOWN ,regs)) +return ; +printk (KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n" , inf->name, fsr, addr);
drivers/pci/msi.c +18 -3
@@ -149,6 +149,21 @@ static void unmask_MSI_irq(unsigned intmsi_set_mask_bit (vector,0 ); } +#ifdef CONFIG_IPIPE +static void ack_MSI_irq_w_maskbit (unsigned int vector) +{ +mask_MSI_irq (vector); +__ack_APIC_irq (); +} +static void ack_MSI_irq_wo_maskbit (unsigned int vector) +{ +__ack_APIC_irq (); +} +#else /* !CONFIG_IPIPE */ +#define ack_MSI_irq_wo_maskbit do_nothing +#define ack_MSI_irq_w_maskbit mask_MSI_irq +#endif /* CONFIG_IPIPE */ +static unsigned int startup_msi_irq_wo_maskbit (unsigned int vector) {struct msi_desc *entry;
@@ -212,7 +227,7 @@ static struct hw_interrupt_type msix_irq .shutdown = shutdown_msi_irq, .enable = unmask_MSI_irq, .disable = mask_MSI_irq, - .ack = mask_MSI_irq, + .ack = ack_MSI_irq_w_maskbit, .end = end_msi_irq_w_maskbit, .set_affinity = set_msi_irq_affinity };
@@ -228,7 +243,7 @@ static struct hw_interrupt_type msi_irq_ .shutdown = shutdown_msi_irq, .enable = unmask_MSI_irq, .disable = mask_MSI_irq, - .ack = mask_MSI_irq, + .ack = ack_MSI_irq_w_maskbit, .end = end_msi_irq_w_maskbit, .set_affinity = set_msi_irq_affinity };
@@ -244,7 +259,7 @@ static struct hw_interrupt_type msi_irq_ .shutdown = shutdown_msi_irq, .enable = do_nothing, .disable = do_nothing, - .ack = do_nothing, + .ack = ack_MSI_irq_wo_maskbit, .end = end_msi_irq_wo_maskbit, .set_affinity = set_msi_irq_affinity };
include/asm-arm/arch-integrator/entry-macro.S +5 -1
@@ -20,7 +20,11 @@ teq \irqstat, #0 ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)] moveq \irqnr, #IRQ_CIC_START - +#ifdef CONFIG_IPIPE + tst \irqstat, #0x00000040 @ check IRQ_TIMERINT1 first + movne \irqnr, #6 + bne 1003f +#endif /* CONFIG_IPIPE */ 1001: tst \irqstat, #15 bne 1002f add \irqnr, \irqnr, #4
include/asm-arm/arch-integrator/irqs.h +3 -0
@@ -80,3 +80,6 @@#define NR_IRQS 47 +#ifdef CONFIG_IPIPE +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_CP_CPPLDINT) +#endif /* CONFIG_IPIPE */
include/asm-arm/arch-integrator/platform.h +9 -2
@@ -26,13 +26,15 @@* NOTE: This is a multi-hosted header file for use with uHAL and * supported debuggers. * -* $Id: platform.s,v 1.32 2000/02/18 10:51:39 asims Exp $ +* $Id: platform.h,v 1.2 2006/02/20 13:54:22 rpm Exp $ * * ***********************************************************************/ #ifndef __address_h#define __address_h 1 +#include <linux/config.h> +/* ======================================================================== * Integrator definitions * ========================================================================
@@ -436,7 +438,7 @@* Timer definitions * * Only use timer 1 & 2 -* (both run at 24MHz and will need the clock divider set to 16). +* (both run at 1MHZ on /CP and at 24MHz on /AP) * * Timer 0 runs at bus frequency and therefore could vary and currently * uHAL can't handle that.
@@ -449,7 +451,12 @@#define MAX_TIMER 2#define MAX_PERIOD 699050 + +#ifdef CONFIG_ARCH_INTEGRATOR_CP +#define TICKS_PER_uSEC 1 +#else #define TICKS_PER_uSEC 24 +#endif /* * These are useconds NOT ticks.
include/asm-arm/arch-integrator/timex.h +2 -2
@@ -21,6 +21,6 @@*/ /* -* ?? +* Timer rate */ -#define CLOCK_TICK_RATE (50000000 / 16) +#define CLOCK_TICK_RATE (1000000)
include/asm-arm/arch-pxa/irqs.h +4 -0
@@ -73,6 +73,10 @@ ((i) - IRQ_GPIO(2) + 2)#define IRQ_TO_GPIO (i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) +#ifdef CONFIG_IPIPE +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_GPIO_2_x) +#endif /* CONFIG_IPIPE */ +#if defined(CONFIG_PXA25x)#define PXA_LAST_GPIO 80#elif defined(CONFIG_PXA27x)
include/asm-arm/arch-s3c2410/irqs.h +25 -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 +* 30-Oct-2006 Added Adeos/I-pipe support */
@@ -123,4 +126,26 @@#define NR_IRQS (IRQ_S3C2440_AC97+1) +#ifdef CONFIG_IPIPE +#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)) +#endif /* CONFIG_IPIPE */ +#endif /* __ASM_ARCH_IRQ_H */
include/asm-arm/arch-sa1100/irqs.h +4 -0
@@ -145,6 +145,10 @@#define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20)#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) +#ifdef CONFIG_IPIPE +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_GPIO11_27) +#endif /* CONFIG_IPIPE */ +/* * Figure out the MAX IRQ number. *
include/asm-arm/atomic.h +8 -8
@@ -129,10 +129,10 @@ static inline int atomic_add_return(intunsigned long flags;int val; -local_irq_save (flags); +local_irq_save_hw (flags); val = v->counter; v->counter = val += i; -local_irq_restore (flags); +local_irq_restore_hw (flags);return val; }
@@ -142,10 +142,10 @@ static inline int atomic_sub_return(intunsigned long flags;int val; -local_irq_save (flags); +local_irq_save_hw (flags); val = v->counter; v->counter = val -= i; -local_irq_restore (flags); +local_irq_restore_hw (flags);return val; }
@@ -155,11 +155,11 @@ static inline int atomic_cmpxchg(atomic_int ret;unsigned long flags; -local_irq_save (flags); +local_irq_save_hw (flags); ret = v->counter;if (likely (ret == old)) v->counter = new; -local_irq_restore (flags); +local_irq_restore_hw (flags);return ret; }
@@ -168,9 +168,9 @@ static inline void atomic_clear_mask(uns {unsigned long flags; -local_irq_save (flags); +local_irq_save_hw (flags); *addr &= ~mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); }#endif /* __LINUX_ARM_ARCH__ */
include/asm-arm/bitops.h +12 -12
@@ -37,9 +37,9 @@ static inline void ____atomic_set_bit(un p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); *p |= mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); }static inline void ____atomic_clear_bit (unsigned int bit,volatile unsigned long *p)
@@ -49,9 +49,9 @@ static inline void ____atomic_clear_bit( p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); *p &= ~mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); }static inline void ____atomic_change_bit (unsigned int bit,volatile unsigned long *p)
@@ -61,9 +61,9 @@ static inline void ____atomic_change_bit p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); *p ^= mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); } static inline int
@@ -75,10 +75,10 @@ ____atomic_test_and_set_bit(unsigned int p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); res = *p; *p = res | mask; -local_irq_restore (flags); +local_irq_restore_hw (flags);return res & mask; }
@@ -92,10 +92,10 @@ ____atomic_test_and_clear_bit(unsigned i p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); res = *p; *p = res & ~mask; -local_irq_restore (flags); +local_irq_restore_hw (flags);return res & mask; }
@@ -109,10 +109,10 @@ ____atomic_test_and_change_bit(unsigned p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); res = *p; *p = res ^ mask; -local_irq_restore (flags); +local_irq_restore_hw (flags);return res & mask; }
include/asm-arm/ipipe.h +207 -0
207 lines not on this page · raw message
include/asm-arm/mmu_context.h +4 -1
@@ -82,14 +82,17 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { - unsigned int cpu = smp_processor_id(); + unsigned int cpu = smp_processor_id_hw();if (prev != next) { +unsigned long flags; +local_irq_save_hw_cond (flags);cpu_set (cpu, next->cpu_vm_mask);check_context (next);cpu_switch_mm (next->pgd, next);if (cache_is_vivt ())cpu_clear (cpu, prev->cpu_vm_mask); +local_irq_restore_hw_cond (flags); } }
include/asm-arm/pgalloc.h +5 -0
@@ -29,6 +29,11 @@ extern void free_pgd_slow(pgd_t *pgd);#define check_pgt_cache () do { } while (0) +static inline void set_pgdir (unsigned long address,pgd_t entry) +{ +/* nop */ +} +/* * Allocate one PTE table. *
include/asm-arm/system.h +110 -26
228 lines not on this page · raw message
include/linux/hardirq.h +13 -0
@@ -87,8 +87,21 @@ extern void synchronize_irq(unsigned int# define synchronize_irq (irq) barrier()#endif +#ifdef CONFIG_IPIPE +#define nmi_enter () \ +do { \ + if (ipipe_current_domain == ipipe_root_domain) \
Lines of this file are not shown. View the raw message.
include/linux/ipipe.h +770 -0
770 lines not on this page · raw message
include/linux/preempt.h +31 -16
47 lines not on this page · raw message
kernel/ipipe/core.c +1051 -0
1,051 lines not on this page · raw message
kernel/ipipe/generic.c +424 -0
424 lines not on this page · raw message
kernel/ipipe/Kconfig.debug +69 -0
69 lines not on this page · raw message
kernel/ipipe/tracer.c +1241 -0
1,241 lines not on this page · raw message
kernel/printk.c +73 -0
73 lines not on this page · raw message
kernel/sched.c +69 -3
72 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.
Quoted 6 lines · Sebastian Smolorz
Hi Philippe and Gilles,
the updated I-pipe patch for ARM which was checked-in yesterday is not complete. Some files are missing e.g.
entry-header.Sormach-integrator/core.c. The attached patch should be the correct replacement.
Fixed, thanks. Btw, two 1.5-03 patches went upstream actually, one for 2.6.14, and the other - now fixed - one for 2.6.15. Does the former also need fixing?
Quoted 3 lines
Moreover, my patch for
ksrc/arch/arm/hal.cdidn't find its way to Xenomai svn. The patch is required for the I-pipe patch to work.
Gilles has it in his commit queue, it's ok.
Quoted 2 lines
--
Sebastian
Signature · 1 line
Philippe.
Quoted 11 lines · Philippe Gerum
Quoted 6 lines · Sebastian Smolorz
Hi Philippe and Gilles,
the updated I-pipe patch for ARM which was checked-in yesterday is not complete. Some files are missing e.g.
entry-header.Sormach-integrator/core.c. The attached patch should be the correct replacement.Fixed, thanks. Btw, two 1.5-03 patches went upstream actually, one for 2.6.14, and the other - now fixed - one for 2.6.15. Does the former also need fixing?
It does. I will prepare a proper patch also for 2.6.14.
--
Sebastian
Quoted 11 lines · Philippe Gerum
Quoted 6 lines · Sebastian Smolorz
Hi Philippe and Gilles,
the updated I-pipe patch for ARM which was checked-in yesterday is not complete. Some files are missing e.g.
entry-header.Sormach-integrator/core.c. The attached patch should be the correct replacement.Fixed, thanks. Btw, two 1.5-03 patches went upstream actually, one for 2.6.14, and the other - now fixed - one for 2.6.15. Does the former also need fixing?
Here it is.
--
Sebastian
arch/arm/boot/compressed/head.S +10 -0
@@ -718,6 +718,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/Kconfig +2 -0
@@ -339,6 +339,8 @@ config NR_CPUS depends on SMP default "4" +source "kernel/ipipe/Kconfig" + config PREEMPT bool "Preemptible Kernel (EXPERIMENTAL)" depends on EXPERIMENTAL
arch/arm/kernel/entry-armv.S +60 -2
128 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
@@ -67,6 +67,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-core.c +239 -0
239 lines not on this page · raw message
arch/arm/kernel/ipipe-mcount.S +40 -0
@@ -0,0 +1,40 @@ +/* + * linux/arch/arm/kernel/ipipe-mcount.S + * + * Copyright (C) 2006 Sebastian Smolorz <[email protected]>, emlix GmbH + */ + +#include <linux/config.h> + +#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-root.c +391 -0
391 lines not on this page · raw message
arch/arm/kernel/irq.c +8 -1
@@ -54,10 +54,11 @@static int noirqdebug;static volatile unsigned long irq_err_count; -static DEFINE_SPINLOCK (irq_controller_lock); +DEFINE_SPINLOCK (irq_controller_lock);static LIST_HEAD (irq_pending);struct irqdesc irq_desc[NR_IRQS ]; +EXPORT_SYMBOL (irq_desc);void (*init_arch_irq)(void )__initdata =NULL ;/*
@@ -411,7 +412,9 @@ do_edge_IRQ(unsigned int irq, struct irq/* * Acknowledge and clear the IRQ, but don't mask it. */ +#ifndef CONFIG_IPIPE desc->chip->ack (irq); +#endif /* CONFIG_IPIPE */ /* * Mark the IRQ currently in progress.
@@ -449,8 +452,10 @@ do_edge_IRQ(unsigned int irq, struct irq* currently running. Delay it. */ desc->pending =1 ; +#ifndef CONFIG_IPIPE desc->chip->mask (irq); desc->chip->ack (irq); +#endif /* CONFIG_IPIPE */ }/*
@@ -467,7 +472,9 @@ do_level_IRQ(unsigned int irq, struct ir/* * Acknowledge, clear _AND_ disable the interrupt. */ +#ifndef CONFIG_IPIPE desc->chip->ack (irq); +#endif /* CONFIG_IPIPE */ if (likely (!desc->disable_depth)) {kstat_cpu (cpu).irqs[irq]++;
arch/arm/kernel/Makefile +2 -0
@@ -19,6 +19,8 @@ obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_IPIPE) += ipipe-core.o ipipe-root.o +obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += ipipe-mcount.o obj-$(CONFIG_IWMMXT) += iwmmxt.o AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
arch/arm/kernel/process.c +7 -0
@@ -88,6 +88,12 @@ void default_idle(void)local_irq_disable ();if (!need_resched () && !hlt_counter) {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 ();
@@ -107,6 +113,7 @@ void cpu_idle(void)void (*idle)(void ) = pm_idle;if (!idle) idle = default_idle; +ipipe_suspend_domain ();preempt_disable ();leds_event (led_idle_start);while (!need_resched ())
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
@@ -16,6 +17,7 @@#include <linux/slab.h> #include <linux/string.h> #include <linux/sysdev.h> +#include <linux/ipipe.h> #include <asm/hardware.h> #include <asm/io.h>
@@ -174,6 +176,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, regs); +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;
@@ -521,9 +548,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>
@@ -214,6 +215,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 +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 +149 -47
288 lines not on this page · raw message
arch/arm/mach-sa1100/irq.c +32 -0
@@ -14,6 +14,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>
@@ -136,6 +137,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
157 lines not on this page · raw message
arch/arm/mm/fault.c +16 -0
@@ -223,6 +223,9 @@ do_page_fault(unsigned long addr, unsignstruct mm_struct *mm;int fault, sig, code; +if (ipipe_trap_notify (IPIPE_TRAP_ACCESS ,regs)) +return 0 ; + tsk = current; mm = tsk->mm;
@@ -354,6 +357,9 @@ do_translation_fault(unsigned long addr, bad_area: tsk = current; +if (ipipe_trap_notify (IPIPE_TRAP_ACCESS ,regs)) +return 0 ; +do_bad_area (tsk, tsk->active_mm, addr, fsr, regs);return 0 ; }
@@ -366,6 +372,10 @@ static int do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) { struct task_struct *tsk = current; + +if (ipipe_trap_notify (IPIPE_TRAP_SECTION ,regs)) +return 0 ; +do_bad_area (tsk, tsk->active_mm, addr, fsr, regs);return 0 ; }
@@ -376,6 +386,9 @@ do_sect_fault(unsigned long addr, unsignstatic int do_bad (unsigned long addr,unsigned int fsr,struct pt_regs *regs) { +if (ipipe_trap_notify (IPIPE_TRAP_DABT ,regs)) +return 0 ; +return 1 ; }
@@ -451,6 +464,9 @@ do_DataAbort(unsigned long addr, unsigneif (!inf->fn (addr, fsr, regs))return ; +if (ipipe_trap_notify (IPIPE_TRAP_UNKNOWN ,regs)) +return ; +printk (KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n" , inf->name, fsr, addr);
drivers/pci/msi.c +18 -3
@@ -146,6 +146,21 @@ static void unmask_MSI_irq(unsigned intmsi_set_mask_bit (vector,0 ); } +#ifdef CONFIG_IPIPE +static void ack_MSI_irq_w_maskbit (unsigned int vector) +{ +mask_MSI_irq (vector); +__ack_APIC_irq (); +} +static void ack_MSI_irq_wo_maskbit (unsigned int vector) +{ +__ack_APIC_irq (); +} +#else /* !CONFIG_IPIPE */ +#define ack_MSI_irq_wo_maskbit do_nothing +#define ack_MSI_irq_w_maskbit mask_MSI_irq +#endif /* CONFIG_IPIPE */ +static unsigned int startup_msi_irq_wo_maskbit (unsigned int vector) {struct msi_desc *entry;
@@ -209,7 +224,7 @@ static struct hw_interrupt_type msix_irq .shutdown = shutdown_msi_irq, .enable = unmask_MSI_irq, .disable = mask_MSI_irq, - .ack = mask_MSI_irq, + .ack = ack_MSI_irq_w_maskbit, .end = end_msi_irq_w_maskbit, .set_affinity = set_msi_irq_affinity };
@@ -225,7 +240,7 @@ static struct hw_interrupt_type msi_irq_ .shutdown = shutdown_msi_irq, .enable = unmask_MSI_irq, .disable = mask_MSI_irq, - .ack = mask_MSI_irq, + .ack = ack_MSI_irq_w_maskbit, .end = end_msi_irq_w_maskbit, .set_affinity = set_msi_irq_affinity };
@@ -241,7 +256,7 @@ static struct hw_interrupt_type msi_irq_ .shutdown = shutdown_msi_irq, .enable = do_nothing, .disable = do_nothing, - .ack = do_nothing, + .ack = ack_MSI_irq_wo_maskbit, .end = end_msi_irq_wo_maskbit, .set_affinity = set_msi_irq_affinity };
include/asm-arm/arch-integrator/entry-macro.S +5 -1
@@ -20,7 +20,11 @@ teq \irqstat, #0 ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)] moveq \irqnr, #IRQ_CIC_START - +#ifdef CONFIG_IPIPE + tst \irqstat, #0x00000040 @ check IRQ_TIMERINT1 first + movne \irqnr, #6 + bne 1003f +#endif /* CONFIG_IPIPE */ 1001: tst \irqstat, #15 bne 1002f add \irqnr, \irqnr, #4
include/asm-arm/arch-integrator/irqs.h +3 -0
@@ -80,3 +80,6 @@#define NR_IRQS 47 +#ifdef CONFIG_IPIPE +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_CP_CPPLDINT) +#endif /* CONFIG_IPIPE */
include/asm-arm/arch-integrator/platform.h +9 -2
@@ -26,13 +26,15 @@* NOTE: This is a multi-hosted header file for use with uHAL and * supported debuggers. * -* $Id: platform.s,v 1.32 2000/02/18 10:51:39 asims Exp $ +* $Id: platform.h,v 1.2 2006/02/20 13:54:22 rpm Exp $ * * ***********************************************************************/ #ifndef __address_h#define __address_h 1 +#include <linux/config.h> +/* ======================================================================== * Integrator definitions * ========================================================================
@@ -436,7 +438,7 @@* Timer definitions * * Only use timer 1 & 2 -* (both run at 24MHz and will need the clock divider set to 16). +* (both run at 1MHZ on /CP and at 24MHz on /AP) * * Timer 0 runs at bus frequency and therefore could vary and currently * uHAL can't handle that.
@@ -449,7 +451,12 @@#define MAX_TIMER 2#define MAX_PERIOD 699050 + +#ifdef CONFIG_ARCH_INTEGRATOR_CP +#define TICKS_PER_uSEC 1 +#else #define TICKS_PER_uSEC 24 +#endif /* * These are useconds NOT ticks.
include/asm-arm/arch-integrator/timex.h +2 -2
@@ -21,6 +21,6 @@*/ /* -* ?? +* Timer rate */ -#define CLOCK_TICK_RATE (50000000 / 16) +#define CLOCK_TICK_RATE (1000000)
include/asm-arm/arch-pxa/irqs.h +4 -0
@@ -73,6 +73,10 @@ ((i) - IRQ_GPIO(2) + 2)#define IRQ_TO_GPIO (i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) +#ifdef CONFIG_IPIPE +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_GPIO_2_x) +#endif /* CONFIG_IPIPE */ +#if defined(CONFIG_PXA25x)#define PXA_LAST_GPIO 80#elif defined(CONFIG_PXA27x)
include/asm-arm/arch-s3c2410/irqs.h +25 -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 +* 30-Oct-2006 Added Adeos/I-pipe support */
@@ -123,4 +126,26 @@#define NR_IRQS (IRQ_S3C2440_AC97+1) +#ifdef CONFIG_IPIPE +#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)) +#endif /* CONFIG_IPIPE */ +#endif /* __ASM_ARCH_IRQ_H */
include/asm-arm/arch-sa1100/irqs.h +4 -0
@@ -145,6 +145,10 @@#define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20)#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21) +#ifdef CONFIG_IPIPE +#define __ipipe_mach_irq_mux_p (irq) ((irq) == IRQ_GPIO11_27) +#endif /* CONFIG_IPIPE */ +/* * Figure out the MAX IRQ number. *
include/asm-arm/atomic.h +6 -6
@@ -110,10 +110,10 @@ static inline int atomic_add_return(intunsigned long flags;int val; -local_irq_save (flags); +local_irq_save_hw (flags); val = v->counter; v->counter = val += i; -local_irq_restore (flags); +local_irq_restore_hw (flags);return val; }
@@ -123,10 +123,10 @@ static inline int atomic_sub_return(intunsigned long flags;int val; -local_irq_save (flags); +local_irq_save_hw (flags); val = v->counter; v->counter = val -= i; -local_irq_restore (flags); +local_irq_restore_hw (flags);return val; }
@@ -135,9 +135,9 @@ static inline void atomic_clear_mask(uns {unsigned long flags; -local_irq_save (flags); +local_irq_save_hw (flags); *addr &= ~mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); }#endif /* __LINUX_ARM_ARCH__ */
include/asm-arm/bitops.h +12 -12
@@ -36,9 +36,9 @@ static inline void ____atomic_set_bit(un p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); *p |= mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); }static inline void ____atomic_clear_bit (unsigned int bit,volatile unsigned long *p)
@@ -48,9 +48,9 @@ static inline void ____atomic_clear_bit( p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); *p &= ~mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); }static inline void ____atomic_change_bit (unsigned int bit,volatile unsigned long *p)
@@ -60,9 +60,9 @@ static inline void ____atomic_change_bit p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); *p ^= mask; -local_irq_restore (flags); +local_irq_restore_hw (flags); } static inline int
@@ -74,10 +74,10 @@ ____atomic_test_and_set_bit(unsigned int p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); res = *p; *p = res | mask; -local_irq_restore (flags); +local_irq_restore_hw (flags);return res & mask; }
@@ -91,10 +91,10 @@ ____atomic_test_and_clear_bit(unsigned i p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); res = *p; *p = res & ~mask; -local_irq_restore (flags); +local_irq_restore_hw (flags);return res & mask; }
@@ -108,10 +108,10 @@ ____atomic_test_and_change_bit(unsigned p += bit >>5 ; -local_irq_save (flags); +local_irq_save_hw (flags); res = *p; *p = res ^ mask; -local_irq_restore (flags); +local_irq_restore_hw (flags);return res & mask; }
include/asm-arm/ipipe.h +207 -0
207 lines not on this page · raw message
include/asm-arm/mmu_context.h +4 -1
@@ -80,13 +80,16 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { - unsigned int cpu = smp_processor_id(); + unsigned int cpu = smp_processor_id_hw();if (prev != next) { +unsigned long flags; +local_irq_save_hw_cond (flags);cpu_set (cpu, next->cpu_vm_mask);check_context (next);cpu_switch_mm (next->pgd, next);cpu_clear (cpu, prev->cpu_vm_mask); +local_irq_restore_hw_cond (flags); } }
include/asm-arm/pgalloc.h +5 -0
@@ -29,6 +29,11 @@ extern void free_pgd_slow(pgd_t *pgd);#define check_pgt_cache () do { } while (0) +static inline void set_pgdir (unsigned long address,pgd_t entry) +{ +/* nop */ +} +/* * Allocate one PTE table. *
include/asm-arm/system.h +110 -26
228 lines not on this page · raw message
include/linux/hardirq.h +13 -0
@@ -87,8 +87,21 @@ extern void synchronize_irq(unsigned int# define synchronize_irq (irq) barrier()#endif +#ifdef CONFIG_IPIPE +#define nmi_enter () \ +do { \ + if (ipipe_current_domain == ipipe_root_domain) \ + irq_enter(); \ +} while(0) +#define nmi_exit () \ +do { \ + if (ipipe_current_domain == ipipe_root_domain) \ + sub_preempt_count(HARDIRQ_OFFSET); \ +} while(0) +#else /* !CONFIG_IPIPE */ #define nmi_enter () irq_enter()#define nmi_exit () sub_preempt_count(HARDIRQ_OFFSET) +#endif /* CONFIG_IPIPE */ #ifndef CONFIG_VIRT_CPU_ACCOUNTING static inline void account_user_vtime (struct task_struct *tsk)
include/linux/ipipe.h +770 -0
19 lines not on this page · raw message
include/linux/preempt.h +38 -21
59 lines not on this page · raw message
kernel/ipipe/core.c +1051 -0
1,051 lines not on this page · raw message
kernel/ipipe/generic.c +424 -0
424 lines not on this page · raw message
kernel/ipipe/Kconfig.debug +69 -0
69 lines not on this page · raw message
kernel/ipipe/tracer.c +1241 -0
1,241 lines not on this page · raw message
kernel/printk.c +73 -0
73 lines not on this page · raw message
kernel/sched.c +69 -3
72 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.
Philippe Gerum
AppliedQuoted 9 lines · Sebastian Smolorz
Quoted 8 lines · Philippe Gerum
Quoted 6 lines · Sebastian Smolorz
Hi Philippe and Gilles,
the updated I-pipe patch for ARM which was checked-in yesterday is not complete. Some files are missing e.g.
entry-header.Sormach-integrator/core.c. The attached patch should be the correct replacement.
Quoted 5 lines
Quoted 3 lines
Fixed, thanks. Btw, two 1.5-03 patches went upstream actually, one for 2.6.14, and the other - now fixed - one for 2.6.15. Does the former also need fixing?
Here it is.
Merged, thanks.
Quoted 3 lines
--
Sebastian
Signature · 1 line
Philippe.