Module: xenomai-2.6
Branch: master
Commit: 53c67533874456e4f338782e4f8bfcfa6ee90629
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=53c67533874456e4f338782e4f8bfcfa6ee90629

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Jan  6 18:05:19 2012 +0100

nucleus: drop pointless CPU synchronization upon shutdown

This code does not provide any valuable synchronization.

---

 include/asm-generic/bits/pod.h |   39 ---------------------------------------
 1 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/include/asm-generic/bits/pod.h b/include/asm-generic/bits/pod.h
index 99bd005..c2c9f31 100644
--- a/include/asm-generic/bits/pod.h
+++ b/include/asm-generic/bits/pod.h
@@ -174,47 +174,8 @@ static inline int xnarch_release_ipi (void)
                                IPIPE_PASS_MASK);
 }
 
-static struct semaphore xnarch_finalize_sync;
-
-static void xnarch_finalize_cpu(unsigned irq)
-{
-    up(&xnarch_finalize_sync);
-}
-
 static inline void xnarch_notify_halt(void)
 {
-    xnarch_cpumask_t other_cpus = cpu_online_map;
-    int cpu, nr_cpus = num_online_cpus();
-    unsigned long flags;
-
-    sema_init(&xnarch_finalize_sync,0);
-
-    /* Here rthal_current_domain is in fact root, since xnarch_notify_halt is
-       called from xnpod_shutdown, itself called from Linux
-       context. */
-
-    rthal_virtualize_irq(rthal_current_domain,
-                        RTHAL_SERVICE_IPI2,
-                        (rthal_irq_handler_t)xnarch_finalize_cpu,
-                        NULL,
-                        NULL,
-                        IPIPE_HANDLE_MASK);
-
-    rthal_local_irq_save_hw(flags);
-    cpu_clear(rthal_processor_id(), other_cpus);
-    rthal_send_ipi(RTHAL_SERVICE_IPI2, other_cpus);
-    rthal_local_irq_restore_hw(flags);
-
-    for(cpu=0; cpu < nr_cpus-1; ++cpu)
-       down(&xnarch_finalize_sync);
-
-    rthal_virtualize_irq(rthal_current_domain,
-                        RTHAL_SERVICE_IPI2,
-                        NULL,
-                        NULL,
-                        NULL,
-                        IPIPE_PASS_MASK);
-
     rthal_release_control();
 }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to