[Xenomai-git] Philippe Gerum : cobalt/x86: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: a55a763e3dd04f031018b7bcb7e54af214532e23
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=a55a763e3dd04f031018b7bcb7e54af214532e23

Author: Philippe Gerum 
Date:   Sun Feb 16 16:54:08 2014 +0100

cobalt/x86: upgrade I-pipe support

---

 .../x86/patches/ipipe-core-3.10.18-x86-1.patch |14738 
 1 file changed, 14738 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=a55a763e3dd04f031018b7bcb7e54af214532e23

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


[Xenomai-git] Philippe Gerum : cobalt/sched: fix non-SMP build

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 5ce1e1c69f81a004a78d1208c9aecef74d0cf493
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=5ce1e1c69f81a004a78d1208c9aecef74d0cf493

Author: Philippe Gerum 
Date:   Sun Feb 16 17:33:53 2014 +0100

cobalt/sched: fix non-SMP build

---

 include/cobalt/kernel/sched.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/kernel/sched.h b/include/cobalt/kernel/sched.h
index d96eef0..f4a47f9 100644
--- a/include/cobalt/kernel/sched.h
+++ b/include/cobalt/kernel/sched.h
@@ -209,6 +209,8 @@ static inline void xnsched_set_self_resched(struct xnsched 
*sched)
sched->status |= XNRESCHED;
 }
 
+#define xnsched_realtime_domain  xnarch_machdata.domain
+
 /* Set resched flag for the given scheduler. */
 #ifdef CONFIG_SMP
 
@@ -226,7 +228,6 @@ static inline void xnsched_set_resched(struct xnsched 
*sched)
 }
 
 #define xnsched_realtime_cpusxnarch_machdata.supported_cpus
-#define xnsched_realtime_domain  xnarch_machdata.domain
 
 static inline int xnsched_supported_cpu(int cpu)
 {


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


[Xenomai-git] Philippe Gerum : cobalt: require kernel version >= 3.10

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 6e78e8462746a0efaa05dbf5839e97fc40e1309b
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6e78e8462746a0efaa05dbf5839e97fc40e1309b

Author: Philippe Gerum 
Date:   Sun Feb 16 17:03:19 2014 +0100

cobalt: require kernel version >= 3.10

---

 .../cobalt/include/asm-generic/xenomai/wrappers.h  |   62 
 1 file changed, 12 insertions(+), 50 deletions(-)

diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h 
b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
index 601fc30..b357545 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
@@ -23,65 +23,27 @@
 #endif
 
 #include 
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#error "Xenomai/cobalt requires Linux kernel 3.10 or above"
+#endif
+
+#ifdef CONFIG_IPIPE_LEGACY
+#error "CONFIG_IPIPE_LEGACY must be switched off"
+#endif
+
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
-
-#ifdef CONFIG_IPIPE_LEGACY
-#error "CONFIG_IPIPE_LEGACY must be switched off"
-#endif
-
 #include 
+#include 
+
 #ifndef pgprot_noncached
 #define pgprot_noncached(p) (p)
 #endif /* !pgprot_noncached */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
-
-#include 
-
-#ifndef cpu_online_map
-#define cpu_online_mask (&cpu_online_map)
-#endif
-
-static inline
-unsigned long vm_mmap(struct file *file, unsigned long addr,
-   unsigned long len, unsigned long prot,
-   unsigned long flag, unsigned long offset)
-{
-   struct mm_struct *mm = current->mm;
-   unsigned long ret;
-
-   down_write(&mm->mmap_sem);
-   ret = do_mmap(file, addr, len, prot, flag, offset);
-   up_write(&mm->mmap_sem);
-
-   return ret;
-}
-
-#endif /* LINUX_VERSION_CODE < 3.4.0 */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
-#define KGIDT_INIT(pid) (pid)
-#endif /* LINUX < 3.8.0 */
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-#include 
-#endif /* LINUX >= 3.9.0 */
  
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-#include 
-
-#define PDE_DATA(inode)PROC_I(inode)->pde->data
-
-static inline void proc_remove(struct proc_dir_entry *pde)
-{
-   remove_proc_entry(pde->name, pde->parent);
-}
-#endif /* < 3.10 */
-
 #endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */


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


[Xenomai-git] Philippe Gerum : cobalt/sched: fix non-SMP build

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 89603393865dca1608fdd73fefb02dc3a9f3c2bd
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=89603393865dca1608fdd73fefb02dc3a9f3c2bd

Author: Philippe Gerum 
Date:   Sun Feb 16 17:33:53 2014 +0100

cobalt/sched: fix non-SMP build

---

 include/cobalt/kernel/sched.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/kernel/sched.h b/include/cobalt/kernel/sched.h
index d96eef0..f4a47f9 100644
--- a/include/cobalt/kernel/sched.h
+++ b/include/cobalt/kernel/sched.h
@@ -209,6 +209,8 @@ static inline void xnsched_set_self_resched(struct xnsched 
*sched)
sched->status |= XNRESCHED;
 }
 
+#define xnsched_realtime_domain  xnarch_machdata.domain
+
 /* Set resched flag for the given scheduler. */
 #ifdef CONFIG_SMP
 
@@ -226,7 +228,6 @@ static inline void xnsched_set_resched(struct xnsched 
*sched)
 }
 
 #define xnsched_realtime_cpusxnarch_machdata.supported_cpus
-#define xnsched_realtime_domain  xnarch_machdata.domain
 
 static inline int xnsched_supported_cpu(int cpu)
 {


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


[Xenomai-git] Philippe Gerum : alchemy: export objects to registry (WIP)

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 5a96f8f15d1cdc7627e3f9bd678bccdcdc2d2758
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=5a96f8f15d1cdc7627e3f9bd678bccdcdc2d2758

Author: Philippe Gerum 
Date:   Fri Jan 31 17:40:20 2014 +0100

alchemy: export objects to registry (WIP)

---

 lib/alchemy/alarm.c  |   60 +++
 lib/alchemy/alarm.h  |3 ++
 lib/alchemy/buffer.c |  107 
 lib/alchemy/buffer.h |2 +
 lib/alchemy/cond.c   |   32 ++-
 lib/alchemy/cond.h   |2 +
 lib/alchemy/event.c  |   51 ++-
 lib/alchemy/event.h  |2 +
 lib/alchemy/heap.c   |  110 +-
 lib/alchemy/heap.h   |2 +
 lib/alchemy/init.c   |   11 +
 lib/alchemy/mutex.c  |   32 ++-
 lib/alchemy/mutex.h  |2 +
 lib/alchemy/queue.c  |   97 +++-
 lib/alchemy/queue.h  |2 +
 lib/alchemy/sem.c|   33 ++-
 lib/alchemy/sem.h|2 +
 lib/alchemy/task.c   |   47 +
 lib/alchemy/task.h   |2 +
 19 files changed, 591 insertions(+), 8 deletions(-)

diff --git a/lib/alchemy/alarm.c b/lib/alchemy/alarm.c
index e622ea4..fed8df1 100644
--- a/lib/alchemy/alarm.c
+++ b/lib/alchemy/alarm.c
@@ -42,6 +42,54 @@ struct pvcluster alchemy_alarm_table;
 static DEFINE_NAME_GENERATOR(alarm_namegen, "alarm",
 struct alchemy_alarm, name);
 
+#ifdef CONFIG_XENO_REGISTRY
+
+static int alarm_registry_open(struct fsobj *fsobj, void *priv)
+{
+   struct fsobstack *o = priv;
+   struct alchemy_alarm *acb;
+   struct itimerspec itmspec;
+   unsigned long expiries;
+   struct timespec delta;
+   int ret;
+
+   fsobstack_init(o);
+
+   acb = container_of(fsobj, struct alchemy_alarm, fsobj);
+   ret = timerobj_lock(&acb->tmobj);
+   if (ret)
+   return ret;
+   itmspec = acb->itmspec;
+   expiries = acb->expiries;
+   timerobj_unlock(&acb->tmobj);
+
+   fsobstack_grow_format(o, "%-12s%-12s%-12s\n",
+ "[EXPIRIES]", "[DISTANCE]", "[INTERVAL]");
+   clockobj_get_distance(&alchemy_clock, &itmspec, &delta);
+   fsobstack_grow_format(o, "%8lu%10ld\"%ld%10ld\"%ld\n",
+ expiries,
+ delta.tv_sec,
+ delta.tv_nsec / 1,
+ itmspec.it_interval.tv_sec,
+ itmspec.it_interval.tv_nsec / 1);
+
+   fsobstack_finish(o);
+
+   return 0;
+}
+
+static struct registry_operations registry_ops = {
+   .open   = alarm_registry_open,
+   .release= fsobj_obstack_release,
+   .read   = fsobj_obstack_read
+};
+
+#else /* !CONFIG_XENO_REGISTRY */
+
+static struct registry_operations registry_ops;
+
+#endif /* CONFIG_XENO_REGISTRY */
+
 static struct alchemy_alarm *get_alchemy_alarm(RT_ALARM *alarm, int *err_r)
 {
struct alchemy_alarm *acb;
@@ -140,6 +188,7 @@ int rt_alarm_create(RT_ALARM *alarm, const char *name,
acb->handler = handler;
acb->arg = arg;
acb->expiries = 0;
+   memset(&acb->itmspec, 0, sizeof(acb->itmspec));
acb->magic = alarm_magic;
alarm->handle = (uintptr_t)acb;
 
@@ -149,6 +198,14 @@ int rt_alarm_create(RT_ALARM *alarm, const char *name,
goto fail;
}
 
+   registry_init_file_obstack(&acb->fsobj, ®istry_ops);
+   ret = __bt(registry_add_file(&acb->fsobj, O_RDONLY,
+"/alchemy/alarms/%s",
+acb->name));
+   if (ret)
+   warning("failed to export alarm %s to registry",
+   acb->name);
+
CANCEL_RESTORE(svc);
 
return 0;
@@ -196,6 +253,7 @@ int rt_alarm_delete(RT_ALARM *alarm)
timerobj_destroy(&acb->tmobj);
pvcluster_delobj(&alchemy_alarm_table, &acb->cobj);
acb->magic = ~alarm_magic;
+   registry_destroy_file(&acb->fsobj);
pvfree(acb);
 out:
CANCEL_RESTORE(svc);
@@ -255,6 +313,7 @@ int rt_alarm_start(RT_ALARM *alarm,
 
clockobj_ticks_to_timeout(&alchemy_clock, value, &it.it_value);
clockobj_ticks_to_timespec(&alchemy_clock, interval, &it.it_interval);
+   acb->itmspec = it;
ret = timerobj_start(&acb->tmobj, alarm_handler, &it);
 out:
CANCEL_RESTORE(svc);
@@ -289,6 +348,7 @@ int rt_alarm_stop(RT_ALARM *alarm)
if (acb == NULL)
goto out;
 
+   memset(&acb->itmspec, 0, sizeof(acb->itmspec));
ret = timerobj_stop(&acb->tmobj);
 out:
CANCEL_RESTORE(svc);
diff --git a/lib/alchemy/alarm.h b/lib/alchemy/alarm.h
index 58adefa..2abd5ce 100644
--- a/lib/alchemy/alarm.h
+++ b/lib/alchemy/alarm.h
@@ -19,6 +19,7 @@
 #ifndef _ALCHEMY_ALARM_H
 #define _ALCHEMY_ALARM_H
 
+#include 
 #includ

[Xenomai-git] Philippe Gerum : cobalt/blackfin: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 8cd47f6d19b6c425e3afdf90dd541badbf6a3eb9
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8cd47f6d19b6c425e3afdf90dd541badbf6a3eb9

Author: Philippe Gerum 
Date:   Sun Feb 16 16:54:44 2014 +0100

cobalt/blackfin: upgrade I-pipe support

---

 .../patches/ipipe-core-3.10.18-blackfin-1.patch|11039 
 1 file changed, 11039 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=8cd47f6d19b6c425e3afdf90dd541badbf6a3eb9

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


[Xenomai-git] Jan Kiszka : lib/cobalt: Flush print buffer on fclose

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: b0a867efad33ddeaeb7d1daa4b98defc039f6da1
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b0a867efad33ddeaeb7d1daa4b98defc039f6da1

Author: Jan Kiszka 
Date:   Wed Feb 12 18:48:58 2014 +0100

lib/cobalt: Flush print buffer on fclose

As we keep a reference to the stream that was written to via fwrite &
Co., we need to flush our buffers before closing streams. Otherwise, we
risk that print_buffers crashes while trying to use a stale FILE object.

Signed-off-by: Jan Kiszka 

---

 include/cobalt/stdio.h |2 ++
 lib/cobalt/cobalt.wrappers |1 +
 lib/cobalt/printf.c|6 ++
 lib/cobalt/wrappers.c  |6 ++
 4 files changed, 15 insertions(+)

diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h
index d2c2e43..b7407fd 100644
--- a/include/cobalt/stdio.h
+++ b/include/cobalt/stdio.h
@@ -82,6 +82,8 @@ int __wrap_putchar(int c);
 COBALT_DECL(size_t,
fwrite(const void *ptr, size_t sz, size_t nmemb, FILE *stream));
 
+COBALT_DECL(int, fclose(FILE *stream));
+
 int rt_vfprintf(FILE *stream, const char *format, va_list args);
 
 int rt_vprintf(const char *format, va_list args);
diff --git a/lib/cobalt/cobalt.wrappers b/lib/cobalt/cobalt.wrappers
index dae8c11..ef5f8ba 100644
--- a/lib/cobalt/cobalt.wrappers
+++ b/lib/cobalt/cobalt.wrappers
@@ -95,6 +95,7 @@
 --wrap fputc
 --wrap putchar
 --wrap fwrite
+--wrap fclose
 --wrap syslog
 --wrap vsyslog
 --wrap malloc
diff --git a/lib/cobalt/printf.c b/lib/cobalt/printf.c
index 2e2bbe5..ba75ef5 100644
--- a/lib/cobalt/printf.c
+++ b/lib/cobalt/printf.c
@@ -921,6 +921,12 @@ COBALT_IMPL(size_t, fwrite, (const void *ptr, size_t size, 
size_t nmemb, FILE *s
 
 }
 
+COBALT_IMPL(int, fclose, (FILE *stream))
+{
+   rt_print_flush_buffers();
+   return __STD(fclose(stream));
+}
+
 COBALT_IMPL(void, vsyslog, (int priority, const char *fmt, va_list ap))
 {
if (cobalt_get_current() != XN_NO_HANDLE &&
diff --git a/lib/cobalt/wrappers.c b/lib/cobalt/wrappers.c
index a4f643e..bf07a04 100644
--- a/lib/cobalt/wrappers.c
+++ b/lib/cobalt/wrappers.c
@@ -368,6 +368,12 @@ size_t __real_fwrite(const void *ptr, size_t sz, size_t 
nmemb, FILE *stream)
 }
 
 __attribute__ ((weak))
+int __real_fclose(FILE *stream)
+{
+   return fclose(stream);
+}
+
+__attribute__ ((weak))
 void __real_syslog(int priority, const char *fmt, ...)
 {
va_list args;


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


[Xenomai-git] Philippe Gerum : cobalt/arm: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 261255d54ef81127d26427f6f54e18f29738c190
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=261255d54ef81127d26427f6f54e18f29738c190

Author: Philippe Gerum 
Date:   Sun Feb 16 16:53:26 2014 +0100

cobalt/arm: upgrade I-pipe support

---

 .../arm/patches/ipipe-core-3.10.18-arm-1.patch |20870 
 1 file changed, 20870 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=261255d54ef81127d26427f6f54e18f29738c190

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


[Xenomai-git] Philippe Gerum : cobalt/powerpc: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 9d5dc1e2b303be27fe23a2cba7f0615585012bdb
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9d5dc1e2b303be27fe23a2cba7f0615585012bdb

Author: Philippe Gerum 
Date:   Sun Feb 16 16:53:45 2014 +0100

cobalt/powerpc: upgrade I-pipe support

---

 .../powerpc/ipipe-core-3.10.18-powerpc-1.patch |14324 
 1 file changed, 14324 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=9d5dc1e2b303be27fe23a2cba7f0615585012bdb

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


[Xenomai-git] Jan Kiszka : include/copperplate: Do not install internal header registry-obstack.h

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: ccf53bbb85c734cf9583cdca6bdea62b49bb3f8d
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=ccf53bbb85c734cf9583cdca6bdea62b49bb3f8d

Author: Jan Kiszka 
Date:   Tue Feb 11 15:27:40 2014 +0100

include/copperplate: Do not install internal header registry-obstack.h

Signed-off-by: Jan Kiszka 

---

 include/copperplate/Makefile.am |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/copperplate/Makefile.am b/include/copperplate/Makefile.am
index 50147a7..f721ff8 100644
--- a/include/copperplate/Makefile.am
+++ b/include/copperplate/Makefile.am
@@ -11,8 +11,10 @@ includesub_HEADERS = \
notifier.h  \
reference.h \
registry.h  \
-   registry-obstack.h  \
syncobj.h   \
threadobj.h \
traceobj.h  \
wrappers.h
+
+noinst_HEADERS =   \
+   registry-obstack.h


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


[Xenomai-git] Jan Kiszka : include/copperplate: Do not install internal header registry-obstack.h

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: ccf53bbb85c734cf9583cdca6bdea62b49bb3f8d
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=ccf53bbb85c734cf9583cdca6bdea62b49bb3f8d

Author: Jan Kiszka 
Date:   Tue Feb 11 15:27:40 2014 +0100

include/copperplate: Do not install internal header registry-obstack.h

Signed-off-by: Jan Kiszka 

---

 include/copperplate/Makefile.am |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/copperplate/Makefile.am b/include/copperplate/Makefile.am
index 50147a7..f721ff8 100644
--- a/include/copperplate/Makefile.am
+++ b/include/copperplate/Makefile.am
@@ -11,8 +11,10 @@ includesub_HEADERS = \
notifier.h  \
reference.h \
registry.h  \
-   registry-obstack.h  \
syncobj.h   \
threadobj.h \
traceobj.h  \
wrappers.h
+
+noinst_HEADERS =   \
+   registry-obstack.h


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


[Xenomai-git] Philippe Gerum : cobalt/arm: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: 261255d54ef81127d26427f6f54e18f29738c190
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=261255d54ef81127d26427f6f54e18f29738c190

Author: Philippe Gerum 
Date:   Sun Feb 16 16:53:26 2014 +0100

cobalt/arm: upgrade I-pipe support

---

 .../arm/patches/ipipe-core-3.10.18-arm-1.patch |20870 
 1 file changed, 20870 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=261255d54ef81127d26427f6f54e18f29738c190

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


[Xenomai-git] Philippe Gerum : cobalt: require kernel version >= 3.10

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: 6e78e8462746a0efaa05dbf5839e97fc40e1309b
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6e78e8462746a0efaa05dbf5839e97fc40e1309b

Author: Philippe Gerum 
Date:   Sun Feb 16 17:03:19 2014 +0100

cobalt: require kernel version >= 3.10

---

 .../cobalt/include/asm-generic/xenomai/wrappers.h  |   62 
 1 file changed, 12 insertions(+), 50 deletions(-)

diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h 
b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
index 601fc30..b357545 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
@@ -23,65 +23,27 @@
 #endif
 
 #include 
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#error "Xenomai/cobalt requires Linux kernel 3.10 or above"
+#endif
+
+#ifdef CONFIG_IPIPE_LEGACY
+#error "CONFIG_IPIPE_LEGACY must be switched off"
+#endif
+
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
-
-#ifdef CONFIG_IPIPE_LEGACY
-#error "CONFIG_IPIPE_LEGACY must be switched off"
-#endif
-
 #include 
+#include 
+
 #ifndef pgprot_noncached
 #define pgprot_noncached(p) (p)
 #endif /* !pgprot_noncached */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
-
-#include 
-
-#ifndef cpu_online_map
-#define cpu_online_mask (&cpu_online_map)
-#endif
-
-static inline
-unsigned long vm_mmap(struct file *file, unsigned long addr,
-   unsigned long len, unsigned long prot,
-   unsigned long flag, unsigned long offset)
-{
-   struct mm_struct *mm = current->mm;
-   unsigned long ret;
-
-   down_write(&mm->mmap_sem);
-   ret = do_mmap(file, addr, len, prot, flag, offset);
-   up_write(&mm->mmap_sem);
-
-   return ret;
-}
-
-#endif /* LINUX_VERSION_CODE < 3.4.0 */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
-#define KGIDT_INIT(pid) (pid)
-#endif /* LINUX < 3.8.0 */
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-#include 
-#endif /* LINUX >= 3.9.0 */
  
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-#include 
-
-#define PDE_DATA(inode)PROC_I(inode)->pde->data
-
-static inline void proc_remove(struct proc_dir_entry *pde)
-{
-   remove_proc_entry(pde->name, pde->parent);
-}
-#endif /* < 3.10 */
-
 #endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */


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


[Xenomai-git] Philippe Gerum : cobalt/powerpc: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: 9d5dc1e2b303be27fe23a2cba7f0615585012bdb
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=9d5dc1e2b303be27fe23a2cba7f0615585012bdb

Author: Philippe Gerum 
Date:   Sun Feb 16 16:53:45 2014 +0100

cobalt/powerpc: upgrade I-pipe support

---

 .../powerpc/ipipe-core-3.10.18-powerpc-1.patch |14324 
 1 file changed, 14324 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=9d5dc1e2b303be27fe23a2cba7f0615585012bdb

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


[Xenomai-git] Philippe Gerum : cobalt/powerpc: assume kernel version >= 3.10

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: dc2aaf496041b8ee9393cc24d629b261f7e6b41f
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=dc2aaf496041b8ee9393cc24d629b261f7e6b41f

Author: Philippe Gerum 
Date:   Sun Feb 16 17:03:35 2014 +0100

cobalt/powerpc: assume kernel version >= 3.10

---

 kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h |9 -
 1 file changed, 9 deletions(-)

diff --git a/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h 
b/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
index fce5526..e8f0aa6 100644
--- a/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
+++ b/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
@@ -24,11 +24,6 @@
 #endif
 
 #include 
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
-#error "Linux kernel 3.0 or above required for this architecture"
-#endif
-
 #include 
 
 #ifdef CONFIG_PPC64
@@ -71,10 +66,6 @@
 #define of_register_platform_driver platform_driver_register
 #define of_unregister_platform_driver platform_driver_unregister
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
 #define wrap_strncpy_from_user(dstP, srcP, n)  strncpy_from_user(dstP, srcP, n)
-#else
-#define wrap_strncpy_from_user(dstP, srcP, n)  __strncpy_from_user(dstP, srcP, 
n)
-#endif
 
 #endif /* _COBALT_POWERPC_ASM_WRAPPERS_H */


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


[Xenomai-git] Philippe Gerum : cobalt/sched: fix non-SMP build

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: 5ce1e1c69f81a004a78d1208c9aecef74d0cf493
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=5ce1e1c69f81a004a78d1208c9aecef74d0cf493

Author: Philippe Gerum 
Date:   Sun Feb 16 17:33:53 2014 +0100

cobalt/sched: fix non-SMP build

---

 include/cobalt/kernel/sched.h |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/kernel/sched.h b/include/cobalt/kernel/sched.h
index d96eef0..f4a47f9 100644
--- a/include/cobalt/kernel/sched.h
+++ b/include/cobalt/kernel/sched.h
@@ -209,6 +209,8 @@ static inline void xnsched_set_self_resched(struct xnsched 
*sched)
sched->status |= XNRESCHED;
 }
 
+#define xnsched_realtime_domain  xnarch_machdata.domain
+
 /* Set resched flag for the given scheduler. */
 #ifdef CONFIG_SMP
 
@@ -226,7 +228,6 @@ static inline void xnsched_set_resched(struct xnsched 
*sched)
 }
 
 #define xnsched_realtime_cpusxnarch_machdata.supported_cpus
-#define xnsched_realtime_domain  xnarch_machdata.domain
 
 static inline int xnsched_supported_cpu(int cpu)
 {


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


[Xenomai-git] Philippe Gerum : cobalt/powerpc: assume kernel version >= 3.10

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: dc2aaf496041b8ee9393cc24d629b261f7e6b41f
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=dc2aaf496041b8ee9393cc24d629b261f7e6b41f

Author: Philippe Gerum 
Date:   Sun Feb 16 17:03:35 2014 +0100

cobalt/powerpc: assume kernel version >= 3.10

---

 kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h |9 -
 1 file changed, 9 deletions(-)

diff --git a/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h 
b/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
index fce5526..e8f0aa6 100644
--- a/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
+++ b/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
@@ -24,11 +24,6 @@
 #endif
 
 #include 
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
-#error "Linux kernel 3.0 or above required for this architecture"
-#endif
-
 #include 
 
 #ifdef CONFIG_PPC64
@@ -71,10 +66,6 @@
 #define of_register_platform_driver platform_driver_register
 #define of_unregister_platform_driver platform_driver_unregister
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
 #define wrap_strncpy_from_user(dstP, srcP, n)  strncpy_from_user(dstP, srcP, n)
-#else
-#define wrap_strncpy_from_user(dstP, srcP, n)  __strncpy_from_user(dstP, srcP, 
n)
-#endif
 
 #endif /* _COBALT_POWERPC_ASM_WRAPPERS_H */


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


[Xenomai-git] Philippe Gerum : cobalt/x86: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: a55a763e3dd04f031018b7bcb7e54af214532e23
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=a55a763e3dd04f031018b7bcb7e54af214532e23

Author: Philippe Gerum 
Date:   Sun Feb 16 16:54:08 2014 +0100

cobalt/x86: upgrade I-pipe support

---

 .../x86/patches/ipipe-core-3.10.18-x86-1.patch |14738 
 1 file changed, 14738 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=a55a763e3dd04f031018b7bcb7e54af214532e23

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


[Xenomai-git] Jan Kiszka : lib/cobalt: Flush print buffer on fclose

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: b0a867efad33ddeaeb7d1daa4b98defc039f6da1
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b0a867efad33ddeaeb7d1daa4b98defc039f6da1

Author: Jan Kiszka 
Date:   Wed Feb 12 18:48:58 2014 +0100

lib/cobalt: Flush print buffer on fclose

As we keep a reference to the stream that was written to via fwrite &
Co., we need to flush our buffers before closing streams. Otherwise, we
risk that print_buffers crashes while trying to use a stale FILE object.

Signed-off-by: Jan Kiszka 

---

 include/cobalt/stdio.h |2 ++
 lib/cobalt/cobalt.wrappers |1 +
 lib/cobalt/printf.c|6 ++
 lib/cobalt/wrappers.c  |6 ++
 4 files changed, 15 insertions(+)

diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h
index d2c2e43..b7407fd 100644
--- a/include/cobalt/stdio.h
+++ b/include/cobalt/stdio.h
@@ -82,6 +82,8 @@ int __wrap_putchar(int c);
 COBALT_DECL(size_t,
fwrite(const void *ptr, size_t sz, size_t nmemb, FILE *stream));
 
+COBALT_DECL(int, fclose(FILE *stream));
+
 int rt_vfprintf(FILE *stream, const char *format, va_list args);
 
 int rt_vprintf(const char *format, va_list args);
diff --git a/lib/cobalt/cobalt.wrappers b/lib/cobalt/cobalt.wrappers
index dae8c11..ef5f8ba 100644
--- a/lib/cobalt/cobalt.wrappers
+++ b/lib/cobalt/cobalt.wrappers
@@ -95,6 +95,7 @@
 --wrap fputc
 --wrap putchar
 --wrap fwrite
+--wrap fclose
 --wrap syslog
 --wrap vsyslog
 --wrap malloc
diff --git a/lib/cobalt/printf.c b/lib/cobalt/printf.c
index 2e2bbe5..ba75ef5 100644
--- a/lib/cobalt/printf.c
+++ b/lib/cobalt/printf.c
@@ -921,6 +921,12 @@ COBALT_IMPL(size_t, fwrite, (const void *ptr, size_t size, 
size_t nmemb, FILE *s
 
 }
 
+COBALT_IMPL(int, fclose, (FILE *stream))
+{
+   rt_print_flush_buffers();
+   return __STD(fclose(stream));
+}
+
 COBALT_IMPL(void, vsyslog, (int priority, const char *fmt, va_list ap))
 {
if (cobalt_get_current() != XN_NO_HANDLE &&
diff --git a/lib/cobalt/wrappers.c b/lib/cobalt/wrappers.c
index a4f643e..bf07a04 100644
--- a/lib/cobalt/wrappers.c
+++ b/lib/cobalt/wrappers.c
@@ -368,6 +368,12 @@ size_t __real_fwrite(const void *ptr, size_t sz, size_t 
nmemb, FILE *stream)
 }
 
 __attribute__ ((weak))
+int __real_fclose(FILE *stream)
+{
+   return fclose(stream);
+}
+
+__attribute__ ((weak))
 void __real_syslog(int priority, const char *fmt, ...)
 {
va_list args;


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


[Xenomai-git] Philippe Gerum : cobalt/blackfin: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: master
Commit: 8cd47f6d19b6c425e3afdf90dd541badbf6a3eb9
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8cd47f6d19b6c425e3afdf90dd541badbf6a3eb9

Author: Philippe Gerum 
Date:   Sun Feb 16 16:54:44 2014 +0100

cobalt/blackfin: upgrade I-pipe support

---

 .../patches/ipipe-core-3.10.18-blackfin-1.patch|11039 
 1 file changed, 11039 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=8cd47f6d19b6c425e3afdf90dd541badbf6a3eb9

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


[Xenomai-git] Philippe Gerum : cobalt/powerpc: assume kernel version >= 3.10

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 7d44bbfec54e081bf2be3d282131825b5b752712
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7d44bbfec54e081bf2be3d282131825b5b752712

Author: Philippe Gerum 
Date:   Sun Feb 16 17:03:35 2014 +0100

cobalt/powerpc: assume kernel version >= 3.10

---

 kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h |9 -
 1 file changed, 9 deletions(-)

diff --git a/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h 
b/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
index fce5526..e8f0aa6 100644
--- a/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
+++ b/kernel/cobalt/arch/powerpc/include/asm/xenomai/wrappers.h
@@ -24,11 +24,6 @@
 #endif
 
 #include 
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
-#error "Linux kernel 3.0 or above required for this architecture"
-#endif
-
 #include 
 
 #ifdef CONFIG_PPC64
@@ -71,10 +66,6 @@
 #define of_register_platform_driver platform_driver_register
 #define of_unregister_platform_driver platform_driver_unregister
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
 #define wrap_strncpy_from_user(dstP, srcP, n)  strncpy_from_user(dstP, srcP, n)
-#else
-#define wrap_strncpy_from_user(dstP, srcP, n)  __strncpy_from_user(dstP, srcP, 
n)
-#endif
 
 #endif /* _COBALT_POWERPC_ASM_WRAPPERS_H */


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


[Xenomai-git] Philippe Gerum : cobalt: require kernel version >= 3.10

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: b0650c1038e8e280c5cd28f92087654ce54409e0
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b0650c1038e8e280c5cd28f92087654ce54409e0

Author: Philippe Gerum 
Date:   Sun Feb 16 17:03:19 2014 +0100

cobalt: require kernel version >= 3.10

---

 .../cobalt/include/asm-generic/xenomai/wrappers.h  |   62 
 1 file changed, 12 insertions(+), 50 deletions(-)

diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h 
b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
index 601fc30..b357545 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
@@ -23,65 +23,27 @@
 #endif
 
 #include 
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#error "Xenomai/cobalt requires Linux kernel 3.10 or above"
+#endif
+
+#ifdef CONFIG_IPIPE_LEGACY
+#error "CONFIG_IPIPE_LEGACY must be switched off"
+#endif
+
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
-
-#ifdef CONFIG_IPIPE_LEGACY
-#error "CONFIG_IPIPE_LEGACY must be switched off"
-#endif
-
 #include 
+#include 
+
 #ifndef pgprot_noncached
 #define pgprot_noncached(p) (p)
 #endif /* !pgprot_noncached */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
-
-#include 
-
-#ifndef cpu_online_map
-#define cpu_online_mask (&cpu_online_map)
-#endif
-
-static inline
-unsigned long vm_mmap(struct file *file, unsigned long addr,
-   unsigned long len, unsigned long prot,
-   unsigned long flag, unsigned long offset)
-{
-   struct mm_struct *mm = current->mm;
-   unsigned long ret;
-
-   down_write(&mm->mmap_sem);
-   ret = do_mmap(file, addr, len, prot, flag, offset);
-   up_write(&mm->mmap_sem);
-
-   return ret;
-}
-
-#endif /* LINUX_VERSION_CODE < 3.4.0 */
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
-#define KGIDT_INIT(pid) (pid)
-#endif /* LINUX < 3.8.0 */
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-#include 
-#endif /* LINUX >= 3.9.0 */
  
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
-#include 
-
-#define PDE_DATA(inode)PROC_I(inode)->pde->data
-
-static inline void proc_remove(struct proc_dir_entry *pde)
-{
-   remove_proc_entry(pde->name, pde->parent);
-}
-#endif /* < 3.10 */
-
 #endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */


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


[Xenomai-git] Philippe Gerum : cobalt/blackfin: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: de67c6a9acae1285ac8ee502e8e657c812e00d04
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=de67c6a9acae1285ac8ee502e8e657c812e00d04

Author: Philippe Gerum 
Date:   Sun Feb 16 16:54:44 2014 +0100

cobalt/blackfin: upgrade I-pipe support

---

 .../patches/ipipe-core-3.10.18-blackfin-1.patch|11039 
 1 file changed, 11039 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=de67c6a9acae1285ac8ee502e8e657c812e00d04

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


[Xenomai-git] Philippe Gerum : cobalt/x86: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 039a166968242853eebf4fce46cd7b89449e9190
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=039a166968242853eebf4fce46cd7b89449e9190

Author: Philippe Gerum 
Date:   Sun Feb 16 16:54:08 2014 +0100

cobalt/x86: upgrade I-pipe support

---

 .../x86/patches/ipipe-core-3.10.18-x86-1.patch |14738 
 1 file changed, 14738 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=039a166968242853eebf4fce46cd7b89449e9190

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


[Xenomai-git] Philippe Gerum : cobalt/powerpc: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 8ef6f3a67cd874c8ba78ecc53dc2c5c0fb01208e
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8ef6f3a67cd874c8ba78ecc53dc2c5c0fb01208e

Author: Philippe Gerum 
Date:   Sun Feb 16 16:53:45 2014 +0100

cobalt/powerpc: upgrade I-pipe support

---

 .../powerpc/ipipe-core-3.10.18-powerpc-1.patch |14324 
 1 file changed, 14324 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=8ef6f3a67cd874c8ba78ecc53dc2c5c0fb01208e

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


[Xenomai-git] Philippe Gerum : cobalt/arm: upgrade I-pipe support

2014-02-16 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: ed6f9bfefce8269a46f94f4febb623571e350cd3
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=ed6f9bfefce8269a46f94f4febb623571e350cd3

Author: Philippe Gerum 
Date:   Sun Feb 16 16:53:26 2014 +0100

cobalt/arm: upgrade I-pipe support

---

 .../arm/patches/ipipe-core-3.10.18-arm-1.patch |20870 
 1 file changed, 20870 insertions(+)

Diff:   
http://git.xenomai.org/?p=xenomai-forge.git;a=commitdiff;h=ed6f9bfefce8269a46f94f4febb623571e350cd3

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