Module: xenomai-3
Branch: master
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 0000000..c875c46
+index 0000000..7145c10
 --- /dev/null
 +++ b/arch/x86/include/asm/ipipe.h
 @@ -0,0 +1,118 @@
@@ -467,7 +467,7 @@ index 0000000..c875c46
 +
 +#ifdef CONFIG_IPIPE
 +
-+#define IPIPE_CORE_RELEASE    1
++#define IPIPE_CORE_RELEASE    2
 +
 +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_REGISTER    rip,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_REGISTER    rsp
        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)
        jnz  retint_restore_args
        bt   $9,EFLAGS-ARGOFFSET(%rsp)  /* interrupts off? */
        jnc  retint_restore_args
@@ -3087,7 +3088,7 @@ index c844f08..40157fd 100644
        jmp exit_intr
  #endif
        CFI_ENDPROC
-@@ -970,6 +1106,31 @@ END(__do_double_fault)
+@@ -970,6 +1107,31 @@ END(__do_double_fault)
  /*
   * APIC interrupts.
   */
@@ -3119,7 +3120,7 @@ index c844f08..40157fd 100644
  .macro apicinterrupt3 num sym do_sym
  ENTRY(\sym)
        INTR_FRAME
-@@ -981,6 +1142,7 @@ ENTRY(\sym)
+@@ -981,6 +1143,7 @@ ENTRY(\sym)
        CFI_ENDPROC
  END(\sym)
  .endm
@@ -3127,7 +3128,7 @@ index c844f08..40157fd 100644
  
  #ifdef CONFIG_TRACING
  #define trace(sym) trace_##sym
-@@ -1037,6 +1199,14 @@ apicinterrupt CALL_FUNCTION_VECTOR \
+@@ -1037,6 +1200,14 @@ apicinterrupt CALL_FUNCTION_VECTOR \
        call_function_interrupt smp_call_function_interrupt
  apicinterrupt RESCHEDULE_VECTOR \
        reschedule_interrupt smp_reschedule_interrupt
@@ -3142,7 +3143,7 @@ index c844f08..40157fd 100644
  #endif
  
  apicinterrupt ERROR_APIC_VECTOR \
-@@ -1106,7 +1276,23 @@ ENTRY(\sym)
+@@ -1106,7 +1277,23 @@ ENTRY(\sym)
        subq $EXCEPTION_STKSZ, INIT_TSS_IST(\shift_ist)
        .endif
  
@@ -3166,7 +3167,7 @@ index c844f08..40157fd 100644
  
        .if \shift_ist != -1
        addq $EXCEPTION_STKSZ, INIT_TSS_IST(\shift_ist)
-@@ -1181,15 +1367,19 @@ ENTRY(do_softirq_own_stack)
+@@ -1181,15 +1368,19 @@ ENTRY(do_softirq_own_stack)
        CFI_REL_OFFSET rbp,0
        mov  %rsp,%rbp
        CFI_DEF_CFA_REGISTER rbp
@@ -3186,7 +3187,7 @@ index c844f08..40157fd 100644
        ret
        CFI_ENDPROC
  END(do_softirq_own_stack)
-@@ -1301,8 +1491,13 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
+@@ -1301,8 +1492,13 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
        hyperv_callback_vector hyperv_vector_handler
  #endif /* CONFIG_HYPERV */
  
@@ -3200,7 +3201,7 @@ index c844f08..40157fd 100644
  idtentry stack_segment do_stack_segment has_error_code=1 paranoid=1
  #ifdef CONFIG_XEN
  idtentry xen_debug do_debug has_error_code=0
-@@ -1336,8 +1531,13 @@ ENTRY(paranoid_exit)
+@@ -1336,8 +1532,13 @@ ENTRY(paranoid_exit)
        DEFAULT_FRAME
        DISABLE_INTERRUPTS(CLBR_NONE)
        TRACE_IRQS_OFF_DEBUG
@@ -3214,7 +3215,7 @@ index c844f08..40157fd 100644
        testl $3,CS(%rsp)
        jnz   paranoid_userspace
  paranoid_swapgs:
-@@ -1408,7 +1608,6 @@ ENTRY(error_entry)
+@@ -1408,7 +1609,6 @@ ENTRY(error_entry)
  error_swapgs:
        SWAPGS
  error_sti:
@@ -7997,6 +7998,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);                                   \
++      hard_local_irq_restore(flags);                                  \
+       ret__;                                                          \
+ })
+ 
+@@ -483,10 +483,10 @@ do {                                                     
                \
+ ({                                                                    \
+       int ret__;                                                      \
+       unsigned long flags;                                            \
+-      raw_local_irq_save(flags);                                      \
++      flags = hard_local_irq_save();                                  \
+       ret__ = raw_cpu_generic_cmpxchg_double(pcp1, pcp2,              \
+                       oval1, oval2, nval1, nval2);                    \
+-      raw_local_irq_restore(flags);                                   \
++      hard_local_irq_restore(flags);                                  \
+       ret__;                                                          \
+ })
+ 
 diff --git a/include/linux/preempt.h b/include/linux/preempt.h
 index de83b4e..7fdf00b 100644
 --- a/include/linux/preempt.h


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to