Module: xenomai-2.5
Branch: master
Commit: 4277a0e209cc1226ef1e1bfa3fcea40a57fb1ff3
URL:    
http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=4277a0e209cc1226ef1e1bfa3fcea40a57fb1ff3

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Tue Feb  9 20:01:50 2010 +0100

arm: upgrade I-pipe support to 2.6.28.10-arm-1.12-07, 2.6.29-arm-1.13-05 and 
2.6.30-arm-1.15-01

---

 ...tch => adeos-ipipe-2.6.28.10-arm-1.12-07.patch} |   66 ++++++++++++++++----
 ....patch => adeos-ipipe-2.6.29-arm-1.13-05.patch} |   66 ++++++++++++++++----
 ....patch => adeos-ipipe-2.6.30-arm-1.15-01.patch} |   41 ++++++++++--
 3 files changed, 140 insertions(+), 33 deletions(-)

diff --git a/ksrc/arch/arm/patches/adeos-ipipe-2.6.28.10-arm-1.12-06.patch 
b/ksrc/arch/arm/patches/adeos-ipipe-2.6.28.10-arm-1.12-07.patch
similarity index 99%
rename from ksrc/arch/arm/patches/adeos-ipipe-2.6.28.10-arm-1.12-06.patch
rename to ksrc/arch/arm/patches/adeos-ipipe-2.6.28.10-arm-1.12-07.patch
index 3930a97..001af4d 100644
--- a/ksrc/arch/arm/patches/adeos-ipipe-2.6.28.10-arm-1.12-06.patch
+++ b/ksrc/arch/arm/patches/adeos-ipipe-2.6.28.10-arm-1.12-07.patch
@@ -348,10 +348,10 @@ index f073a6d..41526a7 100644
  extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
 diff --git a/arch/arm/include/asm/fcse.h b/arch/arm/include/asm/fcse.h
 new file mode 100644
-index 0000000..2a0c0e3
+index 0000000..34d3e37
 --- /dev/null
 +++ b/arch/arm/include/asm/fcse.h
-@@ -0,0 +1,91 @@
+@@ -0,0 +1,92 @@
 +/*
 + * Filename:    arch/arm/include/asm/fcse.h
 + * Description: ARM Process ID (PID) includes for Fast Address Space Switching
@@ -393,14 +393,15 @@ index 0000000..2a0c0e3
 +static inline void fcse_pid_set(unsigned long pid)
 +{
 +      __asm__ __volatile__ ("mcr p15, 0, %0, c13, c0, 0"
-+                            : /* */: "r" (pid) : "memory");
++                            : /* */ : "r" (pid) : "memory", "cc");
 +}
 +
 +/* Returns the state of the CPU's PID Register */
 +static inline unsigned long fcse_pid_get(void)
 +{
 +      unsigned long pid;
-+      __asm__ __volatile__("mrc p15, 0, %0, c13, c0, 0" : "=&r" (pid));
++      __asm__ __volatile__("mrc p15, 0, %0, c13, c0, 0" 
++                           : "=&r" (pid) : /* */ : "cc");
 +      return pid & ~FCSE_PID_MASK;
 +}
 +
@@ -445,7 +446,7 @@ index 0000000..2a0c0e3
 +#endif /* __ASM_ARM_FCSE_H */
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 0000000..64568f1
+index 0000000..4406b91
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,226 @@
@@ -479,10 +480,10 @@ index 0000000..64568f1
 +
 +#include <linux/ipipe_percpu.h>
 +
-+#define IPIPE_ARCH_STRING     "1.12-06"
++#define IPIPE_ARCH_STRING     "1.12-07"
 +#define IPIPE_MAJOR_NUMBER    1
 +#define IPIPE_MINOR_NUMBER    12
-+#define IPIPE_PATCH_NUMBER    6
++#define IPIPE_PATCH_NUMBER    7
 +
 +#ifdef CONFIG_SMP
 +#error "I-pipe/arm: SMP not yet implemented"
@@ -1247,10 +1248,10 @@ index 110295c..a015f40 100644
  /* Find an entry in the second-level page table.. */
  #define pmd_offset(dir, addr) ((pmd_t *)(dir))
 diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h
-index db80203..52b4bc2 100644
+index db80203..1e10309 100644
 --- a/arch/arm/include/asm/proc-fns.h
 +++ b/arch/arm/include/asm/proc-fns.h
-@@ -223,7 +223,8 @@
+@@ -223,12 +223,13 @@
  
  #ifdef CONFIG_MMU
  
@@ -1260,6 +1261,12 @@ index db80203..52b4bc2 100644
  
  #define cpu_get_pgd() \
        ({                                              \
+               unsigned long pg;                       \
+-              __asm__("mrc    p15, 0, %0, c2, c0, 0"  \
++              __asm__ __volatile__ ("mrc      p15, 0, %0, c2, c0, 0"  \
+                        : "=r" (pg) : : "cc");         \
+               pg &= ~0x3fff;                          \
+               (pgd_t *)phys_to_virt(pg);              \
 diff --git a/arch/arm/include/asm/processor.h 
b/arch/arm/include/asm/processor.h
 index 6ff3379..009336a 100644
 --- a/arch/arm/include/asm/processor.h
@@ -1420,7 +1427,7 @@ index 4305345..1ed1c8a 100644
  obj-$(CONFIG_CRUNCH)          += crunch.o crunch-bits.o
  AFLAGS_crunch-bits.o          := -Wa,-mcpu=ep9312
 diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
-index 77b0474..94d32e9 100644
+index 77b0474..d2fdcda 100644
 --- a/arch/arm/kernel/entry-armv.S
 +++ b/arch/arm/kernel/entry-armv.S
 @@ -4,6 +4,7 @@
@@ -1669,7 +1676,19 @@ index 77b0474..94d32e9 100644
        get_thread_info tsk
        mov     why, #0
        b       ret_to_user
-@@ -750,6 +850,18 @@ ENDPROC(__switch_to)
+@@ -713,7 +813,11 @@ ENTRY(__switch_to)
+       add     r4, r2, #TI_CPU_SAVE
+       ldr     r0, =thread_notify_head
+       mov     r1, #THREAD_NOTIFY_SWITCH
++#ifndef CONFIG_IPIPE
+       bl      atomic_notifier_call_chain
++#else /* !CONFIG_IPIPE */
++      bl      __ipipe_switch_to_notifier_call_chain
++#endif /* !CONFIG_IPIPE */
+       mov     r0, r5
+       ldmia   r4, {r4 - sl, fp, sp, pc}       @ Load all regs saved previously
+ ENDPROC(__switch_to)
+@@ -750,6 +854,18 @@ ENDPROC(__switch_to)
   * purpose.
   */
  
@@ -2123,10 +2142,10 @@ index 0000000..ce61e0c
 +#endif
 diff --git a/arch/arm/kernel/ipipe.c b/arch/arm/kernel/ipipe.c
 new file mode 100644
-index 0000000..ea7330b
+index 0000000..844e324
 --- /dev/null
 +++ b/arch/arm/kernel/ipipe.c
-@@ -0,0 +1,453 @@
+@@ -0,0 +1,474 @@
 +/* -*- linux-c -*-
 + * linux/arch/arm/kernel/ipipe.c
 + *
@@ -2163,6 +2182,7 @@ index 0000000..ea7330b
 +#include <linux/module.h>
 +#include <linux/errno.h>
 +#include <linux/kallsyms.h>
++#include <linux/kprobes.h>
 +#include <asm/system.h>
 +#include <asm/atomic.h>
 +#include <asm/hardirq.h>
@@ -2280,6 +2300,12 @@ index 0000000..ea7330b
 +      unsigned long flags;
 +      unsigned irq;
 +
++/* We do not want "wfi" to be called in arm926ejs based processor, as
++   this causes the I-cache to be disabled when idle. */
++#ifdef CONFIG_CPU_ARM926T
++      disable_hlt();
++#endif
++
 +      flags = ipipe_critical_enter(NULL);
 +
 +      /* First, virtualize all interrupts from the root domain. */
@@ -2374,6 +2400,20 @@ index 0000000..ea7330b
 +        return ipipe_root_domain_p && !__ipipe_test_root();
 +}
 +
++__kprobes int 
++__ipipe_switch_to_notifier_call_chain(struct atomic_notifier_head *nh,
++                                    unsigned long val, void *v)
++{
++        unsigned long flags;
++        int rc;
++
++        local_irq_save(flags);
++        rc = atomic_notifier_call_chain(nh, val, v);
++        local_irq_restore_nosync(flags);
++
++        return rc;
++}
++
 +asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs)
 +{
 +      unsigned long flags, origr7;
diff --git a/ksrc/arch/arm/patches/adeos-ipipe-2.6.29-arm-1.13-04.patch 
b/ksrc/arch/arm/patches/adeos-ipipe-2.6.29-arm-1.13-05.patch
similarity index 99%
rename from ksrc/arch/arm/patches/adeos-ipipe-2.6.29-arm-1.13-04.patch
rename to ksrc/arch/arm/patches/adeos-ipipe-2.6.29-arm-1.13-05.patch
index 2b77d24..f760b9e 100644
--- a/ksrc/arch/arm/patches/adeos-ipipe-2.6.29-arm-1.13-04.patch
+++ b/ksrc/arch/arm/patches/adeos-ipipe-2.6.29-arm-1.13-05.patch
@@ -333,10 +333,10 @@ index f073a6d..41526a7 100644
  extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
 diff --git a/arch/arm/include/asm/fcse.h b/arch/arm/include/asm/fcse.h
 new file mode 100644
-index 0000000..11e5388
+index 0000000..28dc372
 --- /dev/null
 +++ b/arch/arm/include/asm/fcse.h
-@@ -0,0 +1,89 @@
+@@ -0,0 +1,90 @@
 +/*
 + * Filename:    arch/arm/include/asm/fcse.h
 + * Description: ARM Process ID (PID) includes for Fast Address Space Switching
@@ -376,14 +376,15 @@ index 0000000..11e5388
 +static inline void fcse_pid_set(unsigned long pid)
 +{
 +      __asm__ __volatile__ ("mcr p15, 0, %0, c13, c0, 0"
-+                            : /* */: "r" (pid) : "memory");
++                            : /* */ : "r" (pid) : "memory", "cc");
 +}
 +
 +/* Returns the state of the CPU's PID Register */
 +static inline unsigned long fcse_pid_get(void)
 +{
 +      unsigned long pid;
-+      __asm__ __volatile__("mrc p15, 0, %0, c13, c0, 0" : "=&r" (pid));
++      __asm__ __volatile__("mrc p15, 0, %0, c13, c0, 0" 
++                           : "=&r" (pid) : /* */ : "cc");
 +      return pid & ~FCSE_PID_MASK;
 +}
 +
@@ -428,7 +429,7 @@ index 0000000..11e5388
 +#endif /* __ASM_ARM_FCSE_H */
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 0000000..1a89c56
+index 0000000..7b1417e
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,243 @@
@@ -463,10 +464,10 @@ index 0000000..1a89c56
 +#include <linux/ipipe_percpu.h>
 +#include <mach/irqs.h>                /* For __IPIPE_FEATURE_PIC_MUTE */
 +
-+#define IPIPE_ARCH_STRING     "1.13-04"
++#define IPIPE_ARCH_STRING     "1.13-05"
 +#define IPIPE_MAJOR_NUMBER    1
 +#define IPIPE_MINOR_NUMBER    13
-+#define IPIPE_PATCH_NUMBER    4
++#define IPIPE_PATCH_NUMBER    5
 +
 +#ifdef CONFIG_SMP
 +#error "I-pipe/arm: SMP not yet implemented"
@@ -1247,10 +1248,10 @@ index 110295c..a015f40 100644
  /* Find an entry in the second-level page table.. */
  #define pmd_offset(dir, addr) ((pmd_t *)(dir))
 diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h
-index db80203..52b4bc2 100644
+index db80203..1e10309 100644
 --- a/arch/arm/include/asm/proc-fns.h
 +++ b/arch/arm/include/asm/proc-fns.h
-@@ -223,7 +223,8 @@
+@@ -223,12 +223,13 @@
  
  #ifdef CONFIG_MMU
  
