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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Feb 17 11:19:38 2015 +0100

cobalt/kernel: unify naming of extern data - cobalt_pipeline

---

 include/cobalt/kernel/apc.h                        |    2 +-
 include/cobalt/kernel/sched.h                      |    4 +--
 kernel/cobalt/apc.c                                |   18 ++++++------
 kernel/cobalt/arch/arm/thread.c                    |    2 +-
 kernel/cobalt/arch/blackfin/thread.c               |    2 +-
 kernel/cobalt/arch/nios2/thread.c                  |    2 +-
 kernel/cobalt/arch/powerpc/thread.c                |    2 +-
 kernel/cobalt/arch/sh/thread.c                     |    2 +-
 kernel/cobalt/arch/x86/machine.c                   |    2 +-
 kernel/cobalt/arch/x86/thread.c                    |    2 +-
 .../cobalt/include/asm-generic/xenomai/machine.h   |    4 +--
 kernel/cobalt/init.c                               |   30 ++++++++++----------
 kernel/cobalt/posix/syscall.c                      |    2 +-
 kernel/cobalt/procfs.c                             |    6 ++--
 14 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/include/cobalt/kernel/apc.h b/include/cobalt/kernel/apc.h
index 3cde7f3..b5d7962 100644
--- a/include/cobalt/kernel/apc.h
+++ b/include/cobalt/kernel/apc.h
@@ -38,7 +38,7 @@ static inline void __xnapc_schedule(int apc)
        unsigned long *p = 
&__this_cpu_ptr(&xnarch_percpu_machdata)->apc_pending;
 
        if (!__test_and_set_bit(apc, p))
-               ipipe_post_irq_root(xnarch_machdata.apc_virq);
+               ipipe_post_irq_root(cobalt_pipeline.apc_virq);
 }
 
 /**
diff --git a/include/cobalt/kernel/sched.h b/include/cobalt/kernel/sched.h
index 43c5e72..286db0f 100644
--- a/include/cobalt/kernel/sched.h
+++ b/include/cobalt/kernel/sched.h
@@ -210,7 +210,7 @@ static inline void xnsched_set_self_resched(struct xnsched 
*sched)
        sched->status |= XNRESCHED;
 }
 
-#define xnsched_realtime_domain  xnarch_machdata.domain
+#define xnsched_realtime_domain  cobalt_pipeline.domain
 
 /* Set resched flag for the given scheduler. */
 #ifdef CONFIG_SMP
@@ -228,7 +228,7 @@ static inline void xnsched_set_resched(struct xnsched 
*sched)
        }
 }
 
