[Xenomai-git] Philippe Gerum : cobalt/arm: upgrade I-pipe support

2015-02-04 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 2b230cd8f42675cc3794c346e6f9955d18eef44b
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=2b230cd8f42675cc3794c346e6f9955d18eef44b

Author: Philippe Gerum r...@xenomai.org
Date:   Tue Feb  3 18:31:19 2015 +0100

cobalt/arm: upgrade I-pipe support

---

 16-arm-1.patch = ipipe-core-3.16-arm-3.patch} |  240 +---
 1 file changed, 109 insertions(+), 131 deletions(-)

diff --git a/kernel/cobalt/arch/arm/patches/ipipe-core-3.16-arm-1.patch 
b/kernel/cobalt/arch/arm/patches/ipipe-core-3.16-arm-3.patch
similarity index 99%
rename from kernel/cobalt/arch/arm/patches/ipipe-core-3.16-arm-1.patch
rename to kernel/cobalt/arch/arm/patches/ipipe-core-3.16-arm-3.patch
index c88def1..6d26885 100644
--- a/kernel/cobalt/arch/arm/patches/ipipe-core-3.16-arm-1.patch
+++ b/kernel/cobalt/arch/arm/patches/ipipe-core-3.16-arm-3.patch
@@ -72,51 +72,6 @@ index 290f02ee..dc51f52 100644
  source kernel/Kconfig.preempt
  
  config HZ_FIXED
-diff --git a/arch/arm/Kconfig.rej b/arch/arm/Kconfig.rej
-new file mode 100644
-index 000..0f0d7c1
 /dev/null
-+++ b/arch/arm/Kconfig.rej
-@@ -0,0 +1,39 @@
-+--- arch/arm/Kconfig
- arch/arm/Kconfig
-+@@ -25,14 +25,15 @@
-+  select GENERIC_STRNCPY_FROM_USER
-+  select GENERIC_STRNLEN_USER
-+  select HARDIRQS_SW_RESEND
-++ select HAVE_ARCH_AUDITSYSCALL if (AEABI  !OABI_COMPAT)
-+  select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
-+  select HAVE_ARCH_KGDB
-+  select HAVE_ARCH_SECCOMP_FILTER if (AEABI  !OABI_COMPAT)
-+  select HAVE_ARCH_TRACEHOOK
-+  select HAVE_BPF_JIT
-++ select HAVE_CC_STACKPROTECTOR
-+  select HAVE_CONTEXT_TRACKING
-+  select HAVE_C_RECORDMCOUNT
-+- select HAVE_CC_STACKPROTECTOR
-+  select HAVE_DEBUG_KMEMLEAK
-+  select HAVE_DMA_API_DEBUG
-+  select HAVE_DMA_ATTRS
-+@@ -502,8 +493,8 @@
-+  bool IXP4xx-based
-+  depends on MMU
-+  select ARCH_HAS_DMA_SET_COHERENT_MASK
-+- select ARCH_SUPPORTS_BIG_ENDIAN
-+  select ARCH_REQUIRE_GPIOLIB
-++ select ARCH_SUPPORTS_BIG_ENDIAN
-+  select CLKSRC_MMIO
-+  select CPU_XSCALE
-+  select DMABOUNCE if PCI
-+@@ -714,8 +699,8 @@
-+ 
-+ config ARCH_S3C24XX
-+  bool Samsung S3C24XX SoCs
-+- select ARCH_HAS_CPUFREQ
-+  select ARCH_REQUIRE_GPIOLIB
-++ select ATAGS
-+  select CLKDEV_LOOKUP
-+  select CLKSRC_SAMSUNG_PWM
-+  select GENERIC_CLOCKEVENTS
 diff --git a/arch/arm/boot/compressed/decompress.c 
b/arch/arm/boot/compressed/decompress.c
 index bd245d3..65f2238 100644
 --- a/arch/arm/boot/compressed/decompress.c
@@ -1680,7 +1635,7 @@ index bb28af7..780ca50 100644
  static inline void sp804_clockevents_init(void __iomem *base, unsigned int 
irq, const char *name)
 diff --git a/arch/arm/include/asm/ipipe.h b/arch/arm/include/asm/ipipe.h
 new file mode 100644
-index 000..0aca4cf
+index 000..4701f8d
 --- /dev/null
 +++ b/arch/arm/include/asm/ipipe.h
 @@ -0,0 +1,272 @@
@@ -1728,7 +1683,7 @@ index 000..0aca4cf
 +#include linux/jump_label.h
 +#include linux/ipipe_trace.h
 +
