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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Jan  2 15:21:32 2012 +0100

hal: drop leftover from PREEMPT_RT support

Support for -rt kernels should be hidden deep into the interrupt
pipeline core, there is no point in exposing it in the Xenomai core.

Specifically, APCs will be rebuilt over the new ipipe_post_work_root()
service, which in turn will be made -rt aware in the future.

---

 kernel/cobalt/arch/generic/hal.c |   50 --------------------------------------
 1 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/kernel/cobalt/arch/generic/hal.c b/kernel/cobalt/arch/generic/hal.c
index c2807a2..a2474e8 100644
--- a/kernel/cobalt/arch/generic/hal.c
+++ b/kernel/cobalt/arch/generic/hal.c
@@ -95,56 +95,6 @@ static void rthal_apc_handler(unsigned virq, void *arg)
        spin_unlock(&rthal_apc_lock);
 }
 
-#ifdef CONFIG_PREEMPT_RT
-
-/*
- * On PREEMPT_RT, we need to invoke the apc handlers over a process
- * context, so that the latter can access non-atomic kernel services
- * properly. So the Adeos virq is only used to kick a per-CPU apc
- * server process which in turns runs the apc dispatcher. A bit
- * twisted, but indeed consistent with the threaded IRQ model of
- * PREEMPT_RT.
- */
-#include <linux/kthread.h>
-
-static struct task_struct *rthal_apc_servers[NR_CPUS];
-
-static int rthal_apc_thread(void *data)
-{
-       unsigned cpu = (unsigned)(unsigned long)data;
-
-       set_cpus_allowed(current, cpumask_of_cpu(cpu));
-       sigfillset(&current->blocked);
-       current->flags |= PF_NOFREEZE;
-       /* Use highest priority here, since some apc handlers might
-          require to run as soon as possible after the request has been
-          pended. */
-       ipipe_setscheduler_root(current, SCHED_FIFO, MAX_RT_PRIO - 1);
-
-       while (!kthread_should_stop()) {
-               set_current_state(TASK_INTERRUPTIBLE);
-               schedule();
-               rthal_apc_handler(0, NULL);
-       }
-
-       __set_current_state(TASK_RUNNING);
-
-       return 0;
-}
-
-void rthal_apc_kicker(unsigned virq, void *cookie)
-{
-       wake_up_process(rthal_apc_servers[smp_processor_id()]);
-}
-
-#define rthal_apc_trampoline rthal_apc_kicker
-
-#else /* !CONFIG_PREEMPT_RT */
-
-#define rthal_apc_trampoline rthal_apc_handler
-
-#endif /* CONFIG_PREEMPT_RT */
-
 /**
  * @fn int rthal_apc_alloc (const char *name,void (*handler)(void 
*cookie),void *cookie)
  *


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

Reply via email to