-#define xnsched_realtime_cpus    xnarch_machdata.supported_cpus
+#define xnsched_realtime_cpus    cobalt_pipeline.supported_cpus
 
 static inline int xnsched_supported_cpu(int cpu)
 {
diff --git a/kernel/cobalt/apc.c b/kernel/cobalt/apc.c
index a3714da..c2589eb 100644
--- a/kernel/cobalt/apc.c
+++ b/kernel/cobalt/apc.c
@@ -62,8 +62,8 @@ void apc_dispatch(unsigned int virq, void *arg)
        while (*p) {
                apc = ffnz(*p);
                clear_bit(apc, p);
-               handler = xnarch_machdata.apc_table[apc].handler;
-               cookie = xnarch_machdata.apc_table[apc].cookie;
+               handler = cobalt_pipeline.apc_table[apc].handler;
+               cookie = cobalt_pipeline.apc_table[apc].cookie;
                __this_cpu_ptr(&xnarch_percpu_machdata)->apc_shots[apc]++;
                spin_unlock(&apc_lock);
                handler(cookie);
@@ -120,16 +120,16 @@ int xnapc_alloc(const char *name,
 
        spin_lock_irqsave(&apc_lock, flags);
 
-       if (xnarch_machdata.apc_map == ~0) {
+       if (cobalt_pipeline.apc_map == ~0) {
                apc = -EBUSY;
                goto out;
        }
 
-       apc = ffz(xnarch_machdata.apc_map);
-       __set_bit(apc, &xnarch_machdata.apc_map);
-       xnarch_machdata.apc_table[apc].handler = handler;
-       xnarch_machdata.apc_table[apc].cookie = cookie;
-       xnarch_machdata.apc_table[apc].name = name;
+       apc = ffz(cobalt_pipeline.apc_map);
+       __set_bit(apc, &cobalt_pipeline.apc_map);
+       cobalt_pipeline.apc_table[apc].handler = handler;
+       cobalt_pipeline.apc_table[apc].cookie = cookie;
+       cobalt_pipeline.apc_table[apc].name = name;
 out:
        spin_unlock_irqrestore(&apc_lock, flags);
 
@@ -152,7 +152,7 @@ EXPORT_SYMBOL_GPL(xnapc_alloc);
 void xnapc_free(int apc)
 {
        BUG_ON(apc < 0 || apc >= BITS_PER_LONG);
-       clear_bit(apc, &xnarch_machdata.apc_map);
+       clear_bit(apc, &cobalt_pipeline.apc_map);
        smp_mb__after_atomic();
 }
 EXPORT_SYMBOL_GPL(xnapc_free);
diff --git a/kernel/cobalt/arch/arm/thread.c b/kernel/cobalt/arch/arm/thread.c
index f3e0874..13d2176 100644
--- a/kernel/cobalt/arch/arm/thread.c
+++ b/kernel/cobalt/arch/arm/thread.c
@@ -342,7 +342,7 @@ void xnarch_switch_to(struct xnthread *out, struct xnthread 
*in)
 int xnarch_escalate(void)
 {
        if (ipipe_root_p) {
-               ipipe_raise_irq(xnarch_machdata.escalate_virq);
+               ipipe_raise_irq(cobalt_pipeline.escalate_virq);
                return 1;
        }
 
diff --git a/kernel/cobalt/arch/blackfin/thread.c 
b/kernel/cobalt/arch/blackfin/thread.c
index e0c5d54..d4cda91 100644
--- a/kernel/cobalt/arch/blackfin/thread.c
+++ b/kernel/cobalt/arch/blackfin/thread.c
@@ -95,7 +95,7 @@ int xnarch_escalate(void)
        }
 
        if (ipipe_root_p) {
-               ipipe_raise_irq(xnarch_machdata.escalate_virq);
+               ipipe_raise_irq(cobalt_pipeline.escalate_virq);
                __ipipe_unlock_root();
                return 1;
        }
diff --git a/kernel/cobalt/arch/nios2/thread.c 
b/kernel/cobalt/arch/nios2/thread.c
index 2aed7db..fe5d683 100644
--- a/kernel/cobalt/arch/nios2/thread.c
+++ b/kernel/cobalt/arch/nios2/thread.c
@@ -59,7 +59,7 @@ void xnarch_switch_to(struct xnthread *out, struct xnthread 
*in)
 int xnarch_escalate(void)
 {
        if (ipipe_root_p) {
-               ipipe_raise_irq(xnarch_machdata.escalate_virq);
+               ipipe_raise_irq(cobalt_pipeline.escalate_virq);
                return 1;
        }
 
diff --git a/kernel/cobalt/arch/powerpc/thread.c 
b/kernel/cobalt/arch/powerpc/thread.c
index 3dae95a..c5b9a18 100644
--- a/kernel/cobalt/arch/powerpc/thread.c
+++ b/kernel/cobalt/arch/powerpc/thread.c
@@ -197,7 +197,7 @@ void xnarch_leave_root(struct xnthread *root)
 int xnarch_escalate(void)
 {
        if (ipipe_root_p) {
-               ipipe_raise_irq(xnarch_machdata.escalate_virq);
+               ipipe_raise_irq(cobalt_pipeline.escalate_virq);
                return 1;
        }
 
diff --git a/kernel/cobalt/arch/sh/thread.c b/kernel/cobalt/arch/sh/thread.c
index 782dd51..7d7bb51 100644
--- a/kernel/cobalt/arch/sh/thread.c
+++ b/kernel/cobalt/arch/sh/thread.c
@@ -301,7 +301,7 @@ void xnarch_leave_root(struct xnthread *root)
 int xnarch_escalate(void)
 {
        if (ipipe_root_p) {
-               ipipe_raise_irq(xnarch_machdata.escalate_virq);
+               ipipe_raise_irq(cobalt_pipeline.escalate_virq);
                return 1;
        }
 
diff --git a/kernel/cobalt/arch/x86/machine.c b/kernel/cobalt/arch/x86/machine.c
index 630f308..67a3729 100644
--- a/kernel/cobalt/arch/x86/machine.c
+++ b/kernel/cobalt/arch/x86/machine.c
@@ -111,7 +111,7 @@ EXPORT_SYMBOL_GPL(strncpy_from_user_nocheck);
 
 static unsigned long mach_x86_calibrate(void)
 {
-       unsigned long delay = (xnarch_machdata.timer_freq + HZ / 2) / HZ;
+       unsigned long delay = (cobalt_pipeline.timer_freq + HZ / 2) / HZ;
        unsigned long long t0, t1, dt;
        unsigned long flags;
        int i;
diff --git a/kernel/cobalt/arch/x86/thread.c b/kernel/cobalt/arch/x86/thread.c
index 9956d44..1b73b0d 100644
--- a/kernel/cobalt/arch/x86/thread.c
+++ b/kernel/cobalt/arch/x86/thread.c
@@ -423,7 +423,7 @@ void xnarch_init_shadow_tcb(struct xnthread *thread)
 int xnarch_escalate(void)
 {
        if (ipipe_root_p) {
-               ipipe_raise_irq(xnarch_machdata.escalate_virq);
+               ipipe_raise_irq(cobalt_pipeline.escalate_virq);
                return 1;
        }
 
diff --git a/kernel/cobalt/include/asm-generic/xenomai/machine.h 
b/kernel/cobalt/include/asm-generic/xenomai/machine.h
index 48b96ed..8922179 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/machine.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/machine.h
@@ -45,7 +45,7 @@ struct xnarch_percpu_machdata {
 
 DECLARE_PER_CPU(struct xnarch_percpu_machdata, xnarch_percpu_machdata);
 
-struct xnarch_machdata {
+struct cobalt_pipeline {
        struct ipipe_domain domain;
        unsigned long timer_freq;
        unsigned long clock_freq;
@@ -62,7 +62,7 @@ struct xnarch_machdata {
 #endif
 };
 
-extern struct xnarch_machdata xnarch_machdata;
+extern struct cobalt_pipeline cobalt_pipeline;
 
 static inline unsigned long xnarch_timer_calibrate(void)
 {
diff --git a/kernel/cobalt/init.c b/kernel/cobalt/init.c
index a51c28a..50d86bd 100644
--- a/kernel/cobalt/init.c
+++ b/kernel/cobalt/init.c
@@ -63,8 +63,8 @@ module_param_named(sysheap_size, sysheap_size_arg, ulong, 
0444);
 
 static BLOCKING_NOTIFIER_HEAD(state_notifier_list);
 
-struct xnarch_machdata xnarch_machdata;
-EXPORT_SYMBOL_GPL(xnarch_machdata);
+struct cobalt_pipeline cobalt_pipeline;
+EXPORT_SYMBOL_GPL(cobalt_pipeline);
 
 struct xnarch_percpu_machdata xnarch_percpu_machdata;
 EXPORT_PER_CPU_SYMBOL_GPL(xnarch_percpu_machdata);
@@ -179,8 +179,8 @@ static int __init mach_setup(void)
                return -ENODEV;
        }
 
-       xnarch_machdata.timer_freq = timerfreq_arg;
-       xnarch_machdata.clock_freq = clockfreq_arg;
+       cobalt_pipeline.timer_freq = timerfreq_arg;
+       cobalt_pipeline.clock_freq = clockfreq_arg;
 
        if (cobalt_machine.init) {
                ret = cobalt_machine.init();
@@ -195,10 +195,10 @@ static int __init mach_setup(void)
        if (virq == 0)
                goto fail_apc;
 
-       xnarch_machdata.apc_virq = virq;
+       cobalt_pipeline.apc_virq = virq;
 
        ipipe_request_irq(ipipe_root_domain,
-                         xnarch_machdata.apc_virq,
+                         cobalt_pipeline.apc_virq,
                          apc_dispatch,
                          NULL, NULL);
 
@@ -206,14 +206,14 @@ static int __init mach_setup(void)
        if (virq == 0)
                goto fail_escalate;
 
-       xnarch_machdata.escalate_virq = virq;
+       cobalt_pipeline.escalate_virq = virq;
 
        ipipe_request_irq(&xnsched_realtime_domain,
-                         xnarch_machdata.escalate_virq,
+                         cobalt_pipeline.escalate_virq,
                          (ipipe_irq_handler_t)__xnsched_run_handler,
                          NULL, NULL);
 
-       ret = xnclock_init(xnarch_machdata.clock_freq);
+       ret = xnclock_init(cobalt_pipeline.clock_freq);
        if (ret)
                goto fail_clock;
 
@@ -221,12 +221,12 @@ static int __init mach_setup(void)
 
 fail_clock:
        ipipe_free_irq(&xnsched_realtime_domain,
-                      xnarch_machdata.escalate_virq);
-       ipipe_free_virq(xnarch_machdata.escalate_virq);
+                      cobalt_pipeline.escalate_virq);
+       ipipe_free_virq(cobalt_pipeline.escalate_virq);
 fail_escalate:
        ipipe_free_irq(ipipe_root_domain,
-                      xnarch_machdata.apc_virq);
-       ipipe_free_virq(xnarch_machdata.apc_virq);
+                      cobalt_pipeline.apc_virq);
+       ipipe_free_virq(cobalt_pipeline.apc_virq);
 fail_apc:
        ipipe_unregister_head(&xnsched_realtime_domain);
 
@@ -240,8 +240,8 @@ static __init void mach_cleanup(void)
 {
        ipipe_unregister_head(&xnsched_realtime_domain);
        ipipe_free_irq(&xnsched_realtime_domain,
-                      xnarch_machdata.escalate_virq);
-       ipipe_free_virq(xnarch_machdata.escalate_virq);
+                      cobalt_pipeline.escalate_virq);
+       ipipe_free_virq(cobalt_pipeline.escalate_virq);
        ipipe_timers_release();
        xnclock_cleanup();
 }
diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c
index b40e584..34b9ddd 100644
--- a/kernel/cobalt/posix/syscall.c
+++ b/kernel/cobalt/posix/syscall.c
@@ -332,7 +332,7 @@ static COBALT_SYSCALL(bind, lostage,
        f->feat_abirev = XENOMAI_ABI_REV;
        collect_arch_features(f);
 
-       f->clock_freq = xnarch_machdata.clock_freq;
+       f->clock_freq = cobalt_pipeline.clock_freq;
        f->vdso_offset = cobalt_umm_offset(&cobalt_ppd_get(1)->umm, nkvdso);
 
        if (__xn_safe_copy_to_user(u_breq, &breq, sizeof(breq)))
diff --git a/kernel/cobalt/procfs.c b/kernel/cobalt/procfs.c
index f7df040..defd108 100644
--- a/kernel/cobalt/procfs.c
+++ b/kernel/cobalt/procfs.c
@@ -186,7 +186,7 @@ static int apc_vfile_show(struct xnvfile_regular_iterator 
*it, void *data)
                xnvfile_printf(it, "         CPU%d", cpu);
 
        for (apc = 0; apc < BITS_PER_LONG; apc++) {
-               if (!test_bit(apc, &xnarch_machdata.apc_map))
+               if (!test_bit(apc, &cobalt_pipeline.apc_map))
                        continue; /* Not hooked. */
 
                xnvfile_printf(it, "\n%3d: ", apc);
@@ -195,9 +195,9 @@ static int apc_vfile_show(struct xnvfile_regular_iterator 
*it, void *data)
                        xnvfile_printf(it, "%12lu",
                                       per_cpu(xnarch_percpu_machdata, 
cpu).apc_shots[apc]);
 
-               if (xnarch_machdata.apc_table[apc].name)
+               if (cobalt_pipeline.apc_table[apc].name)
                        xnvfile_printf(it, "    (%s)",
-                                      xnarch_machdata.apc_table[apc].name);
+                                      cobalt_pipeline.apc_table[apc].name);
        }
 
        xnvfile_putc(it, '\n');


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to