* [Adeos-main] [PATCH] optional ipipe_safe_current
@ 2008-02-08 10:33 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2008-02-08 10:33 UTC (permalink / raw)
To: Philippe Gerum; +Cc: adeos-main
[-- Attachment #1: Type: text/plain, Size: 234 bytes --]
>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
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
[-- Attachment #2: optional-ipipe_safe_current.patch --]
[-- Type: text/x-patch, Size: 1528 bytes --]
---
include/asm-x86/ipipe.h | 5 +++--
include/linux/ipipe.h | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
Index: linux-2.6.24-xeno_64/include/asm-x86/ipipe.h
===================================================================
--- linux-2.6.24-xeno_64.orig/include/asm-x86/ipipe.h
+++ linux-2.6.24-xeno_64/include/asm-x86/ipipe.h
@@ -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 { \
Index: linux-2.6.24-xeno_64/include/linux/ipipe.h
===================================================================
--- linux-2.6.24-xeno_64.orig/include/linux/ipipe.h
+++ linux-2.6.24-xeno_64/include/linux/ipipe.h
@@ -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,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-08 10:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 10:33 [Adeos-main] [PATCH] optional ipipe_safe_current Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.