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

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

cobalt/kernel: unify naming of extern data - cobalt_machine_cpudata

---

 include/cobalt/kernel/apc.h                         |    2 +-
 kernel/cobalt/apc.c                                 |    4 ++--
 kernel/cobalt/include/asm-generic/xenomai/machine.h |    4 ++--
 kernel/cobalt/init.c                                |    4 ++--
 kernel/cobalt/posix/process.c                       |    2 +-
 kernel/cobalt/procfs.c                              |    4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/cobalt/kernel/apc.h b/include/cobalt/kernel/apc.h
index b5d7962..1009c2d 100644
--- a/include/cobalt/kernel/apc.h
+++ b/include/cobalt/kernel/apc.h
@@ -35,7 +35,7 @@ void xnapc_free(int apc);
 
 static inline void __xnapc_schedule(int apc)
 {
-       unsigned long *p = 
&__this_cpu_ptr(&xnarch_percpu_machdata)->apc_pending;
+       unsigned long *p = 
&__this_cpu_ptr(&cobalt_machine_cpudata)->apc_pending;
 
        if (!__test_and_set_bit(apc, p))
                ipipe_post_irq_root(cobalt_pipeline.apc_virq);
diff --git a/kernel/cobalt/apc.c b/kernel/cobalt/apc.c
index c2589eb..3fb337a 100644
--- a/kernel/cobalt/apc.c
+++ b/kernel/cobalt/apc.c
@@ -58,13 +58,13 @@ void apc_dispatch(unsigned int virq, void *arg)
        spin_lock(&apc_lock);
 
        /* This is atomic linux context (non-threaded IRQ). */
-       p = &__this_cpu_ptr(&xnarch_percpu_machdata)->apc_pending;
+       p = &__this_cpu_ptr(&cobalt_machine_cpudata)->apc_pending;
        while (*p) {
                apc = ffnz(*p);
                clear_bit(apc, p);
                handler = cobalt_pipeline.apc_table[apc].handler;
                cookie = cobalt_pipeline.apc_table[apc].cookie;
-               __this_cpu_ptr(&xnarch_percpu_machdata)->apc_shots[apc]++;
+               __this_cpu_ptr(&cobalt_machine_cpudata)->apc_shots[apc]++;
                spin_unlock(&apc_lock);
                handler(cookie);
                spin_lock(&apc_lock);
diff --git a/kernel/cobalt/include/asm-generic/xenomai/machine.h 
b/kernel/cobalt/include/asm-generic/xenomai/machine.h
index 8922179..f0c0562 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/machine.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/machine.h
@@ -37,13 +37,13 @@ struct cobalt_machine {
 
 extern struct cobalt_machine cobalt_machine;
 
-struct xnarch_percpu_machdata {
+struct cobalt_machine_cpudata {
        unsigned long apc_pending;
        unsigned long apc_shots[BITS_PER_LONG];
        unsigned int faults[IPIPE_NR_FAULTS];
 };
 
-DECLARE_PER_CPU(struct xnarch_percpu_machdata, xnarch_percpu_machdata);
+DECLARE_PER_CPU(struct cobalt_machine_cpudata, cobalt_machine_cpudata);
 
 struct cobalt_pipeline {
        struct ipipe_domain domain;
diff --git a/kernel/cobalt/init.c b/kernel/cobalt/init.c
index 50d86bd..a060025 100644
--- a/kernel/cobalt/init.c
+++ b/kernel/cobalt/init.c
@@ -66,8 +66,8 @@ static BLOCKING_NOTIFIER_HEAD(state_notifier_list);
 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);
+struct cobalt_machine_cpudata cobalt_machine_cpudata;
+EXPORT_PER_CPU_SYMBOL_GPL(cobalt_machine_cpudata);
 
 atomic_t cobalt_runstate = ATOMIC_INIT(COBALT_STATE_WARMUP);
 EXPORT_SYMBOL_GPL(cobalt_runstate);
diff --git a/kernel/cobalt/posix/process.c b/kernel/cobalt/posix/process.c
index 8c59531..d53e34a 100644
--- a/kernel/cobalt/posix/process.c
+++ b/kernel/cobalt/posix/process.c
@@ -775,7 +775,7 @@ int ipipe_trap_hook(struct ipipe_trap_data *data)
         * No migration is possible on behalf of the head domain, so
         * the following access is safe.
         */
-       __this_cpu_ptr(&xnarch_percpu_machdata)->faults[data->exception]++;
+       __this_cpu_ptr(&cobalt_machine_cpudata)->faults[data->exception]++;
 
        if (handle_exception(data))
                return KEVENT_STOP;
diff --git a/kernel/cobalt/procfs.c b/kernel/cobalt/procfs.c
index defd108..345b0a9 100644
--- a/kernel/cobalt/procfs.c
+++ b/kernel/cobalt/procfs.c
@@ -155,7 +155,7 @@ static int faults_vfile_show(struct 
xnvfile_regular_iterator *it, void *data)
 
                for_each_realtime_cpu(cpu)
                        xnvfile_printf(it, "%12u",
-                                      per_cpu(xnarch_percpu_machdata, 
cpu).faults[trap]);
+                                      per_cpu(cobalt_machine_cpudata, 
cpu).faults[trap]);
 
                xnvfile_printf(it, "    (%s)",
                               cobalt_machine.fault_labels[trap]);
@@ -193,7 +193,7 @@ static int apc_vfile_show(struct xnvfile_regular_iterator 
*it, void *data)
 
                for_each_realtime_cpu(cpu)
                        xnvfile_printf(it, "%12lu",
-                                      per_cpu(xnarch_percpu_machdata, 
cpu).apc_shots[apc]);
+                                      per_cpu(cobalt_machine_cpudata, 
cpu).apc_shots[apc]);
 
                if (cobalt_pipeline.apc_table[apc].name)
                        xnvfile_printf(it, "    (%s)",


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

Reply via email to