optional ipipe_safe_current
PATCH 1/1 optional ipipe_safe_current
Quoted 1 line
From my cleanup queue:
There is no need to check for IPIPE_NOSTACK_FLAG on archs which always provide safe access to current (like x86).
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
--- include/asm-x86/ipipe.h | 5 +++-- include/linux/ipipe.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-)
include/asm-x86/ipipe.h +3 -2
@@ -40,10 +40,11 @@ DECLARE_PER_CPU(struct pt_regs, __ipipe_#endif /* -* The logical processor id is read from the PDA, so this is always -* safe, regardless of the underlying stack. +* The logical processor id and the current Linux task are read from the PDA, +* so this is always safe, regardless of the underlying stack. */ #define ipipe_processor_id () raw_smp_processor_id() +#define ipipe_safe_current () current#define prepare_arch_switch (next) \ do { \
include/linux/ipipe.h +2 -0
@@ -443,6 +443,7 @@ static inline void ipipe_clear_foreign_s__clear_bit (IPIPE_NOSTACK_FLAG , &ipipe_cpudom_var (ipd, status)); } +#ifndef ipipe_safe_current#define ipipe_safe_current () \ ({ \ struct task_struct *p; \
@@ -450,6 +451,7 @@ static inline void ipipe_clear_foreign_s &ipipe_this_cpudom_var(status)) ? &init_task : current; \ p; \ }) +#endif ipipe_event_handler_t ipipe_catch_event(struct ipipe_domain *ipd, unsigned event,