@@ -1260,6 +1261,12 @@ index db80203..52b4bc2 100644
  
  #define cpu_get_pgd() \
        ({                                              \
+               unsigned long pg;                       \
+-              __asm__("mrc    p15, 0, %0, c2, c0, 0"  \
++              __asm__ __volatile__ ("mrc      p15, 0, %0, c2, c0, 0"  \
+                        : "=r" (pg) : : "cc");         \
+               pg &= ~0x3fff;                          \
+               (pgd_t *)phys_to_virt(pg);              \
 diff --git a/arch/arm/include/asm/processor.h 
b/arch/arm/include/asm/processor.h
 index 1845892..cc9b9ff 100644
 --- a/arch/arm/include/asm/processor.h
@@ -1418,7 +1425,7 @@ index 4305345..69bc6e3 100644
  
  extra-y := $(head-y) init_task.o vmlinux.lds
 diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
-index 85040cf..8c4804f 100644
+index 85040cf..1384541 100644
 --- a/arch/arm/kernel/entry-armv.S
 +++ b/arch/arm/kernel/entry-armv.S
 @@ -4,6 +4,7 @@
@@ -1665,7 +1672,19 @@ index 85040cf..8c4804f 100644
        get_thread_info tsk
        mov     why, #0
        b       ret_to_user
-@@ -751,6 +851,18 @@ ENDPROC(__switch_to)
+@@ -714,7 +814,11 @@ ENTRY(__switch_to)
+       add     r4, r2, #TI_CPU_SAVE
+       ldr     r0, =thread_notify_head
+       mov     r1, #THREAD_NOTIFY_SWITCH
++#ifndef CONFIG_IPIPE
+       bl      atomic_notifier_call_chain
++#else /* !CONFIG_IPIPE */
++      bl      __ipipe_switch_to_notifier_call_chain
++#endif /* !CONFIG_IPIPE */
+       mov     r0, r5
+       ldmia   r4, {r4 - sl, fp, sp, pc}       @ Load all regs saved previously
+ ENDPROC(__switch_to)
+@@ -751,6 +855,18 @@ ENDPROC(__switch_to)
   * purpose.
   */
  
@@ -2036,10 +2055,10 @@ index 0000000..22f5669
 +#endif /* CONFIG_ARM_FCSE_BEST_EFFORT */
 diff --git a/arch/arm/kernel/ipipe.c b/arch/arm/kernel/ipipe.c
 new file mode 100644
-index 0000000..1b6a9f7
+index 0000000..781071f
 --- /dev/null
 +++ b/arch/arm/kernel/ipipe.c
-@@ -0,0 +1,518 @@
+@@ -0,0 +1,539 @@
 +/* -*- linux-c -*-
 + * linux/arch/arm/kernel/ipipe.c
 + *
@@ -2076,6 +2095,7 @@ index 0000000..1b6a9f7
 +#include <linux/module.h>
 +#include <linux/errno.h>
 +#include <linux/kallsyms.h>
++#include <linux/kprobes.h>
 +#include <asm/system.h>
 +#include <asm/atomic.h>
 +#include <asm/hardirq.h>
@@ -2229,6 +2249,12 @@ index 0000000..1b6a9f7
 +      unsigned long flags;
 +      unsigned irq;
 +
++/* We do not want "wfi" to be called in arm926ejs based processor, as
++   this causes the I-cache to be disabled when idle. */
++#ifdef CONFIG_CPU_ARM926T
++      disable_hlt();
++#endif
++
 +      flags = ipipe_critical_enter(NULL);
 +
 +      /* First, virtualize all interrupts from the root domain. */
@@ -2357,6 +2383,20 @@ index 0000000..1b6a9f7
 +        return ipipe_root_domain_p && !__ipipe_test_root();
 +}
 +
++__kprobes int 
++__ipipe_switch_to_notifier_call_chain(struct atomic_notifier_head *nh,
++                                    unsigned long val, void *v)
++{
++        unsigned long flags;
++        int rc;
++
++        local_irq_save(flags);
++        rc = atomic_notifier_call_chain(nh, val, v);
++        __local_irq_restore_nosync(flags);
++
++        return rc;
++}
++
 +asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs)
 +{
 +      unsigned long flags, origr7;
diff --git a/ksrc/arch/arm/patches/adeos-ipipe-2.6.30-arm-1.15-00.patch 
b/ksrc/arch/arm/patches/adeos-ipipe-2.6.30-arm-1.15-01.patch
similarity index 99%
rename from ksrc/arch/arm/patches/adeos-ipipe-2.6.30-arm-1.15-00.patch
rename to ksrc/arch/arm/patches/adeos-ipipe-2.6.30-arm-1.15-01.patch
index dd35eb5..5760e2e 100644
--- a/ksrc/arch/arm/patches/adeos-ipipe-2.6.30-arm-1.15-00.patch
+++ b/ksrc/arch/arm/patches/adeos-ipipe-2.6.30-arm-1.15-01.patch
@@ -466,7 +466,7 @@ index 0000000..28dc372
 +#endif /* __ASM_ARM_FCSE_H */
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 0000000..96dfb4a
+index 0000000..24770d6
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,274 @@
@@ -501,10 +501,10 @@ index 0000000..96dfb4a
 +#include <linux/ipipe_percpu.h>
 +#include <mach/irqs.h>                /* For __IPIPE_FEATURE_PIC_MUTE */
 +
-+#define IPIPE_ARCH_STRING     "1.15-00"
++#define IPIPE_ARCH_STRING     "1.15-01"
 +#define IPIPE_MAJOR_NUMBER    1
 +#define IPIPE_MINOR_NUMBER    15
-+#define IPIPE_PATCH_NUMBER    0
++#define IPIPE_PATCH_NUMBER    1
 +
 +#ifdef CONFIG_SMP
 +#error "I-pipe/arm: SMP not yet implemented"
@@ -1517,7 +1517,7 @@ index 11a5197..b1bb328 100644
  
  extra-y := $(head-y) init_task.o vmlinux.lds
 diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
-index 83b1da6..981c640 100644
+index 83b1da6..03c7144 100644
 --- a/arch/arm/kernel/entry-armv.S
 +++ b/arch/arm/kernel/entry-armv.S
 @@ -4,6 +4,7 @@
@@ -1764,7 +1764,19 @@ index 83b1da6..981c640 100644
        get_thread_info tsk
        mov     why, #0
        b       ret_to_user
-@@ -770,6 +870,18 @@ ENDPROC(__switch_to)
+@@ -732,7 +832,11 @@ ENTRY(__switch_to)
+       add     r4, r2, #TI_CPU_SAVE
+       ldr     r0, =thread_notify_head
+       mov     r1, #THREAD_NOTIFY_SWITCH
++#ifndef CONFIG_IPIPE
+       bl      atomic_notifier_call_chain
++#else /* !CONFIG_IPIPE */
++      bl      __ipipe_switch_to_notifier_call_chain
++#endif /* !CONFIG_IPIPE */
+       mov     r0, r5
+       ldmia   r4, {r4 - sl, fp, sp, pc}       @ Load all regs saved previously
+  UNWIND(.fnend                )
+@@ -770,6 +874,18 @@ ENDPROC(__switch_to)
   * purpose.
   */
  
@@ -2137,10 +2149,10 @@ index 0000000..22f5669
 +#endif /* CONFIG_ARM_FCSE_BEST_EFFORT */
 diff --git a/arch/arm/kernel/ipipe.c b/arch/arm/kernel/ipipe.c
 new file mode 100644
-index 0000000..1094f74
+index 0000000..e46a90f
 --- /dev/null
 +++ b/arch/arm/kernel/ipipe.c
-@@ -0,0 +1,517 @@
+@@ -0,0 +1,532 @@
 +/* -*- linux-c -*-
 + * linux/arch/arm/kernel/ipipe.c
 + *
@@ -2177,6 +2189,7 @@ index 0000000..1094f74
 +#include <linux/module.h>
 +#include <linux/errno.h>
 +#include <linux/kallsyms.h>
++#include <linux/kprobes.h>
 +#include <asm/system.h>
 +#include <asm/atomic.h>
 +#include <asm/hardirq.h>
@@ -2462,6 +2475,20 @@ index 0000000..1094f74
 +        return ipipe_root_domain_p && !__ipipe_test_root();
 +}
 +
++__kprobes int 
++__ipipe_switch_to_notifier_call_chain(struct atomic_notifier_head *nh,
++                                    unsigned long val, void *v)
++{
++        unsigned long flags;
++        int rc;
++
++        local_irq_save(flags);
++        rc = atomic_notifier_call_chain(nh, val, v);
++        __local_irq_restore_nosync(flags);
++
++        return rc;
++}
++
 +asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs)
 +{
 +      unsigned long flags, origr7;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to