-+#define IPIPE_CORE_RELEASE1
++#define IPIPE_CORE_RELEASE3
 +
 +struct ipipe_domain;
 +
@@ -3196,7 +3151,7 @@ index 85598b5..e91850c 100644
DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate));
  #ifdef CONFIG_SMP
 diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
-index 52a949a..d7b848b 100644
+index 52a949a..bafe35e 100644
 --- a/arch/arm/kernel/entry-armv.S
 +++ b/arch/arm/kernel/entry-armv.S
 @@ -4,6 +4,7 @@
@@ -3328,7 +3283,24 @@ index 52a949a..d7b848b 100644
mov r2, r4
mov r3, r5
  
-@@ -676,7 +728,22 @@ __pabt_usr:
+@@ -539,6 +591,7 @@ call_fpe:
+   adr r6, .LCneon_arm_opcodes
+ 2:ldr r5, [r6], #4@ mask value
+   ldr r7, [r6], #4@ opcode bits matching in mask
++  disable_irq_cond
+   cmp r5, #0  @ end mask?
+   beq 1f
+   and r8, r0, r5
+@@ -549,6 +602,8 @@ call_fpe:
+   strbr7, [r10, #TI_USED_CP + 11] @ mark CP#11 as used
+   b   do_vfp  @ let VFP handler handle this
+ 1:
++#else
++  disable_irq_cond
+ #endif
+   tst r0, #0x0800 @ only CDP/CPRT/LDC/STC have 
bit 27
+   tstne   r0, #0x0400 @ bit 26 set on both ARM and 
Thumb-2
+@@ -676,7 +731,22 @@ __pabt_usr:
  ENTRY(ret_from_exception)
   UNWIND(.fnstart  )
   UNWIND(.cantunwind   )
@@ -3339,11 +3311,11 @@ index 52a949a..d7b848b 100644
 +  cmp r0, #1
 + THUMB(   it ne)
 +  bne __ipipe_ret_to_user_irqs_disabled  @ Fast exit path over 
non-root domains
-   get_thread_info tsk
-+#else /* !CONFIG_IPIPE_LEGACY */
 +  get_thread_info tsk
++#else /* !CONFIG_IPIPE_LEGACY */
+   get_thread_info tsk
 +  ldr r0, [tsk, #TI_IPIPE]
-+  tst r0, _TIP_HEAD
++  tst r0, #_TIP_HEAD
 + THUMB(  

[Xenomai-git] Philippe Gerum : cobalt/blackfin: upgrade I-pipe support

2015-02-04 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 936bc855d810b68fa8966e5c50dbc6540747d0df
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=936bc855d810b68fa8966e5c50dbc6540747d0df

Author: Philippe Gerum r...@xenomai.org
Date:   Tue Feb  3 18:31:57 2015 +0100

cobalt/blackfin: upgrade I-pipe support

---

 ...in-1.patch = ipipe-core-3.16-blackfin-2.patch} |   74 +++-
 1 file changed, 72 insertions(+), 2 deletions(-)

diff --git 
a/kernel/cobalt/arch/blackfin/patches/ipipe-core-3.16-blackfin-1.patch 
b/kernel/cobalt/arch/blackfin/patches/ipipe-core-3.16-blackfin-2.patch
similarity index 99%
rename from kernel/cobalt/arch/blackfin/patches/ipipe-core-3.16-blackfin-1.patch
rename to kernel/cobalt/arch/blackfin/patches/ipipe-core-3.16-blackfin-2.patch
index cf38275..c502f05 100644
--- a/kernel/cobalt/arch/blackfin/patches/ipipe-core-3.16-blackfin-1.patch
+++ b/kernel/cobalt/arch/blackfin/patches/ipipe-core-3.16-blackfin-2.patch
@@ -12,7 +12,7 @@ index f81e7b9..8af0949 100644
  
  comment Processor and Board Settings
 diff --git a/arch/blackfin/include/asm/ipipe.h 
b/arch/blackfin/include/asm/ipipe.h
-index 17b5e92..2a486ff 100644
+index 17b5e92..7e99af8 100644
 --- a/arch/blackfin/include/asm/ipipe.h
 +++ b/arch/blackfin/include/asm/ipipe.h
 @@ -28,7 +28,7 @@
@@ -32,7 +32,7 @@ index 17b5e92..2a486ff 100644
 -#define IPIPE_MAJOR_NUMBER1
 -#define IPIPE_MINOR_NUMBER16
 -#define IPIPE_PATCH_NUMBER1
-+#define IPIPE_CORE_RELEASE1
++#define IPIPE_CORE_RELEASE2
  
  #ifdef CONFIG_SMP
  #error I-pipe/blackfin: SMP not implemented
@@ -4442,6 +4442,76 @@ index ec4e3bd..b32a421 100644
int cpu;
int vcpu_id;
int srcu_idx;
+diff --git a/include/linux/percpu.h b/include/linux/percpu.h
+index 8419053..e5d43ab 100644
+--- a/include/linux/percpu.h
 b/include/linux/percpu.h
+@@ -303,9 +303,9 @@ do {   
\
+ #define _this_cpu_generic_to_op(pcp, val, op) \
+ do {  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
++  flags = hard_local_irq_save();  \
+   *raw_cpu_ptr((pcp)) op val;\
+-  raw_local_irq_restore(flags);   \
++  hard_local_irq_restore(flags);  \
+ } while (0)
+ 
+ #ifndef this_cpu_write
+@@ -388,10 +388,10 @@ do { 
\
+ ({\
+   typeof(pcp) ret__;  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
+-  raw_cpu_add(pcp, val);  \
++  flags = hard_local_irq_save();  \
++  raw_cpu_add(pcp, val);  \
+   ret__ = raw_cpu_read(pcp);  \
+-  raw_local_irq_restore(flags);   \
++  hard_local_irq_restore(flags);  \
+   ret__;  \
+ })
+ 
+@@ -418,10 +418,10 @@ do { 
\
+ #define _this_cpu_generic_xchg(pcp, nval) \
+ ({typeof(pcp) ret__;  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
++  flags = hard_local_irq_save();  \
+   ret__ = raw_cpu_read(pcp);  \
+   raw_cpu_write(pcp, nval);   \
+-  raw_local_irq_restore(flags);   \
++  hard_local_irq_restore(flags);  \
+   ret__;  \
+ })
+ 
+@@ -446,11 +446,11 @@ do { 
\
+ ({\
+   typeof(pcp) ret__;  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
++  flags = hard_local_irq_save();  \
+   ret__ = raw_cpu_read(pcp);  \
+   if (ret__ == (oval))\
+   raw_cpu_write(pcp, nval);   

[Xenomai-git] Philippe Gerum : cobalt/powerpc: upgrade I-pipe support

2015-02-04 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 5acc2742e24997df496611dc96044f53775a86c3
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=5acc2742e24997df496611dc96044f53775a86c3

Author: Philippe Gerum r...@xenomai.org
Date:   Tue Feb  3 18:32:24 2015 +0100

cobalt/powerpc: upgrade I-pipe support

---

 ...rpc-1.patch = ipipe-core-3.16-powerpc-2.patch} |   74 +++-
 1 file changed, 72 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/arch/powerpc/patches/ipipe-core-3.16-powerpc-1.patch 
b/kernel/cobalt/arch/powerpc/patches/ipipe-core-3.16-powerpc-2.patch
similarity index 99%
rename from kernel/cobalt/arch/powerpc/patches/ipipe-core-3.16-powerpc-1.patch
rename to kernel/cobalt/arch/powerpc/patches/ipipe-core-3.16-powerpc-2.patch
index 1737c91..72cf890 100644
--- a/kernel/cobalt/arch/powerpc/patches/ipipe-core-3.16-powerpc-1.patch
+++ b/kernel/cobalt/arch/powerpc/patches/ipipe-core-3.16-powerpc-2.patch
@@ -341,7 +341,7 @@ index 10be1dd..cfad863 100644
   * or should we not care like we do now ? --BenH.
 diff --git a/arch/powerpc/include/asm/ipipe.h 
b/arch/powerpc/include/asm/ipipe.h
 new file mode 100644
-index 000..824fa82
+index 000..ac0d5fb
 --- /dev/null
 +++ b/arch/powerpc/include/asm/ipipe.h
 @@ -0,0 +1,157 @@
@@ -386,7 +386,7 @@ index 000..824fa82
 +#include linux/cache.h
 +#include linux/threads.h
 +
-+#define IPIPE_CORE_RELEASE1
++#define IPIPE_CORE_RELEASE2
 +
 +struct ipipe_domain;
 +
@@ -8204,6 +8204,76 @@ index ec4e3bd..b32a421 100644
int cpu;
int vcpu_id;
int srcu_idx;
+diff --git a/include/linux/percpu.h b/include/linux/percpu.h
+index 8419053..e5d43ab 100644
+--- a/include/linux/percpu.h
 b/include/linux/percpu.h
+@@ -303,9 +303,9 @@ do {   
\
+ #define _this_cpu_generic_to_op(pcp, val, op) \
+ do {  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
++  flags = hard_local_irq_save();  \
+   *raw_cpu_ptr((pcp)) op val;\
+-  raw_local_irq_restore(flags);   \
++  hard_local_irq_restore(flags);  \
+ } while (0)
+ 
+ #ifndef this_cpu_write
+@@ -388,10 +388,10 @@ do { 
\
+ ({\
+   typeof(pcp) ret__;  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
+-  raw_cpu_add(pcp, val);  \
++  flags = hard_local_irq_save();  \
++  raw_cpu_add(pcp, val);  \
+   ret__ = raw_cpu_read(pcp);  \
+-  raw_local_irq_restore(flags);   \
++  hard_local_irq_restore(flags);  \
+   ret__;  \
+ })
+ 
+@@ -418,10 +418,10 @@ do { 
\
+ #define _this_cpu_generic_xchg(pcp, nval) \
+ ({typeof(pcp) ret__;  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
++  flags = hard_local_irq_save();  \
+   ret__ = raw_cpu_read(pcp);  \
+   raw_cpu_write(pcp, nval);   \
+-  raw_local_irq_restore(flags);   \
++  hard_local_irq_restore(flags);  \
+   ret__;  \
+ })
+ 
+@@ -446,11 +446,11 @@ do { 
\
+ ({\
+   typeof(pcp) ret__;  \
+   unsigned long flags;\
+-  raw_local_irq_save(flags);  \
++  flags = hard_local_irq_save();  \
+   ret__ = raw_cpu_read(pcp);  \
+   if (ret__ == (oval))\
+   raw_cpu_write(pcp, nval);   \
+-  raw_local_irq_restore(flags);   \
++  

[Xenomai-git] Philippe Gerum : cobalt/x86: upgrade I-pipe support

2015-02-04 Thread git repository hosting
Module: xenomai-3
Branch: next
Commit: 0cf4cbe18e16e2d5e223888427ce571e84b542ba
URL:
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=0cf4cbe18e16e2d5e223888427ce571e84b542ba

Author: Philippe Gerum r...@xenomai.org
Date:   Tue Feb  3 18:30:50 2015 +0100

cobalt/x86: upgrade I-pipe support

---

 16-x86-1.patch = ipipe-core-3.16-x86-2.patch} |  113 
 1 file changed, 92 insertions(+), 21 deletions(-)

diff --git a/kernel/cobalt/arch/x86/patches/ipipe-core-3.16-x86-1.patch 
b/kernel/cobalt/arch/x86/patches/ipipe-core-3.16-x86-2.patch
similarity index 99%
rename from kernel/cobalt/arch/x86/patches/ipipe-core-3.16-x86-1.patch
rename to kernel/cobalt/arch/x86/patches/ipipe-core-3.16-x86-2.patch
index 88cd396..18fa1fa 100644
--- a/kernel/cobalt/arch/x86/patches/ipipe-core-3.16-x86-1.patch
+++ b/kernel/cobalt/arch/x86/patches/ipipe-core-3.16-x86-2.patch
@@ -437,7 +437,7 @@ index 615fa90..e0a62ab 100644
  extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask,
 diff --git a/arch/x86/include/asm/ipipe.h b/arch/x86/include/asm/ipipe.h
 new file mode 100644
-index 000..c875c46
+index 000..7145c10
 --- /dev/null
 +++ b/arch/x86/include/asm/ipipe.h
 @@ -0,0 +1,118 @@
@@ -467,7 +467,7 @@ index 000..c875c46
 +
 +#ifdef CONFIG_IPIPE
 +
-+#define IPIPE_CORE_RELEASE1
++#define IPIPE_CORE_RELEASE2
 +
 +struct ipipe_domain;
 +struct pt_regs;
@@ -2786,7 +2786,7 @@ index 0d0c9d4..6e6b88a 100644
movl %esp,%eax  # pt_regs pointer
call do_int3
 diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
-index c844f08..40157fd 100644
+index c844f08..a41be57 100644
 --- a/arch/x86/kernel/entry_64.S
 +++ b/arch/x86/kernel/entry_64.S
 @@ -50,6 +50,7 @@
@@ -2859,7 +2859,7 @@ index c844f08..40157fd 100644
  
call schedule_tail  # rdi: 'prev' task parameter
  
-@@ -409,15 +432,60 @@ GLOBAL(system_call_after_swapgs)
+@@ -409,15 +432,61 @@ GLOBAL(system_call_after_swapgs)
movq  %rax,ORIG_RAX-ARGOFFSET(%rsp)
movq  %rcx,RIP-ARGOFFSET(%rsp)
CFI_REL_OFFSET rip,RIP-ARGOFFSET
@@ -2877,6 +2877,7 @@ index c844f08..40157fd 100644
 +  jz root_fastexit
 +  testl $_TIP_MAYDAY,TI_ipipe+THREAD_INFO(%rsp,RIP-ARGOFFSET)
 +  jz pipeline_leave
++  leaq -ARGOFFSET(%rsp),%rdi
 +  call __ipipe_call_mayday
 +  jmp pipeline_leave
 +root_fastexit:
@@ -2926,7 +2927,7 @@ index c844f08..40157fd 100644
ja badsys
movq %r10,%rcx
call *sys_call_table(,%rax,8)  # XXX:rip relative
-@@ -441,6 +509,7 @@ sysret_check:
+@@ -441,6 +510,7 @@ sysret_check:
 * sysretq will re-enable interrupts:
 */
TRACE_IRQS_ON
@@ -2934,7 +2935,7 @@ index c844f08..40157fd 100644
movq RIP-ARGOFFSET(%rsp),%rcx
CFI_REGISTERrip,rcx
RESTORE_ARGS 1,-ARG_SKIP,0
-@@ -452,6 +521,8 @@ sysret_check:
+@@ -452,6 +522,8 @@ sysret_check:
/* Handle reschedules */
/* edx: work, edi: workmask */
  sysret_careful:
@@ -2943,7 +2944,7 @@ index c844f08..40157fd 100644
bt $TIF_NEED_RESCHED,%edx
jnc sysret_signal
TRACE_IRQS_ON
-@@ -461,6 +532,16 @@ sysret_careful:
+@@ -461,6 +533,16 @@ sysret_careful:
popq_cfi %rdi
jmp sysret_check
  
@@ -2960,7 +2961,7 @@ index c844f08..40157fd 100644
/* Handle a signal */
  sysret_signal:
TRACE_IRQS_ON
-@@ -558,9 +639,15 @@ GLOBAL(int_with_check)
+@@ -558,9 +640,15 @@ GLOBAL(int_with_check)
movl TI_flags(%rcx),%edx
andl %edi,%edx
jnz   int_careful
@@ -2976,7 +2977,7 @@ index c844f08..40157fd 100644
/* Either reschedule or signal or syscall exit tracking needed. */
/* First do a reschedule test. */
/* edx: work, edi: workmask */
-@@ -766,7 +853,31 @@ END(interrupt)
+@@ -766,7 +854,31 @@ END(interrupt)
subq $ORIG_RAX-RBP, %rsp
CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP
SAVE_ARGS_IRQ
@@ -3008,7 +3009,7 @@ index c844f08..40157fd 100644
.endm
  
/*
-@@ -775,10 +886,27 @@ END(interrupt)
+@@ -775,10 +887,27 @@ END(interrupt)
 */
.p2align CONFIG_X86_L1_CACHE_SHIFT
  common_interrupt:
@@ -3036,7 +3037,7 @@ index c844f08..40157fd 100644
/* 0(%rsp): old_rsp-ARGOFFSET */
  ret_from_intr:
DISABLE_INTERRUPTS(CLBR_NONE)
-@@ -792,7 +920,7 @@ ret_from_intr:
+@@ -792,7 +921,7 @@ ret_from_intr:
CFI_DEF_CFA_REGISTERrsp
CFI_ADJUST_CFA_OFFSET   RBP-ARGOFFSET
  
@@ -3045,7 +3046,7 @@ index c844f08..40157fd 100644
GET_THREAD_INFO(%rcx)
testl $3,CS-ARGOFFSET(%rsp)
je retint_kernel
-@@ -812,20 +940,20 @@ retint_check:
+@@ -812,20 +941,20 @@ retint_check:
jnz  retint_careful
  
  retint_swapgs:/* return to user-space */
@@ -3070,7 +3071,7 @@ index c844f08..40157fd 100644
  restore_args:
RESTORE_ARGS 1,8,1
  
-@@ -930,7 +1058,15 @@ ENTRY(retint_kernel)
+@@ -930,7 +1059,15 @@ ENTRY(retint_kernel)