From: Jan Kiszka <jan.kiszka@domain.hid>
To: Philippe Gerum <rpm@xenomai.org>
Cc: adeos-main <adeos-main@gna.org>
Subject: [Adeos-main] [PATCH] optional ipipe_safe_current
Date: Fri, 08 Feb 2008 11:33:54 +0100 [thread overview]
Message-ID: <47AC3012.6050404@domain.hid> (raw)
[-- 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,
reply other threads:[~2008-02-08 10:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47AC3012.6050404@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=adeos-main@gna.org \
--cc=rpm@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.