Commit 33bbc343 authored by Don Mahurin's avatar Don Mahurin Committed by Philippe Gerum
Browse files

arm64/ipipe: update arch/arm64 with ipipe-3.14.44-arm-12 arch/arm changes

parent 72c3c95e
...@@ -42,7 +42,7 @@ extern unsigned long arm_return_addr(int level); ...@@ -42,7 +42,7 @@ extern unsigned long arm_return_addr(int level);
#include <linux/jump_label.h> #include <linux/jump_label.h>
#include <linux/ipipe_trace.h> #include <linux/ipipe_trace.h>
#define IPIPE_CORE_RELEASE 7 #define IPIPE_CORE_RELEASE 12
struct ipipe_domain; struct ipipe_domain;
......
...@@ -200,9 +200,9 @@ static inline void hard_local_irq_restore(unsigned long x) ...@@ -200,9 +200,9 @@ static inline void hard_local_irq_restore(unsigned long x)
ipipe_unstall_root(); \ ipipe_unstall_root(); \
} while (0) } while (0)
#define local_fiq_enable() ipipe_unstall_root() #define local_fiq_enable() hard_local_fiq_enable_notrace()
#define local_fiq_disable() ipipe_stall_root() #define local_fiq_disable() hard_local_fiq_disable_notrace()
#define arch_local_irq_restore(flags) \ #define arch_local_irq_restore(flags) \
do { \ do { \
......
...@@ -49,7 +49,9 @@ struct thread_info { ...@@ -49,7 +49,9 @@ struct thread_info {
struct task_struct *task; /* main task structure */ struct task_struct *task; /* main task structure */
int preempt_count; /* 0 => preemptable, <0 => bug */ int preempt_count; /* 0 => preemptable, <0 => bug */
int cpu; /* cpu */ int cpu; /* cpu */
#ifdef CONFIG_IPIPE
unsigned long ipipe_flags;
#endif
struct ipipe_threadinfo ipipe_data; struct ipipe_threadinfo ipipe_data;
}; };
...@@ -140,5 +142,14 @@ static inline struct thread_info *current_thread_info(void) ...@@ -140,5 +142,14 @@ static inline struct thread_info *current_thread_info(void)
_TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \ _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \
_TIF_NOHZ) _TIF_NOHZ)
/* ti->ipipe_flags */
#define TIP_MAYDAY 0 /* MAYDAY call is pending */
#define TIP_NOTIFY 1 /* Notify head domain about kernel events */
#define TIP_HEAD 2 /* Runs in head domain */
#define _TIP_MAYDAY (1 << TIP_MAYDAY)
#define _TIP_NOTIFY (1 << TIP_NOTIFY)
#define _TIP_HEAD (1 << TIP_HEAD)
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASM_THREAD_INFO_H */ #endif /* __ASM_THREAD_INFO_H */
...@@ -422,8 +422,8 @@ asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs) ...@@ -422,8 +422,8 @@ asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs)
* This is the end of the syscall path, so we may * This is the end of the syscall path, so we may
* safely assume a valid Linux task stack here. * safely assume a valid Linux task stack here.
*/ */
if (task->ipipe.flags & PF_MAYDAY) { if (ipipe_test_thread_flag(TIP_MAYDAY)) {
task->ipipe.flags &= ~PF_MAYDAY; ipipe_clear_thread_flag(TIP_MAYDAY);
__ipipe_notify_trap(IPIPE_TRAP_MAYDAY, regs); __ipipe_notify_trap(IPIPE_TRAP_MAYDAY, regs);
} }
...@@ -442,15 +442,19 @@ out: ...@@ -442,15 +442,19 @@ out:
void __ipipe_exit_irq(struct pt_regs *regs) void __ipipe_exit_irq(struct pt_regs *regs)
{ {
/*
* Testing for user_regs() eliminates foreign stack contexts,
* including from legacy domains which did not set the foreign
* stack bit (foreign stacks are always kernel-based).
*/
if (user_mode(regs) && if (user_mode(regs) &&
(current->ipipe.flags & PF_MAYDAY) != 0) { ipipe_test_thread_flag(TIP_MAYDAY)) {
/* /*
* Testing for user_regs() eliminates foreign stack * MAYDAY is never raised under normal circumstances,
* contexts, including from careless domains which did * so prefer test then maybe clear over
* not set the foreign stack bit (foreign stacks are * test_and_clear.
* always kernel-based).
*/ */
current->ipipe.flags &= ~PF_MAYDAY; ipipe_clear_thread_flag(TIP_MAYDAY);
__ipipe_notify_trap(IPIPE_TRAP_MAYDAY, regs); __ipipe_notify_trap(IPIPE_TRAP_MAYDAY, regs);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment