Module: xenomai-forge
Branch: master
Commit: 30c6de32e656b21fb252e222099539e7f8dec201
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=30c6de32e656b21fb252e222099539e7f8dec201

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Jul  6 17:09:20 2013 +0200

cobalt/shadow, blackfin: drop rescheduling check in head syscall handler

Only blackfin may have deferred rescheduling, which is already
performed via the arch-specific IRQ tail hook, prior to running the
Xenomai syscall handler. We don't have to duplicate this.

At this chance, Blackfin's deferred rescheduling hook is made private
to the machine support code.

---

 .../arch/blackfin/include/asm/xenomai/thread.h     |    8 --------
 kernel/cobalt/arch/blackfin/machine.c              |    9 +++++++--
 .../cobalt/include/asm-generic/xenomai/syscall.h   |    4 ----
 kernel/cobalt/pod.c                                |    6 ------
 kernel/cobalt/shadow.c                             |    2 --
 5 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h 
b/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
index 5bb6ae4..302675a 100644
--- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
+++ b/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
@@ -50,14 +50,6 @@ struct xnarchtcb {
 
 #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d))
 
-#define __xnarch_head_syscall_entry()                          \
-       do      {                                               \
-               if (xnsched_resched_p(xnpod_current_sched()))   \
-                       xnpod_schedule();                       \
-       } while(0)
-
-#define xnarch_head_syscall_entry      __xnarch_head_syscall_entry
-
 void xnarch_switch_to(struct xnarchtcb *out_tcb, struct xnarchtcb *in_tcb);
 
 int xnarch_escalate(void);
diff --git a/kernel/cobalt/arch/blackfin/machine.c 
b/kernel/cobalt/arch/blackfin/machine.c
index e48b8c4..ef279d6 100644
--- a/kernel/cobalt/arch/blackfin/machine.c
+++ b/kernel/cobalt/arch/blackfin/machine.c
@@ -18,6 +18,7 @@
  *   02111-1307, USA.
  */
 #include <linux/stddef.h>
+#include <cobalt/kernel/pod.h>
 #include <asm/xenomai/machine.h>
 
 static unsigned long mach_blackfin_calibrate(void)
@@ -25,11 +26,15 @@ static unsigned long mach_blackfin_calibrate(void)
        return 20;      /* 20 clock cycles */
 }
 
-void xnpod_schedule_deferred(void);
+static void schedule_deferred(void)
+{
+       if (xnpod_active_p())
+               xnpod_schedule();
+}
 
 static int mach_blackfin_init(void)
 {
-       __ipipe_irq_tail_hook = (unsigned long)xnpod_schedule_deferred;
+       __ipipe_irq_tail_hook = (unsigned long)schedule_deferred;
 
        return 0;
 }
diff --git a/kernel/cobalt/include/asm-generic/xenomai/syscall.h 
b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
index ba4a2a5..4f2b22d 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/syscall.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
@@ -122,8 +122,4 @@ static inline int __xn_safe_strncpy_from_user(char *dst,
        return __xn_strncpy_from_user(dst, src, count);
 }
 
-#ifndef xnarch_head_syscall_entry
-static inline void xnarch_head_syscall_entry(void) { }
-#endif
-
 #endif /* !_COBALT_ASM_GENERIC_SYSCALL_H */
diff --git a/kernel/cobalt/pod.c b/kernel/cobalt/pod.c
index 153bf8d..78f14c4 100644
--- a/kernel/cobalt/pod.c
+++ b/kernel/cobalt/pod.c
@@ -216,12 +216,6 @@ void __xnpod_schedule_handler(void) /* hw interrupts off. 
*/
        xnpod_schedule();
 }
 
-void xnpod_schedule_deferred(void)
-{
-       if (xnpod_active_p())
-               xnpod_schedule();
-}
-
 static void xnpod_flush_heap(struct xnheap *heap,
                             void *extaddr, unsigned long extsize, void *cookie)
 {
diff --git a/kernel/cobalt/shadow.c b/kernel/cobalt/shadow.c
index ca0d00f..c53d1a2 100644
--- a/kernel/cobalt/shadow.c
+++ b/kernel/cobalt/shadow.c
@@ -1869,8 +1869,6 @@ static int handle_head_syscall(struct ipipe_domain *ipd, 
struct pt_regs *regs)
        if (!xnpod_active_p())
                goto no_personality;
 
-       xnarch_head_syscall_entry();
-
        thread = xnshadow_current();
        if (thread)
                thread->regs = regs;


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

Reply via email to