Commit 7c8748e9 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

cobalt/clock: pipeline: make HOSTRT depend on IPIPE

This interface is pointless with Dovetail whose applications directly
refer to the wallclock time exported through the common vDSO.

No functional change is introduced.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 12fd3146
......@@ -25,21 +25,25 @@
#include <asm/processor.h>
#include <cobalt/uapi/kernel/vdso.h>
extern struct xnvdso *nkvdso;
/*
* Define the available feature set here. We have a single feature
* defined for now.
* defined for now, only in the I-pipe case.
*/
#ifdef CONFIG_XENO_OPT_HOSTRT
#define XNVDSO_FEATURES XNVDSO_FEAT_HOST_REALTIME
#else
#define XNVDSO_FEATURES 0
#endif /* CONFIG_XENO_OPT_HOSTRT */
#ifdef CONFIG_IPIPE_HAVE_HOSTRT
extern struct xnvdso *nkvdso;
#define XNVDSO_FEATURES XNVDSO_FEAT_HOST_REALTIME
static inline struct xnvdso_hostrt_data *get_hostrt_data(void)
{
return &nkvdso->hostrt_data;
}
#else
#define XNVDSO_FEATURES 0
#endif
#endif /* _COBALT_KERNEL_VDSO_H */
......@@ -210,10 +210,6 @@ config XENO_OPT_TIMER_RBTREE
endchoice
config XENO_OPT_HOSTRT
depends on IPIPE_HAVE_HOSTRT
def_bool y
config XENO_OPT_PIPE
bool
......
......@@ -378,7 +378,7 @@ void ipipe_migration_hook(struct task_struct *p) /* hw IRQs off */
xnsched_run();
}
#ifdef CONFIG_XENO_OPT_HOSTRT
#ifdef CONFIG_IPIPE_HAVE_HOSTRT
static IPIPE_DEFINE_SPINLOCK(__hostrtlock);
......@@ -418,7 +418,7 @@ static inline void init_hostrt(void)
nkvdso->hostrt_data.live = 0;
}
#else /* !CONFIG_XENO_OPT_HOSTRT */
#else /* !CONFIG_IPIPE_HAVE_HOSTRT */
struct ipipe_hostrt_data;
......@@ -429,7 +429,7 @@ static inline int handle_hostrt_event(struct ipipe_hostrt_data *hostrt)
static inline void init_hostrt(void) { }
#endif /* !CONFIG_XENO_OPT_HOSTRT */
#endif /* !CONFIG_IPIPE_HAVE_HOSTRT */
static void __handle_taskexit_event(struct task_struct *p)
{
......@@ -757,12 +757,14 @@ int ipipe_kevent_hook(int kevent, void *data)
case IPIPE_KEVT_CLEANUP:
ret = handle_cleanup_event(data);
break;
case IPIPE_KEVT_HOSTRT:
ret = handle_hostrt_event(data);
break;
case IPIPE_KEVT_SETAFFINITY:
ret = handle_setaffinity_event(data);
break;
#ifdef CONFIG_IPIPE_HAVE_HOSTRT
case IPIPE_KEVT_HOSTRT:
ret = handle_hostrt_event(data);
break;
#endif
#ifdef IPIPE_KEVT_CLOCKFREQ
case IPIPE_KEVT_CLOCKFREQ:
ret = handle_clockfreq_event(data);
......
......@@ -31,7 +31,7 @@ DECLARE_BITMAP(cobalt_clock_extids, COBALT_MAX_EXTCLOCKS);
static int do_clock_host_realtime(struct timespec *tp)
{
#ifdef CONFIG_XENO_OPT_HOSTRT
#ifdef CONFIG_IPIPE_HAVE_HOSTRT
struct xnvdso_hostrt_data *hostrt_data;
u64 now, base, mask, cycle_delta;
__u32 mult, shift;
......@@ -78,7 +78,7 @@ static int do_clock_host_realtime(struct timespec *tp)
tp->tv_nsec = rem;
return 0;
#else /* CONFIG_XENO_OPT_HOSTRT */
#else
return -EINVAL;
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment