Commit 4c0a897e authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

cobalt/kernel: ipipe: rename xnsched_realtime_domain to xnsched_primary_domain

This symbol is now I-pipe specific, stick to the I-pipe nomenclature
when referring to the high priority execution domain.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 5bc2967d
......@@ -12,7 +12,7 @@
#include <pipeline/machine.h>
#include <asm/xenomai/features.h>
#define xnsched_realtime_domain cobalt_pipeline.domain
#define xnsched_primary_domain cobalt_pipeline.domain
#define PIPELINE_NR_IRQS IPIPE_NR_IRQS
......
......@@ -30,7 +30,7 @@ int __init pipeline_init(void)
return ret;
}
ipipe_register_head(&xnsched_realtime_domain, "Xenomai");
ipipe_register_head(&xnsched_primary_domain, "Xenomai");
virq = ipipe_alloc_virq();
if (virq == 0)
......@@ -38,7 +38,7 @@ int __init pipeline_init(void)
cobalt_pipeline.escalate_virq = virq;
ipipe_request_irq(&xnsched_realtime_domain,
ipipe_request_irq(&xnsched_primary_domain,
cobalt_pipeline.escalate_virq,
(ipipe_irq_handler_t)__xnsched_run_handler,
NULL, NULL);
......@@ -50,11 +50,11 @@ int __init pipeline_init(void)
return 0;
fail_clock:
ipipe_free_irq(&xnsched_realtime_domain,
ipipe_free_irq(&xnsched_primary_domain,
cobalt_pipeline.escalate_virq);
ipipe_free_virq(cobalt_pipeline.escalate_virq);
fail_escalate:
ipipe_unregister_head(&xnsched_realtime_domain);
ipipe_unregister_head(&xnsched_primary_domain);
if (cobalt_machine.cleanup)
cobalt_machine.cleanup();
......@@ -72,8 +72,8 @@ int __init pipeline_late_init(void)
__init void pipeline_cleanup(void)
{
ipipe_unregister_head(&xnsched_realtime_domain);
ipipe_free_irq(&xnsched_realtime_domain,
ipipe_unregister_head(&xnsched_primary_domain);
ipipe_free_irq(&xnsched_primary_domain,
cobalt_pipeline.escalate_virq);
ipipe_free_virq(cobalt_pipeline.escalate_virq);
ipipe_timers_release();
......
......@@ -464,7 +464,7 @@ static inline bool cobalt_owns_irq(int irq)
{
ipipe_irq_handler_t h;
h = __ipipe_irq_handler(&xnsched_realtime_domain, irq);
h = __ipipe_irq_handler(&xnsched_primary_domain, irq);
return h == xnintr_vec_handler ||
h == xnintr_edge_vec_handler ||
......@@ -507,7 +507,7 @@ static inline int xnintr_irq_attach(struct xnintr *intr)
}
vec->unhandled = 0;
ret = ipipe_request_irq(&xnsched_realtime_domain,
ret = ipipe_request_irq(&xnsched_primary_domain,
intr->irq, handler, intr,
(ipipe_irq_ackfn_t)intr->iack);
if (ret)
......@@ -540,7 +540,7 @@ static inline void xnintr_irq_detach(struct xnintr *intr)
/* Release the IRQ line if this was the last user */
if (vec->handlers == NULL)
ipipe_free_irq(&xnsched_realtime_domain, intr->irq);
ipipe_free_irq(&xnsched_primary_domain, intr->irq);
return;
}
......@@ -564,7 +564,7 @@ static inline bool cobalt_owns_irq(int irq)
{
ipipe_irq_handler_t h;
h = __ipipe_irq_handler(&xnsched_realtime_domain, irq);
h = __ipipe_irq_handler(&xnsched_primary_domain, irq);
return h == xnintr_irq_handler;
}
......@@ -572,7 +572,7 @@ static inline bool cobalt_owns_irq(int irq)
static inline struct xnintr *xnintr_vec_first(unsigned int irq)
{
return cobalt_owns_irq(irq) ?
__ipipe_irq_cookie(&xnsched_realtime_domain, irq) : NULL;
__ipipe_irq_cookie(&xnsched_primary_domain, irq) : NULL;
}
static inline struct xnintr *xnintr_vec_next(struct xnintr *prev)
......@@ -582,7 +582,7 @@ static inline struct xnintr *xnintr_vec_next(struct xnintr *prev)
static inline int xnintr_irq_attach(struct xnintr *intr)
{
return ipipe_request_irq(&xnsched_realtime_domain,
return ipipe_request_irq(&xnsched_primary_domain,
intr->irq, xnintr_irq_handler, intr,
(ipipe_irq_ackfn_t)intr->iack);
}
......@@ -592,7 +592,7 @@ static inline void xnintr_irq_detach(struct xnintr *intr)
int irq = intr->irq;
xnlock_get(&vectors[irq].lock);
ipipe_free_irq(&xnsched_realtime_domain, irq);
ipipe_free_irq(&xnsched_primary_domain, irq);
xnlock_put(&vectors[irq].lock);
sync_stat_references(intr);
......@@ -630,7 +630,7 @@ static void xnintr_irq_handler(unsigned int irq, void *cookie)
* interrupt service routine, so the scheduler pointer will
* remain valid throughout this function.
*/
intr = __ipipe_irq_cookie(&xnsched_realtime_domain, irq);
intr = __ipipe_irq_cookie(&xnsched_primary_domain, irq);
if (unlikely(intr == NULL))
goto done;
#else
......@@ -1162,14 +1162,14 @@ static int irq_vfile_show(struct xnvfile_regular_iterator *it,
xnvfile_printf(it, " CPU%d", cpu);
for (irq = 0; irq < IPIPE_NR_IRQS; irq++) {
if (__ipipe_irq_handler(&xnsched_realtime_domain, irq) == NULL)
if (__ipipe_irq_handler(&xnsched_primary_domain, irq) == NULL)
continue;
xnvfile_printf(it, "\n%5d:", irq);
for_each_realtime_cpu(cpu) {
xnvfile_printf(it, "%12lu",
__ipipe_cpudata_irq_hits(&xnsched_realtime_domain, cpu,
__ipipe_cpudata_irq_hits(&xnsched_primary_domain, cpu,
irq));
}
......
......@@ -853,7 +853,7 @@ int pipeline_trap_kevents(void)
{
init_hostrt();
ipipe_set_hooks(ipipe_root_domain, IPIPE_SYSCALL|IPIPE_KEVENT);
ipipe_set_hooks(&xnsched_realtime_domain, IPIPE_SYSCALL|IPIPE_TRAP);
ipipe_set_hooks(&xnsched_primary_domain, IPIPE_SYSCALL|IPIPE_TRAP);
return 0;
}
......
......@@ -15,7 +15,7 @@ int ipipe_syscall_hook(struct ipipe_domain *ipd, struct pt_regs *regs)
if (unlikely(is_secondary_domain()))
return handle_root_syscall(regs);
return handle_head_syscall(ipd != &xnsched_realtime_domain, regs);
return handle_head_syscall(ipd != &xnsched_primary_domain, regs);
}
int ipipe_fastcall_hook(struct pt_regs *regs)
......
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