Module: xenomai-2.6 Branch: master Commit: a3adba19b3f532c69f5edcadd5af31e8621c32c8 URL: http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=a3adba19b3f532c69f5edcadd5af31e8621c32c8
Author: Jan Kiszka <[email protected]> Date: Thu Sep 2 13:47:45 2010 +0200 x86: Fire root preemption notifier This allows the use KVM aside Xenomai user space tasks on x86 targets. Signed-off-by: Jan Kiszka <[email protected]> --- include/asm-generic/hal.h | 5 +++++ include/asm-x86/bits/pod_32.h | 2 ++ include/asm-x86/bits/pod_64.h | 2 ++ 3 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/asm-generic/hal.h b/include/asm-generic/hal.h index 24b78f8..0318988 100644 --- a/include/asm-generic/hal.h +++ b/include/asm-generic/hal.h @@ -190,6 +190,11 @@ typedef spinlock_t rthal_spinlock_t; #define rthal_setsched_root(t,pol,prio) ipipe_setscheduler_root(t,pol,prio) #define rthal_reenter_root(t,pol,prio) ipipe_reenter_root(t,pol,prio) #define rthal_read_tsc(v) ipipe_read_tsc(v) +#ifdef __IPIPE_FEATURE_ROOTPREEMPT_NOTIFIER +#define rthal_root_preempt_notify() ipipe_root_preempt_notify() +#else /* !__IPIPE_FEATURE_ROOTPREEMPT_NOTIFIER */ +#define rthal_root_preempt_notify() do { } while (0) +#endif /* !__IPIPE_FEATURE_ROOTPREEMPT_NOTIFIER */ #define rthal_emergency_console() \ do { \ diff --git a/include/asm-x86/bits/pod_32.h b/include/asm-x86/bits/pod_32.h index b23b6f2..500d4a5 100644 --- a/include/asm-x86/bits/pod_32.h +++ b/include/asm-x86/bits/pod_32.h @@ -42,6 +42,8 @@ void xnpod_delete_thread(struct xnthread *); static inline void xnarch_leave_root(xnarchtcb_t * rootcb) { + rthal_root_preempt_notify(); + /* Remember the preempted Linux task pointer. */ rootcb->user_task = rootcb->active_task = current; rootcb->ts_usedfpu = wrap_test_fpu_used(current) != 0; diff --git a/include/asm-x86/bits/pod_64.h b/include/asm-x86/bits/pod_64.h index 88e049d..46bd380 100644 --- a/include/asm-x86/bits/pod_64.h +++ b/include/asm-x86/bits/pod_64.h @@ -41,6 +41,8 @@ void xnpod_delete_thread(struct xnthread *); static inline void xnarch_leave_root(xnarchtcb_t *rootcb) { + rthal_root_preempt_notify(); + /* Remember the preempted Linux task pointer. */ rootcb->user_task = rootcb->active_task = current; rootcb->rspp = ¤t->thread.x86reg_sp; _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
