[Xenomai-git] Philippe Gerum : lib/cobalt: unexport asm/xenomai/tsc.h

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 3f2346392969710381545906be4e16a6d4ca2f97
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=3f2346392969710381545906be4e16a6d4ca2f97

Author: Philippe Gerum 
Date:   Sat Jul  6 15:51:01 2013 +0200

lib/cobalt: unexport asm/xenomai/tsc.h

---

 lib/cobalt/arch/arm/Makefile.am|2 +-
 lib/cobalt/arch/arm/Makefile.in|   12 +--
 .../arch/arm/include/asm/xenomai/Makefile.am   |   11 +-
 .../arch/arm/include/asm/xenomai/Makefile.in   |   92 ++-
 lib/cobalt/arch/arm/include/asm/xenomai/tsc.h  |   96 +++-
 lib/cobalt/arch/arm/tsc.c  |4 -
 .../arch/blackfin/include/asm/xenomai/Makefile.am  |7 +-
 .../arch/blackfin/include/asm/xenomai/Makefile.in  |   84 ++-
 .../arch/nios2/include/asm/xenomai/Makefile.am |7 +-
 .../arch/nios2/include/asm/xenomai/Makefile.in |   84 ++-
 .../arch/powerpc/include/asm/xenomai/Makefile.am   |8 -
 .../arch/powerpc/include/asm/xenomai/Makefile.in   |  164 +++-
 lib/cobalt/arch/sh/include/asm/xenomai/Makefile.am |7 +-
 lib/cobalt/arch/sh/include/asm/xenomai/Makefile.in |   84 ++-
 .../arch/x86/include/asm/xenomai/Makefile.am   |7 +-
 .../arch/x86/include/asm/xenomai/Makefile.in   |   84 ++-
 16 files changed, 197 insertions(+), 556 deletions(-)

diff --git a/lib/cobalt/arch/arm/Makefile.am b/lib/cobalt/arch/arm/Makefile.am
index b45bfbb..0aa02d6 100644
--- a/lib/cobalt/arch/arm/Makefile.am
+++ b/lib/cobalt/arch/arm/Makefile.am
@@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libarch.la
 
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
-libarch_la_SOURCES = features.c tsc.c
+libarch_la_SOURCES = features.c
 
 libarch_la_CPPFLAGS =  \
@XENO_COBALT_CFLAGS@\
diff --git a/lib/cobalt/arch/arm/Makefile.in b/lib/cobalt/arch/arm/Makefile.in
index ac389f9..b2dc7ea 100644
--- a/lib/cobalt/arch/arm/Makefile.in
+++ b/lib/cobalt/arch/arm/Makefile.in
@@ -71,7 +71,7 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libarch_la_LIBADD =
-am_libarch_la_OBJECTS = libarch_la-features.lo libarch_la-tsc.lo
+am_libarch_la_OBJECTS = libarch_la-features.lo
 libarch_la_OBJECTS = $(am_libarch_la_OBJECTS)
 libarch_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -303,7 +303,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
-libarch_la_SOURCES = features.c tsc.c
+libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
@XENO_COBALT_CFLAGS@\
-I$(srcdir)/../..   \
@@ -366,7 +366,6 @@ distclean-compile:
-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libarch_la-features.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libarch_la-tsc.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ 
$<
@@ -396,13 +395,6 @@ libarch_la-features.lo: features.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libarch_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarch_la-features.lo `test -f 'features.c' || echo '$(srcdir)/'`features.c
 
-libarch_la-tsc.lo: tsc.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libarch_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarch_la-tsc.lo 
-MD -MP -MF $(DEPDIR)/libarch_la-tsc.Tpo -c -o libarch_la-tsc.lo `test -f 
'tsc.c' || echo '$(srcdir)/'`tsc.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libarch_la-tsc.Tpo 
$(DEPDIR)/libarch_la-tsc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@  source='tsc.c' 
object='libarch_la-tsc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libarch_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarch_la-tsc.lo `test -f 'tsc.c' || echo '$(srcdir)/'`tsc.c
-
 mostlyclean-libtool:
-rm -f *.lo
 
diff --git a/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am 
b/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am
index 8f7d65d..d308b06 100644
--- a/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am
+++ b/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am
@@ -1,12 +1,5 @@
-includesubdir = $(includedir)/cobalt/asm/xenomai
-
-includesub_HEADERS =   \
-   tsc.h
 
 noinst_HEADERS =   \
features.h  

[Xenomai-git] Philippe Gerum : cobalt/shadow, blackfin: drop rescheduling check in head syscall handler

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 30c6de32e656b21fb252e222099539e7f8dec201
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=30c6de32e656b21fb252e222099539e7f8dec201

Author: Philippe Gerum 
Date:   Sat Jul  6 17:09:20 2013 +0200

cobalt/shadow, blackfin: drop rescheduling check in head syscall handler

Only blackfin may have deferred rescheduling, which is already
performed via the arch-specific IRQ tail hook, prior to running the
Xenomai syscall handler. We don't have to duplicate this.

At this chance, Blackfin's deferred rescheduling hook is made private
to the machine support code.

---

 .../arch/blackfin/include/asm/xenomai/thread.h |8 
 kernel/cobalt/arch/blackfin/machine.c  |9 +++--
 .../cobalt/include/asm-generic/xenomai/syscall.h   |4 
 kernel/cobalt/pod.c|6 --
 kernel/cobalt/shadow.c |2 --
 5 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h 
b/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
index 5bb6ae4..302675a 100644
--- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
+++ b/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
@@ -50,14 +50,6 @@ struct xnarchtcb {
 
 #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d))
 
-#define __xnarch_head_syscall_entry()  \
-   do  {   \
-   if (xnsched_resched_p(xnpod_current_sched()))   \
-   xnpod_schedule();   \
-   } while(0)
-
-#define xnarch_head_syscall_entry  __xnarch_head_syscall_entry
-
 void xnarch_switch_to(struct xnarchtcb *out_tcb, struct xnarchtcb *in_tcb);
 
 int xnarch_escalate(void);
diff --git a/kernel/cobalt/arch/blackfin/machine.c 
b/kernel/cobalt/arch/blackfin/machine.c
index e48b8c4..ef279d6 100644
--- a/kernel/cobalt/arch/blackfin/machine.c
+++ b/kernel/cobalt/arch/blackfin/machine.c
@@ -18,6 +18,7 @@
  *   02111-1307, USA.
  */
 #include 
+#include 
 #include 
 
 static unsigned long mach_blackfin_calibrate(void)
@@ -25,11 +26,15 @@ static unsigned long mach_blackfin_calibrate(void)
return 20;  /* 20 clock cycles */
 }
 
-void xnpod_schedule_deferred(void);
+static void schedule_deferred(void)
+{
+   if (xnpod_active_p())
+   xnpod_schedule();
+}
 
 static int mach_blackfin_init(void)
 {
-   __ipipe_irq_tail_hook = (unsigned long)xnpod_schedule_deferred;
+   __ipipe_irq_tail_hook = (unsigned long)schedule_deferred;
 
return 0;
 }
diff --git a/kernel/cobalt/include/asm-generic/xenomai/syscall.h 
b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
index ba4a2a5..4f2b22d 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/syscall.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
@@ -122,8 +122,4 @@ static inline int __xn_safe_strncpy_from_user(char *dst,
return __xn_strncpy_from_user(dst, src, count);
 }
 
-#ifndef xnarch_head_syscall_entry
-static inline void xnarch_head_syscall_entry(void) { }
-#endif
-
 #endif /* !_COBALT_ASM_GENERIC_SYSCALL_H */
diff --git a/kernel/cobalt/pod.c b/kernel/cobalt/pod.c
index 153bf8d..78f14c4 100644
--- a/kernel/cobalt/pod.c
+++ b/kernel/cobalt/pod.c
@@ -216,12 +216,6 @@ void __xnpod_schedule_handler(void) /* hw interrupts off. 
*/
xnpod_schedule();
 }
 
-void xnpod_schedule_deferred(void)
-{
-   if (xnpod_active_p())
-   xnpod_schedule();
-}
-
 static void xnpod_flush_heap(struct xnheap *heap,
 void *extaddr, unsigned long extsize, void *cookie)
 {
diff --git a/kernel/cobalt/shadow.c b/kernel/cobalt/shadow.c
index ca0d00f..c53d1a2 100644
--- a/kernel/cobalt/shadow.c
+++ b/kernel/cobalt/shadow.c
@@ -1869,8 +1869,6 @@ static int handle_head_syscall(struct ipipe_domain *ipd, 
struct pt_regs *regs)
if (!xnpod_active_p())
goto no_personality;
 
-   xnarch_head_syscall_entry();
-
thread = xnshadow_current();
if (thread)
thread->regs = regs;


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


[Xenomai-git] Philippe Gerum : cobalt/posix/thread: drop .fp support flag

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 6cd3fe535e1b7a31f04d30aded489b5fab2fb125
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6cd3fe535e1b7a31f04d30aded489b5fab2fb125

Author: Philippe Gerum 
Date:   Sat Jul  6 16:44:53 2013 +0200

cobalt/posix/thread: drop .fp support flag

FPU support is always available to Cobalt threads which are user-space
only.

---

 kernel/cobalt/posix/thread.c |   14 +++---
 kernel/cobalt/posix/thread.h |1 -
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c
index 7ed80da..27641c1 100644
--- a/kernel/cobalt/posix/thread.c
+++ b/kernel/cobalt/posix/thread.c
@@ -45,7 +45,6 @@ static const pthread_attr_t default_thread_attr = {
.sched_priority = 0
},
.name = NULL,
-   .fp = 1,
.affinity = XNPOD_ALL_CPUS,
 };
 
@@ -345,9 +344,8 @@ static inline int pthread_create(pthread_t *tid, const 
pthread_attr_t *attr)
struct xnsched_class *sched_class;
union xnsched_policy_param param;
struct xnthread_init_attr iattr;
-   int prio, ret, pol, flags = 0;
pthread_t thread, cur;
-   const char *name;
+   int prio, ret, pol;
spl_t s;
 
if (attr && attr->magic != COBALT_THREAD_ATTR_MAGIC)
@@ -385,14 +383,9 @@ static inline int pthread_create(pthread_t *tid, const 
pthread_attr_t *attr)
prio = -prio;
pol = SCHED_WEAK;
}
-   name = thread->attr.name;
-   flags |= XNUSER;
 
-   if (thread->attr.fp)
-   flags |= XNFPU;
-
-   iattr.name = name;
-   iattr.flags = flags;
+   iattr.name = thread->attr.name;
+   iattr.flags = XNUSER|XNFPU;
iattr.personality = &cobalt_personality;
 
/*
@@ -834,7 +827,6 @@ int cobalt_thread_create(unsigned long tid, int policy,
attr.policy = policy;
attr.detachstate = PTHREAD_CREATE_DETACHED;
attr.schedparam_ex = param;
-   attr.fp = 1;
attr.name = p->comm;
 
ret = pthread_create(&pthread, &attr);
diff --git a/kernel/cobalt/posix/thread.h b/kernel/cobalt/posix/thread.h
index b4963e8..791f694 100644
--- a/kernel/cobalt/posix/thread.h
+++ b/kernel/cobalt/posix/thread.h
@@ -55,7 +55,6 @@ typedef struct cobalt_threadattr {
/* Non portable */
struct sched_param_ex schedparam_ex;
char *name;
-   int fp;
cpumask_t affinity;
 
 } pthread_attr_t;


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


[Xenomai-git] Philippe Gerum : copperplate: move clockobj_get_tsc() out of line

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 8e71e6c398e6b5f5c8c723d7c1098e7f4647a80e
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8e71e6c398e6b5f5c8c723d7c1098e7f4647a80e

Author: Philippe Gerum 
Date:   Sat Jul  6 15:47:35 2013 +0200

copperplate: move clockobj_get_tsc() out of line

---

 include/copperplate/clockobj.h |   16 ++--
 lib/copperplate/clockobj.c |   14 ++
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/include/copperplate/clockobj.h b/include/copperplate/clockobj.h
index 2619bb1..965523d 100644
--- a/include/copperplate/clockobj.h
+++ b/include/copperplate/clockobj.h
@@ -128,6 +128,8 @@ void clockobj_get_date(struct clockobj *clkobj, ticks_t 
*pticks);
 void clockobj_get_time(struct clockobj *clkobj,
   ticks_t *pticks, ticks_t *ptsc);
 
+ticks_t clockobj_get_tsc(void);
+
 void clockobj_caltime_to_timeout(struct clockobj *clkobj, const struct tm *tm,
 unsigned long rticks, struct timespec *ts);
 
@@ -159,13 +161,6 @@ int clockobj_destroy(struct clockobj *clkobj);
 #ifdef CONFIG_XENO_COBALT
 
 #include 
-#include 
-
-static inline ticks_t clockobj_get_tsc(void)
-{
-   /* Guaranteed to be the source of CLOCK_COPPERPLATE. */
-   return __xn_rdtsc();
-}
 
 static inline sticks_t clockobj_ns_to_tsc(sticks_t ns)
 {
@@ -188,13 +183,6 @@ void clockobj_ns_to_timespec(ticks_t ns, struct timespec 
*ts)
 
 #else /* CONFIG_XENO_MERCURY */
 
-static inline ticks_t clockobj_get_tsc(void)
-{
-   struct timespec now;
-   __RT(clock_gettime(CLOCK_COPPERPLATE, &now));
-   return (ticks_t)now.tv_sec * 10ULL + now.tv_nsec;
-}
-
 static inline sticks_t clockobj_ns_to_tsc(sticks_t ns)
 {
return ns;
diff --git a/lib/copperplate/clockobj.c b/lib/copperplate/clockobj.c
index 05a14db..183a27a 100644
--- a/lib/copperplate/clockobj.c
+++ b/lib/copperplate/clockobj.c
@@ -283,6 +283,13 @@ int clockobj_set_resolution(struct clockobj *clkobj, 
unsigned int resolution_ns)
 #ifdef CONFIG_XENO_COBALT
 
 #include 
+#include 
+
+ticks_t clockobj_get_tsc(void)
+{
+   /* Guaranteed to be the source of CLOCK_COPPERPLATE. */
+   return __xn_rdtsc();
+}
 
 #ifndef CONFIG_XENO_LORES_CLOCK_DISABLED
 
@@ -328,6 +335,13 @@ void clockobj_get_date(struct clockobj *clkobj, ticks_t 
*pticks)
 
 #else /* CONFIG_XENO_MERCURY */
 
+ticks_t clockobj_get_tsc(void)
+{
+   struct timespec now;
+   __RT(clock_gettime(CLOCK_COPPERPLATE, &now));
+   return (ticks_t)now.tv_sec * 10ULL + now.tv_nsec;
+}
+
 #ifndef CONFIG_XENO_LORES_CLOCK_DISABLED
 
 sticks_t clockobj_ns_to_ticks(struct clockobj *clkobj, sticks_t ns)


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


[Xenomai-git] Philippe Gerum : cobalt/arm: drop useless fractional data for timer

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 76bb37b04525ff83f384053143f68ba5c287ab7a
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=76bb37b04525ff83f384053143f68ba5c287ab7a

Author: Philippe Gerum 
Date:   Thu Jul  4 10:51:30 2013 +0200

cobalt/arm: drop useless fractional data for timer

---

 include/cobalt/asm-arm/uapi/arith.h |2 --
 kernel/cobalt/arch/arm/machine.c|   12 +---
 2 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/include/cobalt/asm-arm/uapi/arith.h 
b/include/cobalt/asm-arm/uapi/arith.h
index 34187e9..3a6ac66 100644
--- a/include/cobalt/asm-arm/uapi/arith.h
+++ b/include/cobalt/asm-arm/uapi/arith.h
@@ -122,6 +122,4 @@ mach_arm_nodiv_llimd(const long long op,
 }
 #endif /* arm >= v4 */
 
-extern struct xnarch_u32frac mach_arm_tsc_to_timer;
-
 #endif /* _COBALT_ASM_ARM_UAPI_ARITH_H */
diff --git a/kernel/cobalt/arch/arm/machine.c b/kernel/cobalt/arch/arm/machine.c
index 0293366..5485a40 100644
--- a/kernel/cobalt/arch/arm/machine.c
+++ b/kernel/cobalt/arch/arm/machine.c
@@ -23,8 +23,6 @@
 #include 
 #include 
 
-struct xnarch_u32frac mach_arm_tsc_to_timer;
-
 #define CALIBRATION_LOOPS 10
 
 static void mach_arm_prefault(struct vm_area_struct *vma)
@@ -94,14 +92,6 @@ static unsigned long mach_arm_calibrate(void)
return result;
 }
 
-static int mach_arm_init(void)
-{
-   xnarch_init_u32frac(&mach_arm_tsc_to_timer,
-   xnarch_machdata.timer_freq,
-   xnarch_machdata.clock_freq);
-   return 0;
-}
-
 static const char *const fault_labels[] = {
[IPIPE_TRAP_ACCESS] = "Data or instruction access",
[IPIPE_TRAP_SECTION] = "Section fault",
@@ -119,7 +109,7 @@ static const char *const fault_labels[] = {
 
 struct xnarch_machdesc xnarch_machdesc = {
.name = "arm",
-   .init = mach_arm_init,
+   .init = NULL,
.cleanup = NULL,
.calibrate = mach_arm_calibrate,
.prefault = mach_arm_prefault,


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


[Xenomai-git] Philippe Gerum : cobalt: move fp test helpers to the uapi section

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 8e10c77c661c2ad69966816f2e70ee86366edc7f
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8e10c77c661c2ad69966816f2e70ee86366edc7f

Author: Philippe Gerum 
Date:   Thu Jul  4 17:32:59 2013 +0200

cobalt: move fp test helpers to the uapi section

---

 include/cobalt/asm-arm/fptest.h  |   77 +---
 include/cobalt/asm-arm/uapi/Makefile.am  |1 +
 include/cobalt/asm-arm/uapi/Makefile.in  |1 +
 include/cobalt/asm-arm/uapi/fptest.h |   61 +
 include/cobalt/asm-blackfin/fptest.h |   21 +---
 include/cobalt/asm-blackfin/uapi/Makefile.am |1 +
 include/cobalt/asm-blackfin/uapi/Makefile.in |1 +
 include/cobalt/asm-blackfin/uapi/fptest.h|   31 +
 include/cobalt/asm-nios2/fptest.h|   21 +---
 include/cobalt/asm-nios2/uapi/Makefile.am|1 +
 include/cobalt/asm-nios2/uapi/Makefile.in|1 +
 include/cobalt/asm-nios2/uapi/fptest.h   |   31 +
 include/cobalt/asm-powerpc/fptest.h  |  103 +---
 include/cobalt/asm-powerpc/uapi/Makefile.am  |1 +
 include/cobalt/asm-powerpc/uapi/Makefile.in  |1 +
 include/cobalt/asm-powerpc/uapi/fptest.h |  113 +
 include/cobalt/asm-sh/fptest.h   |   21 +---
 include/cobalt/asm-sh/uapi/Makefile.am   |1 +
 include/cobalt/asm-sh/uapi/Makefile.in   |1 +
 include/cobalt/asm-sh/uapi/fptest.h  |   31 +
 include/cobalt/asm-x86/fptest.h  |  168 +++---
 include/cobalt/asm-x86/uapi/Makefile.am  |1 +
 include/cobalt/asm-x86/uapi/Makefile.in  |1 +
 include/cobalt/asm-x86/uapi/fptest.h |  132 
 kernel/drivers/testing/switchtest.c  |   28 +++-
 lib/cobalt/arm/features.c|   27 
 lib/cobalt/arm/xenomai/features.h|2 +
 lib/cobalt/blackfin/xenomai/features.h   |5 +
 lib/cobalt/nios2/features.c  |3 +-
 lib/cobalt/nios2/xenomai/features.h  |5 +
 lib/cobalt/powerpc/xenomai/features.h|5 +
 lib/cobalt/sh/xenomai/features.h |5 +
 lib/cobalt/x86/features.c|   28 -
 lib/cobalt/x86/xenomai/features.h|2 +
 testsuite/switchtest/switchtest.c|   27 ++--
 35 files changed, 566 insertions(+), 393 deletions(-)

diff --git a/include/cobalt/asm-arm/fptest.h b/include/cobalt/asm-arm/fptest.h
index 9bc4ced..af92b86 100644
--- a/include/cobalt/asm-arm/fptest.h
+++ b/include/cobalt/asm-arm/fptest.h
@@ -19,16 +19,17 @@
 #ifndef _COBALT_ASM_ARM_FPTEST_H
 #define _COBALT_ASM_ARM_FPTEST_H
 
-#ifdef __KERNEL__
-#include 
+#include 
 #include 
 
 #ifdef CONFIG_VFP
 #define have_vfp (elf_hwcap & HWCAP_VFP)
 #else /* !CONFIG_VFP */
-#define have_vfp (0)
+#define have_vfp 0
 #endif /* !CONFIG_VFP */
 
+#include 
+
 static inline int fp_kernel_supported(void)
 {
return 1;
@@ -43,75 +44,9 @@ static inline void fp_linux_end(void)
 {
 }
 
-static inline void fp_features_init(void)
+static inline int fp_detect(void)
 {
+   return have_vfp ? __COBALT_HAVE_VFP : 0;
 }
 
-#else /* !__KERNEL__ */
-#include 
-#include 
-#define printk(fmt, args...) fprintf(stderr, fmt, ## args)
-
-static int have_vfp;
-
-static void fp_features_init(void)
-{
-   char buffer[1024];
-   FILE *f = fopen("/proc/cpuinfo", "r");
-   if(!f)
-   return;
-
-   while(fgets(buffer, sizeof(buffer), f)) {
-   if(strncmp(buffer, "Features", sizeof("Features") - 1))
-   continue;
-
-   if (strstr(buffer, "vfp")) {
-   have_vfp = 1;
-   break;
-   }
-   }
-
-   fclose(f);
-}
-
-#endif /* !__KERNEL__ */
-
-static inline void fp_regs_set(unsigned val)
-{
-   if (have_vfp) {
-   unsigned long long e[16];
-   unsigned i;
-
-   for (i = 0; i < 16; i++)
-   e[i] = val;
-
-   /* vldm %0!, {d0-d15},
-  AKA fldmiax %0!, {d0-d15} */
-   __asm__ __volatile__("ldc p11, cr0, [%0],#32*4":
-"=r"(i): "0"(&e[0]): "memory");
-   }
-}
-
-static inline unsigned fp_regs_check(unsigned val)
-{
-   unsigned result = val;
-
-   if (have_vfp) {
-   unsigned long long e[16];
-   unsigned i;
-
-   /* vstm %0!, {d0-d15},
-  AKA fstmiax %0!, {d0-d15} */
-   __asm__ __volatile__("stc p11, cr0, [%0],#32*4":
-"=r"(i): "0"(&e[0]): "memory");
-
-   for (i = 0; i < 16; i++)
-   if (e[i] != val) {
-   printk("d%d: %llu != %u\n", i, e[i], val);
-   result = e[i];
-   }
-   }
-
-   return result;
-}
 #endif /* _COBALT_ASM_ARM_FPTEST_H */

[Xenomai-git] Philippe Gerum : copperplate: rebase atomic ops over nocore/atomic.h

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 1d62c6b5c8dd841f2427a02cf4446df57428b321
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=1d62c6b5c8dd841f2427a02cf4446df57428b321

Author: Philippe Gerum 
Date:   Sat Jul  6 17:29:15 2013 +0200

copperplate: rebase atomic ops over nocore/atomic.h

---

 include/copperplate/lock.h |   13 +
 include/nocore/atomic.h|   28 +++-
 2 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/include/copperplate/lock.h b/include/copperplate/lock.h
index 7f1013c..60a1dac 100644
--- a/include/copperplate/lock.h
+++ b/include/copperplate/lock.h
@@ -20,6 +20,7 @@
 #define _COPPERPLATE_LOCK_H
 
 #include 
+#include 
 #include 
 #include 
 
@@ -204,18 +205,6 @@ int __check_cancel_type(const char *locktype);
 #define read_unlock_safe(__lock, __state)  \
__do_unlock_safe(__lock, __state)
 
-#define barrier()  __asm__ __volatile__("": : :"memory")
-#define membar()   __sync_synchronize()
-#ifdef CONFIG_SMP
-#define smp_membar()   membar()
-#else
-#define smp_membar()   do { } while (0)
-#endif
-
-#define atomic_sub_fetch(v, n) __sync_sub_and_fetch(&(v), n)
-#define atomic_add_fetch(v, n) __sync_add_and_fetch(&(v), n)
-#define atomic_cmp_swap(ptr, old, new)  __sync_val_compare_and_swap(ptr, old, 
new)
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/include/nocore/atomic.h b/include/nocore/atomic.h
index 8cd236a..d4101c9 100644
--- a/include/nocore/atomic.h
+++ b/include/nocore/atomic.h
@@ -44,18 +44,36 @@ typedef struct {
(typeof((p)->v))(n))
 #endif
 
-#ifndef smp_mb
-#define smp_mb() __sync_synchronize()
+#ifndef atomic_sub_fetch
+#define atomic_sub_fetch(v, n) _sync_sub_and_fetch(&(v), n)
 #endif
 
-#ifndef smp_rmb
-#define smp_rmb() __sync_synchronize()
+#ifndef atomic_add_fetch
+#define atomic_add_fetch(v, n) __sync_add_and_fetch(&(v), n)
 #endif
 
+#ifndef atomic_cmp_swap
+#define atomic_cmp_swap(ptr, old, new)  __sync_val_compare_and_swap(ptr, old, 
new)
+#endif
+
+#ifdef CONFIG_SMP
+#ifndef smp_mb
+#define smp_mb()   __sync_synchronize()
+#endif
+#ifndef smp_rmb
+#define smp_rmb()  smp_mb()
+#endif
 #ifndef smp_wmb
-#define smp_wmb() __sync_synchronize()
+#define smp_wmb()  smp_mb()
 #endif
+#else  /* !CONFIG_SMP */
+#define smp_mb()   do { } while (0)
+#define smp_rmb()  do { } while (0)
+#define smp_wmb()  do { } while (0)
+#endif /* !CONFIG_SMP */
 
 #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
 
+#define barrier()  __asm__ __volatile__("": : :"memory")
+
 #endif /* _NOCORE_ATOMIC_H */


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


[Xenomai-git] Philippe Gerum : cobalt: enable -Wmissing-prototypes for all targets

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: aa868a1ca48c6f7f79285c9981bb3abd80834be3
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=aa868a1ca48c6f7f79285c9981bb3abd80834be3

Author: Philippe Gerum 
Date:   Thu Jul  4 14:52:52 2013 +0200

cobalt: enable -Wmissing-prototypes for all targets

---

 include/cobalt/signal.h   |2 +
 include/cobalt/stdio.h|   11 ++-
 include/cobalt/syslog.h   |7 +++-
 lib/cobalt/Makefile.am|6 ++--
 lib/cobalt/Makefile.in|4 +-
 lib/cobalt/arm/Makefile.am|8 ++--
 lib/cobalt/arm/Makefile.in|6 ++--
 lib/cobalt/blackfin/Makefile.am   |8 ++--
 lib/cobalt/blackfin/Makefile.in   |6 ++--
 lib/cobalt/blackfin/features.c|1 +
 lib/cobalt/nios2/Makefile.am  |8 ++--
 lib/cobalt/nios2/Makefile.in  |6 ++--
 lib/cobalt/nios2/features.c   |2 +-
 lib/cobalt/powerpc/Makefile.am|8 ++--
 lib/cobalt/powerpc/Makefile.in|6 ++--
 lib/cobalt/powerpc/features.c |1 +
 lib/cobalt/sh/Makefile.am |8 ++--
 lib/cobalt/sh/Makefile.in |6 ++--
 lib/cobalt/sigshadow.c|1 +
 lib/cobalt/ticks.c|1 +
 lib/cobalt/trace.c|1 +
 lib/cobalt/x86/Makefile.am|8 ++--
 lib/cobalt/x86/Makefile.in|6 ++--
 testsuite/clocktest/Makefile.am   |3 +-
 testsuite/clocktest/Makefile.in   |3 +-
 testsuite/clocktest/clocktest.c   |   10 +++--
 testsuite/cyclic/Makefile.am  |2 +-
 testsuite/cyclic/Makefile.in  |2 +-
 testsuite/latency/Makefile.am |3 +-
 testsuite/latency/Makefile.in |3 +-
 testsuite/latency/latency.c   |   16 
 testsuite/switchtest/Makefile.am  |3 +-
 testsuite/switchtest/Makefile.in  |3 +-
 testsuite/switchtest/switchtest.c |   16 
 testsuite/unit/Makefile.am|   18 +++---
 testsuite/unit/Makefile.in|   18 +++---
 testsuite/unit/arith-noinline.c   |2 +-
 testsuite/unit/arith-noinline.h   |2 +-
 testsuite/unit/cond-torture.c |   54 +++---
 testsuite/unit/mutex-torture.c|   65 +
 testsuite/unit/wakeup-time.c  |8 ++--
 41 files changed, 176 insertions(+), 176 deletions(-)

diff --git a/include/cobalt/signal.h b/include/cobalt/signal.h
index 0304316..8fa0917 100644
--- a/include/cobalt/signal.h
+++ b/include/cobalt/signal.h
@@ -24,4 +24,6 @@
 #include_next 
 #include 
 
+int cobalt_sigshadow_handler(int sig, siginfo_t *si, void *ctxt);
+
 #endif /* !_COBALT_SIGNAL_H */
diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h
index 34ed470..2af2265 100644
--- a/include/cobalt/stdio.h
+++ b/include/cobalt/stdio.h
@@ -32,9 +32,18 @@ extern "C" {
 COBALT_DECL(int, vfprintf(FILE *stream, const char *fmt, va_list args));
 
 #ifdef CONFIG_XENO_FORTIFY
+
 COBALT_DECL(int, __vfprintf_chk(FILE *stream, int level,
const char *fmt, va_list ap));
-#endif
+
+COBALT_DECL(int, __vprintf_chk(int flag,
+  const char *fmt, va_list ap));
+
+COBALT_DECL(int, __printf_chk(int flag, const char *fmt, ...));
+
+COBALT_DECL(int, __fprintf_chk(FILE *fp, int flag, const char *fmt, ...));
+
+#endif /* CONFIG_XENO_FORTIFY */
 
 COBALT_DECL(int, vprintf(const char *fmt, va_list args));
 
diff --git a/include/cobalt/syslog.h b/include/cobalt/syslog.h
index a594b8e..79de374 100644
--- a/include/cobalt/syslog.h
+++ b/include/cobalt/syslog.h
@@ -34,9 +34,14 @@ COBALT_DECL(void, vsyslog(int priority,
  const char *fmt, va_list ap));
 
 #ifdef CONFIG_XENO_FORTIFY
+
 COBALT_DECL(void, __vsyslog_chk(int priority, int level,
const char *fmt, va_list ap));
-#endif
+
+COBALT_DECL(void, __syslog_chk(int pri, int flag,
+  const char *fmt, ...));
+
+#endif /* CONFIG_XENO_FORTIFY */
 
 #ifdef __cplusplus
 }
diff --git a/lib/cobalt/Makefile.am b/lib/cobalt/Makefile.am
index c408d8e..dbe57e3 100644
--- a/lib/cobalt/Makefile.am
+++ b/lib/cobalt/Makefile.am
@@ -35,9 +35,9 @@ libcobalt_la_SOURCES =\
trace.c \
wrappers.c
 
-libcobalt_la_CPPFLAGS =\
-   @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes\
-   -I$(top_srcdir) \
+libcobalt_la_CPPFLAGS =\
+   @XENO_COBALT_CFLAGS@\
+   -I$(top_srcdir) \
-I$(top_srcdir)/include
 
 install-data-local:
diff --git a/lib/cobalt/Makefile.in b/lib/cobalt/Makefile.in
index 0fd8e86..7198443 100644
--- a/lib/cobalt/Makefile.in
+++ b/lib/cobalt/Makefile.in
@@ -374,8 +374,8 @@ libcobalt_la_SOURCES = \
wrappers.c
 
 libcobalt_la_CPPFLAGS = \
-   @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes\
-   -I$(top_srcdir) \
+   @XENO_COBALT_CFLAGS@  

[Xenomai-git] Philippe Gerum : include/cobalt/uapi/sys: move to include/cobalt/kernel/ uapi

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 714a65100952ac160f0051d940309241e5458050
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=714a65100952ac160f0051d940309241e5458050

Author: Philippe Gerum 
Date:   Thu Jul  4 11:55:43 2013 +0200

include/cobalt/uapi/sys: move to include/cobalt/kernel/uapi

---

 configure  |4 +-
 configure.in   |2 +-
 include/cobalt/kernel/Makefile.am  |1 +
 include/cobalt/kernel/Makefile.in  |  206 
 include/cobalt/kernel/clock.h  |2 +-
 include/cobalt/kernel/heap.h   |4 +-
 include/cobalt/kernel/thread.h |4 +-
 include/cobalt/kernel/trace.h  |2 +-
 .../cobalt/{uapi/sys => kernel/uapi}/Makefile.am   |2 +-
 .../cobalt/{uapi/sys => kernel/uapi}/Makefile.in   |8 +-
 include/cobalt/{uapi/sys => kernel/uapi}/heap.h|6 +-
 include/cobalt/{uapi/sys => kernel/uapi}/synch.h   |8 +-
 include/cobalt/{uapi/sys => kernel/uapi}/thread.h  |8 +-
 include/cobalt/{uapi/sys => kernel/uapi}/trace.h   |6 +-
 include/cobalt/{uapi/sys => kernel/uapi}/types.h   |6 +-
 include/cobalt/{uapi/sys => kernel/uapi}/urw.h |6 +-
 include/cobalt/{uapi/sys => kernel/uapi}/vdso.h|8 +-
 include/cobalt/kernel/vdso.h   |2 +-
 include/cobalt/ticks.h |2 +-
 include/cobalt/uapi/Makefile.am|2 +-
 include/cobalt/uapi/Makefile.in|2 +-
 include/cobalt/uapi/thread.h   |2 +-
 include/copperplate/threadobj.h|2 +-
 include/rtdm/rtipc.h   |2 +-
 lib/cobalt/init.c  |2 +-
 lib/cobalt/internal.h  |4 +-
 lib/cobalt/sem_heap.c  |2 +-
 lib/cobalt/trace.c |2 +-
 testsuite/clocktest/clocktest.c|2 +-
 testsuite/regression/posix/leaks.c |2 +-
 testsuite/unit/check-vdso.c|2 +-
 31 files changed, 221 insertions(+), 92 deletions(-)

diff --git a/configure b/configure
index aafdea1..6439f5f 100755
--- a/configure
+++ b/configure
@@ -14101,7 +14101,7 @@ fi
 
 
 
-ac_config_files="$ac_config_files Makefile config/Makefile scripts/Makefile 
scripts/xeno-config:scripts/xeno-config-$rtcore_type.in scripts/xeno 
lib/Makefile lib/cobalt/Makefile lib/cobalt/sysdeps/Makefile 
lib/cobalt/sysdeps/arm/Makefile lib/cobalt/sysdeps/powerpc/Makefile 
lib/cobalt/sysdeps/blackfin/Makefile lib/cobalt/sysdeps/x86/Makefile 
lib/cobalt/sysdeps/nios2/Makefile lib/cobalt/sysdeps/sh/Makefile 
lib/copperplate/Makefile lib/copperplate/regd/Makefile lib/alchemy/Makefile 
lib/vxworks/Makefile lib/psos/Makefile lib/analogy/Makefile 
lib/include/Makefile testsuite/Makefile testsuite/latency/Makefile 
testsuite/cyclic/Makefile testsuite/switchtest/Makefile 
testsuite/clocktest/Makefile testsuite/unit/Makefile 
testsuite/xeno-test/Makefile testsuite/regression/Makefile 
testsuite/regression/posix/Makefile utils/Makefile utils/can/Makefile 
utils/analogy/Makefile utils/ps/Makefile utils/slackspot/Makefile 
include/Makefile include/nocore/Makefile include/cobalt/uapi/Makefile 
include/coba
 lt/uapi/sys/Makefile include/cobalt/uapi/rtdm/Makefile 
include/cobalt/asm-generic/Makefile include/cobalt/asm-generic/uapi/Makefile 
include/cobalt/asm-generic/ipipe/Makefile include/cobalt/asm-blackfin/Makefile 
include/cobalt/asm-blackfin/uapi/Makefile include/cobalt/asm-x86/Makefile 
include/cobalt/asm-x86/uapi/Makefile include/cobalt/asm-powerpc/Makefile 
include/cobalt/asm-powerpc/uapi/Makefile include/cobalt/asm-arm/Makefile 
include/cobalt/asm-arm/uapi/Makefile include/cobalt/asm-nios2/Makefile 
include/cobalt/asm-nios2/uapi/Makefile include/cobalt/asm-sh/Makefile 
include/cobalt/asm-sh/uapi/Makefile include/cobalt/Makefile 
include/cobalt/sys/Makefile include/cobalt/kernel/Makefile 
include/rtdm/Makefile include/analogy/Makefile include/mercury/Makefile 
include/copperplate/Makefile include/alchemy/Makefile include/vxworks/Makefile 
include/psos/Makefile"
+ac_config_files="$ac_config_files Makefile config/Makefile scripts/Makefile 
scripts/xeno-config:scripts/xeno-config-$rtcore_type.in scripts/xeno 
lib/Makefile lib/cobalt/Makefile lib/cobalt/sysdeps/Makefile 
lib/cobalt/sysdeps/arm/Makefile lib/cobalt/sysdeps/powerpc/Makefile 
lib/cobalt/sysdeps/blackfin/Makefile lib/cobalt/sysdeps/x86/Makefile 
lib/cobalt/sysdeps/nios2/Makefile lib/cobalt/sysdeps/sh/Makefile 
lib/copperplate/Makefile lib/copperplate/regd/Makefile lib/alchemy/Makefile 
lib/vxworks/Makefile lib/psos/Makefile lib/analogy/Makefile 
lib/include/Makefile testsuite/Makefile testsuite/latency/Makefile 
testsuite/cyclic/Makefile testsuite/switch

[Xenomai-git] Philippe Gerum : include/asm-generic/features.h: drop useless indirection file

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: d8966401a46b9f05c00cc21fde876e12e7855d72
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=d8966401a46b9f05c00cc21fde876e12e7855d72

Author: Philippe Gerum 
Date:   Thu Jul  4 09:51:08 2013 +0200

include/asm-generic/features.h: drop useless indirection file

---

 include/cobalt/asm-arm/features.h   |4 ++-
 include/cobalt/asm-arm/uapi/features.h  |2 +
 include/cobalt/asm-blackfin/features.h  |4 ++-
 include/cobalt/asm-blackfin/uapi/features.h |4 ++-
 include/cobalt/asm-generic/Makefile.am  |1 -
 include/cobalt/asm-generic/Makefile.in  |1 -
 include/cobalt/asm-generic/features.h   |   28 ---
 include/cobalt/asm-generic/uapi/features.h  |2 -
 include/cobalt/asm-nios2/features.h |5 +--
 include/cobalt/asm-nios2/uapi/features.h|   10 +++-
 include/cobalt/asm-powerpc/features.h   |4 ++-
 include/cobalt/asm-powerpc/uapi/features.h  |2 +
 include/cobalt/asm-sh/features.h|5 +--
 include/cobalt/asm-sh/uapi/features.h   |   10 +++-
 include/cobalt/asm-x86/features.h   |4 ++-
 include/cobalt/asm-x86/uapi/features.h  |2 +
 16 files changed, 33 insertions(+), 55 deletions(-)

diff --git a/include/cobalt/asm-arm/features.h 
b/include/cobalt/asm-arm/features.h
index a95f293..127f927 100644
--- a/include/cobalt/asm-arm/features.h
+++ b/include/cobalt/asm-arm/features.h
@@ -26,7 +26,9 @@
 #define CONFIG_XENO_ARM_EABI 1
 #endif
 
+struct xnfeatinfo;
+static inline void collect_arch_features(struct xnfeatinfo *p) { }
+
 #include 
-#include 
 
 #endif /* !_COBALT_ASM_ARM_FEATURES_H */
diff --git a/include/cobalt/asm-arm/uapi/features.h 
b/include/cobalt/asm-arm/uapi/features.h
index b1af2cd..686ee93 100644
--- a/include/cobalt/asm-arm/uapi/features.h
+++ b/include/cobalt/asm-arm/uapi/features.h
@@ -38,6 +38,8 @@
 #define XNARCH_HAVE_LLMULSHFT1
 #define XNARCH_HAVE_NODIV_LLIMD  1
 
+struct xnfeatinfo_archdep { /* no arch-specific feature */ };
+
 #include 
 
 static inline const char *get_feature_label(unsigned int feature)
diff --git a/include/cobalt/asm-blackfin/features.h 
b/include/cobalt/asm-blackfin/features.h
index 370005d..8bcdda1 100644
--- a/include/cobalt/asm-blackfin/features.h
+++ b/include/cobalt/asm-blackfin/features.h
@@ -19,7 +19,9 @@
 #ifndef _COBALT_ASM_BLACKFIN_FEATURES_H
 #define _COBALT_ASM_BLACKFIN_FEATURES_H
 
+struct xnfeatinfo;
+static inline void collect_arch_features(struct xnfeatinfo *p) { }
+
 #include 
-#include 
 
 #endif /* !_COBALT_ASM_BLACKFIN_FEATURES_H */
diff --git a/include/cobalt/asm-blackfin/uapi/features.h 
b/include/cobalt/asm-blackfin/uapi/features.h
index 9436371..8f5e5d3 100644
--- a/include/cobalt/asm-blackfin/uapi/features.h
+++ b/include/cobalt/asm-blackfin/uapi/features.h
@@ -28,7 +28,9 @@
 #define XNARCH_HAVE_LLMULSHFT1
 #define XNARCH_HAVE_NODIV_LLIMD  1
 
-#include 
+struct xnfeatinfo_archdep { /* no arch-specific feature */ };
+
+#include 
 
 static inline const char *get_feature_label(unsigned int feature)
 {
diff --git a/include/cobalt/asm-generic/Makefile.am 
b/include/cobalt/asm-generic/Makefile.am
index ab80c4f..913c7a7 100644
--- a/include/cobalt/asm-generic/Makefile.am
+++ b/include/cobalt/asm-generic/Makefile.am
@@ -1,7 +1,6 @@
 includesubdir = $(includedir)/asm-generic
 
 includesub_HEADERS =   \
-   features.h  \
machine.h   \
mayday.h\
pci_ids.h   \
diff --git a/include/cobalt/asm-generic/Makefile.in 
b/include/cobalt/asm-generic/Makefile.in
index 0f3aed5..5ec533d 100644
--- a/include/cobalt/asm-generic/Makefile.in
+++ b/include/cobalt/asm-generic/Makefile.in
@@ -312,7 +312,6 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 includesubdir = $(includedir)/asm-generic
 includesub_HEADERS = \
-   features.h  \
machine.h   \
mayday.h\
pci_ids.h   \
diff --git a/include/cobalt/asm-generic/features.h 
b/include/cobalt/asm-generic/features.h
deleted file mode 100644
index 983c735..000
--- a/include/cobalt/asm-generic/features.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2005 Philippe Gerum .
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
- *   USA; either version 2 of the License, or (at your option) any later
- *   version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple

[Xenomai-git] Philippe Gerum : include/cobalt: do not export kernel-only headers

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: e240f78fdb69a19a8140b327adaa369215d4cfc1
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=e240f78fdb69a19a8140b327adaa369215d4cfc1

Author: Philippe Gerum 
Date:   Thu Jul  4 12:04:24 2013 +0200

include/cobalt: do not export kernel-only headers

---

 include/cobalt/asm-arm/Makefile.am   |3 +-
 include/cobalt/asm-arm/Makefile.in   |   76 -
 include/cobalt/asm-blackfin/Makefile.am  |3 +-
 include/cobalt/asm-blackfin/Makefile.in  |   76 -
 include/cobalt/asm-generic/Makefile.am   |3 +-
 include/cobalt/asm-generic/Makefile.in   |   76 -
 include/cobalt/asm-generic/ipipe/Makefile.am |3 +-
 include/cobalt/asm-generic/ipipe/Makefile.in |   78 --
 include/cobalt/asm-nios2/Makefile.am |3 +-
 include/cobalt/asm-nios2/Makefile.in |   78 --
 include/cobalt/asm-powerpc/Makefile.am   |3 +-
 include/cobalt/asm-powerpc/Makefile.in   |   76 -
 include/cobalt/asm-powerpc/uapi/Makefile.am  |3 +-
 include/cobalt/asm-powerpc/uapi/Makefile.in  |3 +-
 include/cobalt/asm-sh/Makefile.am|3 +-
 include/cobalt/asm-sh/Makefile.in|   76 -
 include/cobalt/asm-x86/Makefile.am   |3 +-
 include/cobalt/asm-x86/Makefile.in   |   76 -
 18 files changed, 100 insertions(+), 542 deletions(-)

diff --git a/include/cobalt/asm-arm/Makefile.am 
b/include/cobalt/asm-arm/Makefile.am
index 2635e3c..d0cb931 100644
--- a/include/cobalt/asm-arm/Makefile.am
+++ b/include/cobalt/asm-arm/Makefile.am
@@ -1,6 +1,5 @@
-includesubdir = $(includedir)/asm-arm
 
-includesub_HEADERS =   \
+noinst_HEADERS =   \
calibration.h   \
features.h  \
fptest.h\
diff --git a/include/cobalt/asm-arm/Makefile.in 
b/include/cobalt/asm-arm/Makefile.in
index 7377a2a..09a03e5 100644
--- a/include/cobalt/asm-arm/Makefile.in
+++ b/include/cobalt/asm-arm/Makefile.in
@@ -52,7 +52,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 subdir = include/cobalt/asm-arm
-DIST_COMMON = $(includesub_HEADERS) $(srcdir)/Makefile.am \
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_cc_for_build.m4 \
@@ -83,35 +83,7 @@ am__can_run_installinfo = \
 n|no|NO) false;; \
 *) (install-info --version) >/dev/null 2>&1;; \
   esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-*) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-if (++n[$$2] == $(am__install_max)) \
-  { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(includesubdir)"
-HEADERS = $(includesub_HEADERS)
+HEADERS = $(noinst_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive\
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@@ -310,8 +282,7 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-includesubdir = $(includedir)/asm-arm
-includesub_HEADERS = \
+noinst_HEADERS = \
calibration.h   \
features.h  \
fptest.h\
@@ -360,27 +331,6 @@ mostlyclean-libtool:
 
 clean-libtool:
-rm -rf .libs _libs
-install-includesubHEADERS: $(includesub_HEADERS)
-   @$(NORMAL_INSTALL)
-   @list='$(includesub_HEADERS)'; test -n "$(includesubdir)" || list=; \
-   if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(includesubdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(includesubdir)" || exit 1; \
-   fi; \
-   for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-

[Xenomai-git] Philippe Gerum : cobalt: formally disconnect user-space from kernel headers

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 35e291db9ba97be1f19bcf576580f9062d2c9ea0
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=35e291db9ba97be1f19bcf576580f9062d2c9ea0

Author: Philippe Gerum 
Date:   Fri Jul  5 09:52:21 2013 +0200

cobalt: formally disconnect user-space from kernel headers

As a consequence of this change, only few low-level headers are still
part of the target installation. Others remain private to the kernel
and/or lib/cobalt.

---

 Makefile.in|4 +-
 config/Makefile.in |2 +-
 configure  |  111 +---
 configure.in   |   65 +-
 doc/Makefile.in|2 +-
 doc/asciidoc/Makefile.in   |2 +-
 doc/docbook/Makefile.in|2 +-
 doc/docbook/custom-stylesheets/Makefile.in |2 +-
 doc/docbook/custom-stylesheets/xsl/Makefile.in |2 +-
 .../custom-stylesheets/xsl/common/Makefile.in  |2 +-
 doc/docbook/custom-stylesheets/xsl/fo/Makefile.in  |2 +-
 .../custom-stylesheets/xsl/html/Makefile.in|2 +-
 doc/doxygen/Makefile.in|2 +-
 doc/man/Makefile.in|2 +-
 doc/txt/Makefile.in|2 +-
 include/Makefile.am|   21 -
 include/Makefile.in|   87 ++--
 include/alchemy/Makefile.in|2 +-
 include/analogy/Makefile.in|2 +-
 include/cobalt/Makefile.am |7 -
 include/cobalt/Makefile.in |9 +-
 include/cobalt/arith.h |2 +-
 include/cobalt/asm-arm/Makefile.am |   11 -
 include/cobalt/asm-arm/uapi/Makefile.am|8 -
 include/cobalt/asm-arm/uapi/Makefile.in|  562 ---
 include/cobalt/asm-blackfin/Makefile.am|   11 -
 include/cobalt/asm-blackfin/Makefile.in|  638 -
 include/cobalt/asm-blackfin/uapi/Makefile.am   |7 -
 include/cobalt/asm-generic/Makefile.am |   10 -
 include/cobalt/asm-generic/ipipe/Makefile.am   |3 -
 include/cobalt/asm-generic/uapi/Makefile.am|6 -
 include/cobalt/asm-nios2/Makefile.am   |9 -
 include/cobalt/asm-nios2/Makefile.in   |  510 --
 include/cobalt/asm-nios2/uapi/Makefile.am  |7 -
 include/cobalt/asm-powerpc/Makefile.am |   11 -
 include/cobalt/asm-powerpc/Makefile.in |  638 -
 include/cobalt/asm-powerpc/uapi/Makefile.am|7 -
 include/cobalt/asm-sh/Makefile.am  |   11 -
 include/cobalt/asm-sh/uapi/Makefile.am |7 -
 include/cobalt/asm-sh/uapi/Makefile.in |  561 ---
 include/cobalt/asm-x86/Makefile.am |   12 -
 include/cobalt/asm-x86/uapi/Makefile.am|7 -
 include/cobalt/asm-x86/uapi/Makefile.in|  561 ---
 include/cobalt/kernel/Makefile.am  |2 -
 include/cobalt/kernel/Makefile.in  |  208 ++-
 include/cobalt/kernel/clock.h  |2 +-
 include/cobalt/kernel/heap.h   |4 +-
 include/cobalt/kernel/thread.h |4 +-
 include/cobalt/kernel/trace.h  |2 +-
 include/cobalt/kernel/vdso.h   |2 +-
 include/cobalt/sys/Makefile.in |2 +-
 include/cobalt/ticks.h |2 +-
 include/cobalt/uapi/Makefile.am|2 +-
 include/cobalt/uapi/Makefile.in|4 +-
 include/cobalt/uapi/asm-generic/Makefile.am|5 +
 .../ipipe => uapi/asm-generic}/Makefile.in |   12 +-
 .../{asm-generic/uapi => uapi/asm-generic}/arith.h |6 +-
 .../uapi => uapi/asm-generic}/features.h   |6 +-
 .../uapi => uapi/asm-generic}/syscall.h|   26 +-
 .../{kernel/uapi => uapi/kernel}/Makefile.am   |2 +-
 .../{kernel/uapi => uapi/kernel}/Makefile.in   |   10 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/heap.h |6 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/synch.h|8 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/thread.h   |8 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/trace.h|6 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/types.h|6 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/urw.h  |6 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/vdso.h |8 +-
 include/cobalt/uapi/rtdm/Makefile.in   |2 +-
 include/cobalt/uapi/signal.h   |   22 +
 include/cobalt/uapi/syscall.h  |2 +-
 include/cobalt/uapi/thread.h

[Xenomai-git] Philippe Gerum : cobalt: move arithmetic helpers to the uapi section

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: f4bd40451f6927c75b1b75f37bd7d32da6198a69
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=f4bd40451f6927c75b1b75f37bd7d32da6198a69

Author: Philippe Gerum 
Date:   Thu Jul  4 09:16:46 2013 +0200

cobalt: move arithmetic helpers to the uapi section

---

 include/cobalt/Makefile.am |1 +
 include/cobalt/Makefile.in |1 +
 include/cobalt/arith.h |   45 +
 include/cobalt/asm-arm/Makefile.am |1 -
 include/cobalt/asm-arm/Makefile.in |1 -
 include/cobalt/asm-arm/uapi/Makefile.am|1 +
 include/cobalt/asm-arm/uapi/Makefile.in|1 +
 include/cobalt/asm-arm/{ => uapi}/arith.h  |8 +-
 include/cobalt/asm-blackfin/Makefile.am|1 -
 include/cobalt/asm-blackfin/Makefile.in|1 -
 include/cobalt/asm-blackfin/uapi/Makefile.am   |1 +
 include/cobalt/asm-blackfin/uapi/Makefile.in   |1 +
 include/cobalt/asm-blackfin/{ => uapi}/arith.h |8 +-
 include/cobalt/asm-generic/Makefile.am |1 -
 include/cobalt/asm-generic/Makefile.in |1 -
 include/cobalt/asm-generic/uapi/Makefile.am|1 +
 include/cobalt/asm-generic/uapi/Makefile.in|1 +
 include/cobalt/asm-generic/{ => uapi}/arith.h  |  222 +++-
 include/cobalt/asm-generic/uapi/features.h |1 -
 include/cobalt/asm-nios2/Makefile.am   |1 -
 include/cobalt/asm-nios2/Makefile.in   |1 -
 include/cobalt/asm-nios2/uapi/Makefile.am  |1 +
 include/cobalt/asm-nios2/uapi/Makefile.in  |1 +
 include/cobalt/asm-nios2/{ => uapi}/arith.h|8 +-
 include/cobalt/asm-powerpc/Makefile.am |1 -
 include/cobalt/asm-powerpc/Makefile.in |1 -
 include/cobalt/asm-powerpc/uapi/Makefile.am|1 +
 include/cobalt/asm-powerpc/uapi/Makefile.in|1 +
 include/cobalt/asm-powerpc/{ => uapi}/arith.h  |9 +-
 include/cobalt/asm-sh/Makefile.am  |1 -
 include/cobalt/asm-sh/Makefile.in  |1 -
 include/cobalt/asm-sh/uapi/Makefile.am |1 +
 include/cobalt/asm-sh/uapi/Makefile.in |1 +
 include/cobalt/asm-sh/{ => uapi}/arith.h   |9 +-
 include/cobalt/asm-x86/Makefile.am |1 -
 include/cobalt/asm-x86/Makefile.in |1 -
 include/cobalt/asm-x86/uapi/Makefile.am|1 +
 include/cobalt/asm-x86/uapi/Makefile.in|1 +
 include/cobalt/asm-x86/{ => uapi}/arith.h  |   10 +-
 include/cobalt/kernel/Makefile.am  |1 +
 include/cobalt/kernel/Makefile.in  |1 +
 include/cobalt/kernel/arith.h  |   35 
 kernel/cobalt/arch/arm/machine.c   |2 +-
 kernel/cobalt/arch/x86/machine.c   |2 +-
 kernel/cobalt/clock.c  |2 +-
 kernel/cobalt/posix/clock.c|1 -
 kernel/cobalt/posix/internal.h |2 +-
 kernel/cobalt/sched.c  |2 +-
 kernel/cobalt/timer.c  |2 +-
 kernel/drivers/ipc/internal.h  |2 +-
 kernel/drivers/testing/timerbench.c|5 +-
 lib/cobalt/sysdeps/blackfin/Makefile.am|6 +-
 lib/cobalt/sysdeps/blackfin/Makefile.in|7 +-
 lib/cobalt/sysdeps/blackfin/features.h |   25 +++
 lib/cobalt/sysdeps/nios2/Makefile.am   |6 +-
 lib/cobalt/sysdeps/nios2/Makefile.in   |7 +-
 lib/cobalt/sysdeps/nios2/features.h|   25 +++
 lib/cobalt/sysdeps/powerpc/Makefile.am |6 +-
 lib/cobalt/sysdeps/powerpc/Makefile.in |7 +-
 lib/cobalt/sysdeps/powerpc/features.h  |   25 +++
 lib/cobalt/sysdeps/sh/Makefile.am  |6 +-
 lib/cobalt/sysdeps/sh/Makefile.in  |7 +-
 lib/cobalt/sysdeps/sh/features.h   |   25 +++
 lib/cobalt/sysdeps/x86/Makefile.am |6 +-
 lib/cobalt/sysdeps/x86/Makefile.in |7 +-
 lib/cobalt/sysdeps/x86/features.h  |   25 +++
 lib/cobalt/ticks.c |2 +-
 lib/copperplate/clockobj.c |2 +-
 testsuite/unit/arith-noinline.c|2 +-
 testsuite/unit/arith.c |2 +-
 70 files changed, 413 insertions(+), 192 deletions(-)

diff --git a/include/cobalt/Makefile.am b/include/cobalt/Makefile.am
index cece4eb..23afa9f 100644
--- a/include/cobalt/Makefile.am
+++ b/include/cobalt/Makefile.am
@@ -1,6 +1,7 @@
 includesubdir = $(includedir)/cobalt
 
 includesub_HEADERS =   \
+   arith.h \
core.h  \
fcntl.h \
mqueue.h\
diff --git a/include/cobalt/Makefile.in b/include/cobalt/Makefile.in
index 57ed864..81131d0 100644
--- a/include/cobalt/Makefile.in
+++ b/include/cobalt/Makefile.in
@@ -312,6 +312,7 @@ top_builddir = @top_builddir@
 top_sr

[Xenomai-git] Philippe Gerum : include: fixup irregular headers

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: d93c065c6c5cc13496eeef9aa7c14c80daec47c2
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=d93c065c6c5cc13496eeef9aa7c14c80daec47c2

Author: Philippe Gerum 
Date:   Thu Jul  4 10:26:30 2013 +0200

include: fixup irregular headers

---

 include/cobalt/asm-arm/calibration.h   |5 +-
 include/cobalt/asm-arm/features.h  |4 +
 include/cobalt/asm-arm/fptest.h|   18 
 include/cobalt/asm-arm/machine.h   |1 -
 include/cobalt/asm-arm/syscall.h   |4 +
 include/cobalt/asm-arm/thread.h|5 +-
 include/cobalt/asm-arm/uapi/tsc.h  |1 -
 include/cobalt/asm-arm/wrappers.h  |1 -
 include/cobalt/asm-blackfin/calibration.h  |5 +-
 include/cobalt/asm-blackfin/features.h |4 +
 include/cobalt/asm-blackfin/fptest.h   |   18 
 include/cobalt/asm-blackfin/machine.h  |5 +-
 include/cobalt/asm-blackfin/syscall.h  |5 +-
 include/cobalt/asm-blackfin/thread.h   |5 +-
 include/cobalt/asm-blackfin/uapi/arith.h   |   24 +++---
 include/cobalt/asm-blackfin/wrappers.h |1 -
 include/cobalt/asm-generic/ipipe/thread_info.h |2 +-
 include/cobalt/asm-generic/machine.h   |3 +-
 include/cobalt/asm-generic/mayday.h|5 +-
 include/cobalt/asm-generic/pci_ids.h   |   18 
 include/cobalt/asm-generic/syscall.h   |5 +-
 include/cobalt/asm-generic/thread.h|1 -
 include/cobalt/asm-generic/wrappers.h  |3 -
 include/cobalt/asm-nios2/calibration.h |5 +-
 include/cobalt/asm-nios2/features.h|4 +
 include/cobalt/asm-nios2/fptest.h  |   18 
 include/cobalt/asm-nios2/machine.h |1 -
 include/cobalt/asm-nios2/syscall.h |5 +-
 include/cobalt/asm-nios2/thread.h  |5 +-
 include/cobalt/asm-nios2/uapi/arith.h  |   24 +++---
 include/cobalt/asm-nios2/wrappers.h|1 -
 include/cobalt/asm-powerpc/calibration.h   |5 +-
 include/cobalt/asm-powerpc/features.h  |4 +
 include/cobalt/asm-powerpc/fptest.h|   18 
 include/cobalt/asm-powerpc/machine.h   |9 +-
 include/cobalt/asm-powerpc/syscall.h   |5 +-
 include/cobalt/asm-powerpc/thread.h|5 +-
 include/cobalt/asm-powerpc/uapi/features.h |1 -
 include/cobalt/asm-powerpc/wrappers.h  |1 -
 include/cobalt/asm-sh/calibration.h|7 +-
 include/cobalt/asm-sh/features.h   |4 +
 include/cobalt/asm-sh/fptest.h |   18 
 include/cobalt/asm-sh/machine.h|1 -
 include/cobalt/asm-sh/switch.h |  105 
 include/cobalt/asm-sh/syscall.h|4 +
 include/cobalt/asm-sh/thread.h |5 +-
 include/cobalt/asm-sh/uapi/arith.h |   23 +++---
 include/cobalt/asm-sh/uapi/features.h  |1 -
 include/cobalt/asm-sh/wrappers.h   |1 -
 include/cobalt/asm-x86/calibration.h   |5 +-
 include/cobalt/asm-x86/features.h  |4 +
 include/cobalt/asm-x86/fptest.h|   18 
 include/cobalt/asm-x86/machine.h   |1 -
 include/cobalt/asm-x86/smi.h   |3 +-
 include/cobalt/asm-x86/switch.h|5 -
 include/cobalt/asm-x86/syscall.h   |4 +
 include/cobalt/asm-x86/thread.h|5 +-
 include/cobalt/asm-x86/uapi/arith.h|   27 +++
 include/cobalt/asm-x86/wrappers.h  |1 -
 include/cobalt/kernel/arith.h  |2 +-
 include/cobalt/kernel/registry.h   |2 +-
 include/cobalt/kernel/vfile.h  |2 +-
 include/cobalt/uapi/rtdm/syscall.h |   22 +++---
 include/rtdm/rtipc.h   |2 +-
 include/version.h  |   24 +++---
 65 files changed, 313 insertions(+), 237 deletions(-)

diff --git a/include/cobalt/asm-arm/calibration.h 
b/include/cobalt/asm-arm/calibration.h
index 121ebf4..78a4331 100644
--- a/include/cobalt/asm-arm/calibration.h
+++ b/include/cobalt/asm-arm/calibration.h
@@ -19,10 +19,13 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  * 02111-1307, USA.
  */
-
 #ifndef _COBALT_ASM_ARM_CALIBRATION_H
 #define _COBALT_ASM_ARM_CALIBRATION_H
 
+#ifndef __KERNEL__
+#error "Pure kernel header included from user-space!"
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
 extern unsigned omap_rev(void);
 #define cpu_is_omap44xx() ((omap_rev() & 0xff) == 0x44)
diff --git a/include/cobalt/asm-arm/features.h 
b/include/cobalt/asm-arm/features.h
index 127f927..da6fc64 100644
--- a/include/cobalt/asm-arm/features.h
+++ b/include/cobalt/asm-arm/features.h
@@ -22,6 +22,10 @@
 #ifndef _C

[Xenomai-git] Philippe Gerum : include/asm-generic/stack.h: stack-related helpers belong to userland

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: a2ea259396c85cefd7aca10759f8b50530ba7613
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=a2ea259396c85cefd7aca10759f8b50530ba7613

Author: Philippe Gerum 
Date:   Wed Jul  3 16:09:33 2013 +0200

include/asm-generic/stack.h: stack-related helpers belong to userland

---

 include/cobalt/asm-generic/Makefile.am |1 -
 include/cobalt/asm-generic/Makefile.in |1 -
 include/cobalt/asm-generic/stack.h |   34 
 lib/cobalt/init.c  |   15 ++---
 lib/cobalt/internal.c  |   18 
 lib/cobalt/internal.h  |5 +++-
 lib/cobalt/printf.c|1 -
 lib/cobalt/thread.c|   13 +--
 testsuite/cyclic/cyclictest.c  |2 +-
 testsuite/switchtest/Makefile.am   |6 ++--
 testsuite/switchtest/Makefile.in   |4 +-
 testsuite/switchtest/switchtest.c  |   13 ++-
 testsuite/unit/cond-torture.c  |4 +-
 testsuite/unit/mutex-torture.c |8 ++
 testsuite/unit/sched-tp.c  |3 +-
 15 files changed, 51 insertions(+), 77 deletions(-)

diff --git a/include/cobalt/asm-generic/Makefile.am 
b/include/cobalt/asm-generic/Makefile.am
index cff1c94..4a57452 100644
--- a/include/cobalt/asm-generic/Makefile.am
+++ b/include/cobalt/asm-generic/Makefile.am
@@ -6,7 +6,6 @@ includesub_HEADERS =\
machine.h   \
mayday.h\
pci_ids.h   \
-   stack.h \
syscall.h   \
thread.h\
wrappers.h
diff --git a/include/cobalt/asm-generic/Makefile.in 
b/include/cobalt/asm-generic/Makefile.in
index 7655bb6..2fdc584 100644
--- a/include/cobalt/asm-generic/Makefile.in
+++ b/include/cobalt/asm-generic/Makefile.in
@@ -317,7 +317,6 @@ includesub_HEADERS = \
machine.h   \
mayday.h\
pci_ids.h   \
-   stack.h \
syscall.h   \
thread.h\
wrappers.h
diff --git a/include/cobalt/asm-generic/stack.h 
b/include/cobalt/asm-generic/stack.h
deleted file mode 100644
index f863df6..000
--- a/include/cobalt/asm-generic/stack.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef STACKSIZE_H
-#define STACKSIZE_H
-
-#include 
-#include 
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-static inline unsigned cobalt_get_stacksize(unsigned size)
-{
-   static const unsigned default_size = __WORDSIZE * 1024;
-   static unsigned min_size;
-   if (!min_size)
-   min_size = PTHREAD_STACK_MIN + getpagesize();
-
-   if (!size)
-   size = default_size;
-   if (size < min_size)
-   size = min_size;
-
-   return size;
-}
-
-void cobalt_prefault_stack(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* STACKSIZE_H */
diff --git a/lib/cobalt/init.c b/lib/cobalt/init.c
index 66c075d..f13f7e7 100644
--- a/lib/cobalt/init.c
+++ b/lib/cobalt/init.c
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -38,14 +37,14 @@ int __cobalt_muxid = -1;
 
 struct sigaction __cobalt_orig_sigdebug;
 
+pthread_t __cobalt_main_tid;
+
 int __rtdm_muxid = -1;
 
 int __rtdm_fd_start = INT_MAX;
 
 static int fork_handler_registered;
 
-static pthread_t main_tid;
-
 static void sigill_handler(int sig)
 {
const char m[] = "Xenomai disabled in kernel?\n";
@@ -53,14 +52,6 @@ static void sigill_handler(int sig)
exit(EXIT_FAILURE);
 }
 
-void cobalt_prefault_stack(void)
-{
-   if (pthread_self() == main_tid) {
-   char stk[cobalt_get_stacksize(1)];
-   stk[0] = stk[sizeof(stk) - 1] = 0xA5;
-   }
-}
-
 static int bind_interface(void)
 {
sighandler_t old_sigill_handler;
@@ -124,7 +115,7 @@ static int bind_interface(void)
 
cobalt_init_current_keys();
 
-   main_tid = pthread_self();
+   __cobalt_main_tid = pthread_self();
 
cobalt_ticks_init(sysinfo.clockfreq);
 
diff --git a/lib/cobalt/internal.c b/lib/cobalt/internal.c
index c9b1bdd..5b2513f 100644
--- a/lib/cobalt/internal.c
+++ b/lib/cobalt/internal.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -59,6 +60,23 @@ void ___cobalt_prefault(void *p, size_t len)
} while (_p < end);
 }
 
+size_t cobalt_get_stacksize(size_t size)
+{
+   static const size_t default_size = PTHREAD_STACK_MIN * 4;
+   static size_t min_size;
+
+   if (min_size == 0)
+   min_size = PTHREAD_STACK_MIN + getpagesize();
+
+   if (size == 0)
+   size = default_size;
+
+   if (size < min_size)
+   size = min_size;
+
+   return size;
+}
+
 static inline
 struct cobalt_monitor_data *get_monitor_data(cobalt_monitor_t *mon)
 {
diff --git a/lib/cobalt/internal.h b/lib/cobalt/internal.h
index eec4f91..b7534ad 10064

[Xenomai-git] Philippe Gerum : copperplate: rebase atomic ops over nocore/atomic.h

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 795398b953bd9aa0ba3d22285a57ca8bbb5b5a7f
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=795398b953bd9aa0ba3d22285a57ca8bbb5b5a7f

Author: Philippe Gerum 
Date:   Sat Jul  6 17:29:15 2013 +0200

copperplate: rebase atomic ops over nocore/atomic.h

---

 include/copperplate/lock.h |   13 +
 include/nocore/atomic.h|   28 +++-
 2 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/include/copperplate/lock.h b/include/copperplate/lock.h
index 7f1013c..60a1dac 100644
--- a/include/copperplate/lock.h
+++ b/include/copperplate/lock.h
@@ -20,6 +20,7 @@
 #define _COPPERPLATE_LOCK_H
 
 #include 
+#include 
 #include 
 #include 
 
@@ -204,18 +205,6 @@ int __check_cancel_type(const char *locktype);
 #define read_unlock_safe(__lock, __state)  \
__do_unlock_safe(__lock, __state)
 
-#define barrier()  __asm__ __volatile__("": : :"memory")
-#define membar()   __sync_synchronize()
-#ifdef CONFIG_SMP
-#define smp_membar()   membar()
-#else
-#define smp_membar()   do { } while (0)
-#endif
-
-#define atomic_sub_fetch(v, n) __sync_sub_and_fetch(&(v), n)
-#define atomic_add_fetch(v, n) __sync_add_and_fetch(&(v), n)
-#define atomic_cmp_swap(ptr, old, new)  __sync_val_compare_and_swap(ptr, old, 
new)
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/include/nocore/atomic.h b/include/nocore/atomic.h
index 8cd236a..d4101c9 100644
--- a/include/nocore/atomic.h
+++ b/include/nocore/atomic.h
@@ -44,18 +44,36 @@ typedef struct {
(typeof((p)->v))(n))
 #endif
 
-#ifndef smp_mb
-#define smp_mb() __sync_synchronize()
+#ifndef atomic_sub_fetch
+#define atomic_sub_fetch(v, n) _sync_sub_and_fetch(&(v), n)
 #endif
 
-#ifndef smp_rmb
-#define smp_rmb() __sync_synchronize()
+#ifndef atomic_add_fetch
+#define atomic_add_fetch(v, n) __sync_add_and_fetch(&(v), n)
 #endif
 
+#ifndef atomic_cmp_swap
+#define atomic_cmp_swap(ptr, old, new)  __sync_val_compare_and_swap(ptr, old, 
new)
+#endif
+
+#ifdef CONFIG_SMP
+#ifndef smp_mb
+#define smp_mb()   __sync_synchronize()
+#endif
+#ifndef smp_rmb
+#define smp_rmb()  smp_mb()
+#endif
 #ifndef smp_wmb
-#define smp_wmb() __sync_synchronize()
+#define smp_wmb()  smp_mb()
 #endif
+#else  /* !CONFIG_SMP */
+#define smp_mb()   do { } while (0)
+#define smp_rmb()  do { } while (0)
+#define smp_wmb()  do { } while (0)
+#endif /* !CONFIG_SMP */
 
 #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
 
+#define barrier()  __asm__ __volatile__("": : :"memory")
+
 #endif /* _NOCORE_ATOMIC_H */


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


[Xenomai-git] Philippe Gerum : cobalt/posix/thread: drop .fp support flag

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: becce9f3ea307a363f9d563e808c5ed869ae6670
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=becce9f3ea307a363f9d563e808c5ed869ae6670

Author: Philippe Gerum 
Date:   Sat Jul  6 16:44:53 2013 +0200

cobalt/posix/thread: drop .fp support flag

FPU support is always available to Cobalt threads which are user-space
only.

---

 kernel/cobalt/posix/thread.c |   14 +++---
 kernel/cobalt/posix/thread.h |1 -
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c
index 7ed80da..27641c1 100644
--- a/kernel/cobalt/posix/thread.c
+++ b/kernel/cobalt/posix/thread.c
@@ -45,7 +45,6 @@ static const pthread_attr_t default_thread_attr = {
.sched_priority = 0
},
.name = NULL,
-   .fp = 1,
.affinity = XNPOD_ALL_CPUS,
 };
 
@@ -345,9 +344,8 @@ static inline int pthread_create(pthread_t *tid, const 
pthread_attr_t *attr)
struct xnsched_class *sched_class;
union xnsched_policy_param param;
struct xnthread_init_attr iattr;
-   int prio, ret, pol, flags = 0;
pthread_t thread, cur;
-   const char *name;
+   int prio, ret, pol;
spl_t s;
 
if (attr && attr->magic != COBALT_THREAD_ATTR_MAGIC)
@@ -385,14 +383,9 @@ static inline int pthread_create(pthread_t *tid, const 
pthread_attr_t *attr)
prio = -prio;
pol = SCHED_WEAK;
}
-   name = thread->attr.name;
-   flags |= XNUSER;
 
-   if (thread->attr.fp)
-   flags |= XNFPU;
-
-   iattr.name = name;
-   iattr.flags = flags;
+   iattr.name = thread->attr.name;
+   iattr.flags = XNUSER|XNFPU;
iattr.personality = &cobalt_personality;
 
/*
@@ -834,7 +827,6 @@ int cobalt_thread_create(unsigned long tid, int policy,
attr.policy = policy;
attr.detachstate = PTHREAD_CREATE_DETACHED;
attr.schedparam_ex = param;
-   attr.fp = 1;
attr.name = p->comm;
 
ret = pthread_create(&pthread, &attr);
diff --git a/kernel/cobalt/posix/thread.h b/kernel/cobalt/posix/thread.h
index b4963e8..791f694 100644
--- a/kernel/cobalt/posix/thread.h
+++ b/kernel/cobalt/posix/thread.h
@@ -55,7 +55,6 @@ typedef struct cobalt_threadattr {
/* Non portable */
struct sched_param_ex schedparam_ex;
char *name;
-   int fp;
cpumask_t affinity;
 
 } pthread_attr_t;


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


[Xenomai-git] Philippe Gerum : cobalt/shadow, blackfin: drop rescheduling check in head syscall handler

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: fa8cfedf8dcf08585e3cb54e6a0643b8b3fd0cec
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=fa8cfedf8dcf08585e3cb54e6a0643b8b3fd0cec

Author: Philippe Gerum 
Date:   Sat Jul  6 17:09:20 2013 +0200

cobalt/shadow, blackfin: drop rescheduling check in head syscall handler

Only blackfin may have deferred rescheduling, which is already
performed via the arch-specific IRQ tail hook, prior to running the
Xenomai syscall handler. We don't have to duplicate this.

At this chance, Blackfin's deferred rescheduling hook is made private
to the machine support code.

---

 .../arch/blackfin/include/asm/xenomai/thread.h |8 
 kernel/cobalt/arch/blackfin/machine.c  |9 +++--
 .../cobalt/include/asm-generic/xenomai/syscall.h   |4 
 kernel/cobalt/pod.c|6 --
 kernel/cobalt/shadow.c |2 --
 5 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h 
b/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
index 5bb6ae4..302675a 100644
--- a/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
+++ b/kernel/cobalt/arch/blackfin/include/asm/xenomai/thread.h
@@ -50,14 +50,6 @@ struct xnarchtcb {
 
 #define xnarch_fault_notify(d) (!xnarch_fault_bp_p(d))
 
-#define __xnarch_head_syscall_entry()  \
-   do  {   \
-   if (xnsched_resched_p(xnpod_current_sched()))   \
-   xnpod_schedule();   \
-   } while(0)
-
-#define xnarch_head_syscall_entry  __xnarch_head_syscall_entry
-
 void xnarch_switch_to(struct xnarchtcb *out_tcb, struct xnarchtcb *in_tcb);
 
 int xnarch_escalate(void);
diff --git a/kernel/cobalt/arch/blackfin/machine.c 
b/kernel/cobalt/arch/blackfin/machine.c
index e48b8c4..ef279d6 100644
--- a/kernel/cobalt/arch/blackfin/machine.c
+++ b/kernel/cobalt/arch/blackfin/machine.c
@@ -18,6 +18,7 @@
  *   02111-1307, USA.
  */
 #include 
+#include 
 #include 
 
 static unsigned long mach_blackfin_calibrate(void)
@@ -25,11 +26,15 @@ static unsigned long mach_blackfin_calibrate(void)
return 20;  /* 20 clock cycles */
 }
 
-void xnpod_schedule_deferred(void);
+static void schedule_deferred(void)
+{
+   if (xnpod_active_p())
+   xnpod_schedule();
+}
 
 static int mach_blackfin_init(void)
 {
-   __ipipe_irq_tail_hook = (unsigned long)xnpod_schedule_deferred;
+   __ipipe_irq_tail_hook = (unsigned long)schedule_deferred;
 
return 0;
 }
diff --git a/kernel/cobalt/include/asm-generic/xenomai/syscall.h 
b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
index ba4a2a5..4f2b22d 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/syscall.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
@@ -122,8 +122,4 @@ static inline int __xn_safe_strncpy_from_user(char *dst,
return __xn_strncpy_from_user(dst, src, count);
 }
 
-#ifndef xnarch_head_syscall_entry
-static inline void xnarch_head_syscall_entry(void) { }
-#endif
-
 #endif /* !_COBALT_ASM_GENERIC_SYSCALL_H */
diff --git a/kernel/cobalt/pod.c b/kernel/cobalt/pod.c
index 153bf8d..78f14c4 100644
--- a/kernel/cobalt/pod.c
+++ b/kernel/cobalt/pod.c
@@ -216,12 +216,6 @@ void __xnpod_schedule_handler(void) /* hw interrupts off. 
*/
xnpod_schedule();
 }
 
-void xnpod_schedule_deferred(void)
-{
-   if (xnpod_active_p())
-   xnpod_schedule();
-}
-
 static void xnpod_flush_heap(struct xnheap *heap,
 void *extaddr, unsigned long extsize, void *cookie)
 {
diff --git a/kernel/cobalt/shadow.c b/kernel/cobalt/shadow.c
index ca0d00f..c53d1a2 100644
--- a/kernel/cobalt/shadow.c
+++ b/kernel/cobalt/shadow.c
@@ -1869,8 +1869,6 @@ static int handle_head_syscall(struct ipipe_domain *ipd, 
struct pt_regs *regs)
if (!xnpod_active_p())
goto no_personality;
 
-   xnarch_head_syscall_entry();
-
thread = xnshadow_current();
if (thread)
thread->regs = regs;


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


[Xenomai-git] Philippe Gerum : cobalt: formally disconnect user-space from kernel headers

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 1b79ce103f4f718443938d6358485d00a58fb2e9
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=1b79ce103f4f718443938d6358485d00a58fb2e9

Author: Philippe Gerum 
Date:   Fri Jul  5 09:52:21 2013 +0200

cobalt: formally disconnect user-space from kernel headers

As a consequence of this change, only few low-level headers are still
part of the target installation. Others remain private to the kernel
and/or lib/cobalt.

---

 Makefile.in|4 +-
 config/Makefile.in |2 +-
 configure  |  111 +---
 configure.in   |   65 +-
 doc/Makefile.in|2 +-
 doc/asciidoc/Makefile.in   |2 +-
 doc/docbook/Makefile.in|2 +-
 doc/docbook/custom-stylesheets/Makefile.in |2 +-
 doc/docbook/custom-stylesheets/xsl/Makefile.in |2 +-
 .../custom-stylesheets/xsl/common/Makefile.in  |2 +-
 doc/docbook/custom-stylesheets/xsl/fo/Makefile.in  |2 +-
 .../custom-stylesheets/xsl/html/Makefile.in|2 +-
 doc/doxygen/Makefile.in|2 +-
 doc/man/Makefile.in|2 +-
 doc/txt/Makefile.in|2 +-
 include/Makefile.am|   21 -
 include/Makefile.in|   87 ++--
 include/alchemy/Makefile.in|2 +-
 include/analogy/Makefile.in|2 +-
 include/cobalt/Makefile.am |7 -
 include/cobalt/Makefile.in |9 +-
 include/cobalt/arith.h |2 +-
 include/cobalt/asm-arm/Makefile.am |   11 -
 include/cobalt/asm-arm/uapi/Makefile.am|8 -
 include/cobalt/asm-arm/uapi/Makefile.in|  562 ---
 include/cobalt/asm-blackfin/Makefile.am|   11 -
 include/cobalt/asm-blackfin/Makefile.in|  638 -
 include/cobalt/asm-blackfin/uapi/Makefile.am   |7 -
 include/cobalt/asm-generic/Makefile.am |   10 -
 include/cobalt/asm-generic/ipipe/Makefile.am   |3 -
 include/cobalt/asm-generic/uapi/Makefile.am|6 -
 include/cobalt/asm-nios2/Makefile.am   |9 -
 include/cobalt/asm-nios2/Makefile.in   |  510 --
 include/cobalt/asm-nios2/uapi/Makefile.am  |7 -
 include/cobalt/asm-powerpc/Makefile.am |   11 -
 include/cobalt/asm-powerpc/Makefile.in |  638 -
 include/cobalt/asm-powerpc/uapi/Makefile.am|7 -
 include/cobalt/asm-sh/Makefile.am  |   11 -
 include/cobalt/asm-sh/uapi/Makefile.am |7 -
 include/cobalt/asm-sh/uapi/Makefile.in |  561 ---
 include/cobalt/asm-x86/Makefile.am |   12 -
 include/cobalt/asm-x86/uapi/Makefile.am|7 -
 include/cobalt/asm-x86/uapi/Makefile.in|  561 ---
 include/cobalt/kernel/Makefile.am  |2 -
 include/cobalt/kernel/Makefile.in  |  208 ++-
 include/cobalt/kernel/clock.h  |2 +-
 include/cobalt/kernel/heap.h   |4 +-
 include/cobalt/kernel/thread.h |4 +-
 include/cobalt/kernel/trace.h  |2 +-
 include/cobalt/kernel/vdso.h   |2 +-
 include/cobalt/sys/Makefile.in |2 +-
 include/cobalt/ticks.h |2 +-
 include/cobalt/uapi/Makefile.am|2 +-
 include/cobalt/uapi/Makefile.in|4 +-
 include/cobalt/uapi/asm-generic/Makefile.am|5 +
 .../ipipe => uapi/asm-generic}/Makefile.in |   12 +-
 .../{asm-generic/uapi => uapi/asm-generic}/arith.h |6 +-
 .../uapi => uapi/asm-generic}/features.h   |6 +-
 .../uapi => uapi/asm-generic}/syscall.h|   26 +-
 .../{kernel/uapi => uapi/kernel}/Makefile.am   |2 +-
 .../{kernel/uapi => uapi/kernel}/Makefile.in   |   10 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/heap.h |6 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/synch.h|8 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/thread.h   |8 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/trace.h|6 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/types.h|6 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/urw.h  |6 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/vdso.h |8 +-
 include/cobalt/uapi/rtdm/Makefile.in   |2 +-
 include/cobalt/uapi/signal.h   |   22 +
 include/cobalt/uapi/syscall.h  |2 +-
 include/cobalt/uapi/thread.h

[Xenomai-git] Philippe Gerum : copperplate: move clockobj_get_tsc() out of line

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 494dc628b49dfea0cb75c93827c6c03f41b08876
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=494dc628b49dfea0cb75c93827c6c03f41b08876

Author: Philippe Gerum 
Date:   Sat Jul  6 15:47:35 2013 +0200

copperplate: move clockobj_get_tsc() out of line

---

 include/copperplate/clockobj.h |   16 ++--
 lib/copperplate/clockobj.c |   14 ++
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/include/copperplate/clockobj.h b/include/copperplate/clockobj.h
index 2619bb1..965523d 100644
--- a/include/copperplate/clockobj.h
+++ b/include/copperplate/clockobj.h
@@ -128,6 +128,8 @@ void clockobj_get_date(struct clockobj *clkobj, ticks_t 
*pticks);
 void clockobj_get_time(struct clockobj *clkobj,
   ticks_t *pticks, ticks_t *ptsc);
 
+ticks_t clockobj_get_tsc(void);
+
 void clockobj_caltime_to_timeout(struct clockobj *clkobj, const struct tm *tm,
 unsigned long rticks, struct timespec *ts);
 
@@ -159,13 +161,6 @@ int clockobj_destroy(struct clockobj *clkobj);
 #ifdef CONFIG_XENO_COBALT
 
 #include 
-#include 
-
-static inline ticks_t clockobj_get_tsc(void)
-{
-   /* Guaranteed to be the source of CLOCK_COPPERPLATE. */
-   return __xn_rdtsc();
-}
 
 static inline sticks_t clockobj_ns_to_tsc(sticks_t ns)
 {
@@ -188,13 +183,6 @@ void clockobj_ns_to_timespec(ticks_t ns, struct timespec 
*ts)
 
 #else /* CONFIG_XENO_MERCURY */
 
-static inline ticks_t clockobj_get_tsc(void)
-{
-   struct timespec now;
-   __RT(clock_gettime(CLOCK_COPPERPLATE, &now));
-   return (ticks_t)now.tv_sec * 10ULL + now.tv_nsec;
-}
-
 static inline sticks_t clockobj_ns_to_tsc(sticks_t ns)
 {
return ns;
diff --git a/lib/copperplate/clockobj.c b/lib/copperplate/clockobj.c
index 05a14db..183a27a 100644
--- a/lib/copperplate/clockobj.c
+++ b/lib/copperplate/clockobj.c
@@ -283,6 +283,13 @@ int clockobj_set_resolution(struct clockobj *clkobj, 
unsigned int resolution_ns)
 #ifdef CONFIG_XENO_COBALT
 
 #include 
+#include 
+
+ticks_t clockobj_get_tsc(void)
+{
+   /* Guaranteed to be the source of CLOCK_COPPERPLATE. */
+   return __xn_rdtsc();
+}
 
 #ifndef CONFIG_XENO_LORES_CLOCK_DISABLED
 
@@ -328,6 +335,13 @@ void clockobj_get_date(struct clockobj *clkobj, ticks_t 
*pticks)
 
 #else /* CONFIG_XENO_MERCURY */
 
+ticks_t clockobj_get_tsc(void)
+{
+   struct timespec now;
+   __RT(clock_gettime(CLOCK_COPPERPLATE, &now));
+   return (ticks_t)now.tv_sec * 10ULL + now.tv_nsec;
+}
+
 #ifndef CONFIG_XENO_LORES_CLOCK_DISABLED
 
 sticks_t clockobj_ns_to_ticks(struct clockobj *clkobj, sticks_t ns)


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


[Xenomai-git] Philippe Gerum : lib/cobalt: unexport asm/xenomai/tsc.h

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: d38a4043863f7843db9894cf2f3eba36ca015271
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=d38a4043863f7843db9894cf2f3eba36ca015271

Author: Philippe Gerum 
Date:   Sat Jul  6 15:51:01 2013 +0200

lib/cobalt: unexport asm/xenomai/tsc.h

---

 lib/cobalt/arch/arm/Makefile.am|2 +-
 lib/cobalt/arch/arm/Makefile.in|   12 +--
 .../arch/arm/include/asm/xenomai/Makefile.am   |   11 +-
 .../arch/arm/include/asm/xenomai/Makefile.in   |   92 ++-
 lib/cobalt/arch/arm/include/asm/xenomai/tsc.h  |   96 +++-
 lib/cobalt/arch/arm/tsc.c  |4 -
 .../arch/blackfin/include/asm/xenomai/Makefile.am  |7 +-
 .../arch/blackfin/include/asm/xenomai/Makefile.in  |   84 ++-
 .../arch/nios2/include/asm/xenomai/Makefile.am |7 +-
 .../arch/nios2/include/asm/xenomai/Makefile.in |   84 ++-
 .../arch/powerpc/include/asm/xenomai/Makefile.am   |8 -
 .../arch/powerpc/include/asm/xenomai/Makefile.in   |  164 +++-
 lib/cobalt/arch/sh/include/asm/xenomai/Makefile.am |7 +-
 lib/cobalt/arch/sh/include/asm/xenomai/Makefile.in |   84 ++-
 .../arch/x86/include/asm/xenomai/Makefile.am   |7 +-
 .../arch/x86/include/asm/xenomai/Makefile.in   |   84 ++-
 16 files changed, 197 insertions(+), 556 deletions(-)

diff --git a/lib/cobalt/arch/arm/Makefile.am b/lib/cobalt/arch/arm/Makefile.am
index b45bfbb..0aa02d6 100644
--- a/lib/cobalt/arch/arm/Makefile.am
+++ b/lib/cobalt/arch/arm/Makefile.am
@@ -2,7 +2,7 @@ noinst_LTLIBRARIES = libarch.la
 
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
-libarch_la_SOURCES = features.c tsc.c
+libarch_la_SOURCES = features.c
 
 libarch_la_CPPFLAGS =  \
@XENO_COBALT_CFLAGS@\
diff --git a/lib/cobalt/arch/arm/Makefile.in b/lib/cobalt/arch/arm/Makefile.in
index ac389f9..b2dc7ea 100644
--- a/lib/cobalt/arch/arm/Makefile.in
+++ b/lib/cobalt/arch/arm/Makefile.in
@@ -71,7 +71,7 @@ CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
 LTLIBRARIES = $(noinst_LTLIBRARIES)
 libarch_la_LIBADD =
-am_libarch_la_OBJECTS = libarch_la-features.lo libarch_la-tsc.lo
+am_libarch_la_OBJECTS = libarch_la-features.lo
 libarch_la_OBJECTS = $(am_libarch_la_OBJECTS)
 libarch_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -303,7 +303,7 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
-libarch_la_SOURCES = features.c tsc.c
+libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
@XENO_COBALT_CFLAGS@\
-I$(srcdir)/../..   \
@@ -366,7 +366,6 @@ distclean-compile:
-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/libarch_la-features.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libarch_la-tsc.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ 
$<
@@ -396,13 +395,6 @@ libarch_la-features.lo: features.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libarch_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarch_la-features.lo `test -f 'features.c' || echo '$(srcdir)/'`features.c
 
-libarch_la-tsc.lo: tsc.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libarch_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarch_la-tsc.lo 
-MD -MP -MF $(DEPDIR)/libarch_la-tsc.Tpo -c -o libarch_la-tsc.lo `test -f 
'tsc.c' || echo '$(srcdir)/'`tsc.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libarch_la-tsc.Tpo 
$(DEPDIR)/libarch_la-tsc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@  source='tsc.c' 
object='libarch_la-tsc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@  DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(libarch_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarch_la-tsc.lo `test -f 'tsc.c' || echo '$(srcdir)/'`tsc.c
-
 mostlyclean-libtool:
-rm -f *.lo
 
diff --git a/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am 
b/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am
index 8f7d65d..d308b06 100644
--- a/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am
+++ b/lib/cobalt/arch/arm/include/asm/xenomai/Makefile.am
@@ -1,12 +1,5 @@
-includesubdir = $(includedir)/cobalt/asm/xenomai
-
-includesub_HEADERS =   \
-   tsc.h
 
 noinst_HEADERS =   \
features.h  

[Xenomai-git] Philippe Gerum : cobalt: move fp test helpers to the uapi section

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: adb02cc49469f9c71bd6c5d9fda168af7d5fb94b
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=adb02cc49469f9c71bd6c5d9fda168af7d5fb94b

Author: Philippe Gerum 
Date:   Thu Jul  4 17:32:59 2013 +0200

cobalt: move fp test helpers to the uapi section

---

 include/cobalt/asm-arm/fptest.h  |   77 +---
 include/cobalt/asm-arm/uapi/Makefile.am  |1 +
 include/cobalt/asm-arm/uapi/Makefile.in  |1 +
 include/cobalt/asm-arm/uapi/fptest.h |   61 +
 include/cobalt/asm-blackfin/fptest.h |   21 +---
 include/cobalt/asm-blackfin/uapi/Makefile.am |1 +
 include/cobalt/asm-blackfin/uapi/Makefile.in |1 +
 include/cobalt/asm-blackfin/uapi/fptest.h|   31 +
 include/cobalt/asm-nios2/fptest.h|   21 +---
 include/cobalt/asm-nios2/uapi/Makefile.am|1 +
 include/cobalt/asm-nios2/uapi/Makefile.in|1 +
 include/cobalt/asm-nios2/uapi/fptest.h   |   31 +
 include/cobalt/asm-powerpc/fptest.h  |  103 +---
 include/cobalt/asm-powerpc/uapi/Makefile.am  |1 +
 include/cobalt/asm-powerpc/uapi/Makefile.in  |1 +
 include/cobalt/asm-powerpc/uapi/fptest.h |  113 +
 include/cobalt/asm-sh/fptest.h   |   21 +---
 include/cobalt/asm-sh/uapi/Makefile.am   |1 +
 include/cobalt/asm-sh/uapi/Makefile.in   |1 +
 include/cobalt/asm-sh/uapi/fptest.h  |   31 +
 include/cobalt/asm-x86/fptest.h  |  168 +++---
 include/cobalt/asm-x86/uapi/Makefile.am  |1 +
 include/cobalt/asm-x86/uapi/Makefile.in  |1 +
 include/cobalt/asm-x86/uapi/fptest.h |  132 
 kernel/drivers/testing/switchtest.c  |   28 +++-
 lib/cobalt/arm/features.c|   27 
 lib/cobalt/arm/xenomai/features.h|2 +
 lib/cobalt/blackfin/xenomai/features.h   |5 +
 lib/cobalt/nios2/features.c  |3 +-
 lib/cobalt/nios2/xenomai/features.h  |5 +
 lib/cobalt/powerpc/xenomai/features.h|5 +
 lib/cobalt/sh/xenomai/features.h |5 +
 lib/cobalt/x86/features.c|   28 -
 lib/cobalt/x86/xenomai/features.h|2 +
 testsuite/switchtest/switchtest.c|   27 ++--
 35 files changed, 566 insertions(+), 393 deletions(-)

diff --git a/include/cobalt/asm-arm/fptest.h b/include/cobalt/asm-arm/fptest.h
index 9bc4ced..af92b86 100644
--- a/include/cobalt/asm-arm/fptest.h
+++ b/include/cobalt/asm-arm/fptest.h
@@ -19,16 +19,17 @@
 #ifndef _COBALT_ASM_ARM_FPTEST_H
 #define _COBALT_ASM_ARM_FPTEST_H
 
-#ifdef __KERNEL__
-#include 
+#include 
 #include 
 
 #ifdef CONFIG_VFP
 #define have_vfp (elf_hwcap & HWCAP_VFP)
 #else /* !CONFIG_VFP */
-#define have_vfp (0)
+#define have_vfp 0
 #endif /* !CONFIG_VFP */
 
+#include 
+
 static inline int fp_kernel_supported(void)
 {
return 1;
@@ -43,75 +44,9 @@ static inline void fp_linux_end(void)
 {
 }
 
-static inline void fp_features_init(void)
+static inline int fp_detect(void)
 {
+   return have_vfp ? __COBALT_HAVE_VFP : 0;
 }
 
-#else /* !__KERNEL__ */
-#include 
-#include 
-#define printk(fmt, args...) fprintf(stderr, fmt, ## args)
-
-static int have_vfp;
-
-static void fp_features_init(void)
-{
-   char buffer[1024];
-   FILE *f = fopen("/proc/cpuinfo", "r");
-   if(!f)
-   return;
-
-   while(fgets(buffer, sizeof(buffer), f)) {
-   if(strncmp(buffer, "Features", sizeof("Features") - 1))
-   continue;
-
-   if (strstr(buffer, "vfp")) {
-   have_vfp = 1;
-   break;
-   }
-   }
-
-   fclose(f);
-}
-
-#endif /* !__KERNEL__ */
-
-static inline void fp_regs_set(unsigned val)
-{
-   if (have_vfp) {
-   unsigned long long e[16];
-   unsigned i;
-
-   for (i = 0; i < 16; i++)
-   e[i] = val;
-
-   /* vldm %0!, {d0-d15},
-  AKA fldmiax %0!, {d0-d15} */
-   __asm__ __volatile__("ldc p11, cr0, [%0],#32*4":
-"=r"(i): "0"(&e[0]): "memory");
-   }
-}
-
-static inline unsigned fp_regs_check(unsigned val)
-{
-   unsigned result = val;
-
-   if (have_vfp) {
-   unsigned long long e[16];
-   unsigned i;
-
-   /* vstm %0!, {d0-d15},
-  AKA fstmiax %0!, {d0-d15} */
-   __asm__ __volatile__("stc p11, cr0, [%0],#32*4":
-"=r"(i): "0"(&e[0]): "memory");
-
-   for (i = 0; i < 16; i++)
-   if (e[i] != val) {
-   printk("d%d: %llu != %u\n", i, e[i], val);
-   result = e[i];
-   }
-   }
-
-   return result;
-}
 #endif /* _COBALT_ASM_ARM_FPTEST_H */

[Xenomai-git] Philippe Gerum : cobalt: formally disconnect user-space from kernel headers

2013-07-06 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: a7e37cfb538e5c760b24c10c91e2f39eaae9aee5
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=a7e37cfb538e5c760b24c10c91e2f39eaae9aee5

Author: Philippe Gerum 
Date:   Fri Jul  5 09:52:21 2013 +0200

cobalt: formally disconnect user-space from kernel headers

As a consequence of this change, only few low-level headers are still
part of the target installation. Others remain private to the kernel
and/or lib/cobalt.

---

 Makefile.in|4 +-
 config/Makefile.in |2 +-
 configure  |  111 +---
 configure.in   |   65 +-
 doc/Makefile.in|2 +-
 doc/asciidoc/Makefile.in   |2 +-
 doc/docbook/Makefile.in|2 +-
 doc/docbook/custom-stylesheets/Makefile.in |2 +-
 doc/docbook/custom-stylesheets/xsl/Makefile.in |2 +-
 .../custom-stylesheets/xsl/common/Makefile.in  |2 +-
 doc/docbook/custom-stylesheets/xsl/fo/Makefile.in  |2 +-
 .../custom-stylesheets/xsl/html/Makefile.in|2 +-
 doc/doxygen/Makefile.in|2 +-
 doc/man/Makefile.in|2 +-
 doc/txt/Makefile.in|2 +-
 include/Makefile.am|   21 -
 include/Makefile.in|   87 ++--
 include/alchemy/Makefile.in|2 +-
 include/analogy/Makefile.in|2 +-
 include/cobalt/Makefile.am |7 -
 include/cobalt/Makefile.in |9 +-
 include/cobalt/arith.h |2 +-
 include/cobalt/asm-arm/Makefile.am |   11 -
 include/cobalt/asm-arm/uapi/Makefile.am|8 -
 include/cobalt/asm-arm/uapi/Makefile.in|  562 ---
 include/cobalt/asm-blackfin/Makefile.am|   11 -
 include/cobalt/asm-blackfin/Makefile.in|  638 -
 include/cobalt/asm-blackfin/uapi/Makefile.am   |7 -
 include/cobalt/asm-generic/Makefile.am |   10 -
 include/cobalt/asm-generic/ipipe/Makefile.am   |3 -
 include/cobalt/asm-generic/uapi/Makefile.am|6 -
 include/cobalt/asm-nios2/Makefile.am   |9 -
 include/cobalt/asm-nios2/Makefile.in   |  510 --
 include/cobalt/asm-nios2/uapi/Makefile.am  |7 -
 include/cobalt/asm-powerpc/Makefile.am |   11 -
 include/cobalt/asm-powerpc/Makefile.in |  638 -
 include/cobalt/asm-powerpc/uapi/Makefile.am|7 -
 include/cobalt/asm-sh/Makefile.am  |   11 -
 include/cobalt/asm-sh/uapi/Makefile.am |7 -
 include/cobalt/asm-sh/uapi/Makefile.in |  561 ---
 include/cobalt/asm-x86/Makefile.am |   12 -
 include/cobalt/asm-x86/uapi/Makefile.am|7 -
 include/cobalt/asm-x86/uapi/Makefile.in|  561 ---
 include/cobalt/kernel/Makefile.am  |2 -
 include/cobalt/kernel/Makefile.in  |  208 ++-
 include/cobalt/kernel/clock.h  |2 +-
 include/cobalt/kernel/heap.h   |4 +-
 include/cobalt/kernel/thread.h |4 +-
 include/cobalt/kernel/trace.h  |2 +-
 include/cobalt/kernel/vdso.h   |2 +-
 include/cobalt/sys/Makefile.in |2 +-
 include/cobalt/ticks.h |2 +-
 include/cobalt/uapi/Makefile.am|2 +-
 include/cobalt/uapi/Makefile.in|4 +-
 include/cobalt/uapi/asm-generic/Makefile.am|5 +
 .../ipipe => uapi/asm-generic}/Makefile.in |   12 +-
 .../{asm-generic/uapi => uapi/asm-generic}/arith.h |6 +-
 .../uapi => uapi/asm-generic}/features.h   |6 +-
 .../uapi => uapi/asm-generic}/syscall.h|   26 +-
 .../{kernel/uapi => uapi/kernel}/Makefile.am   |2 +-
 .../{kernel/uapi => uapi/kernel}/Makefile.in   |   10 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/heap.h |6 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/synch.h|8 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/thread.h   |8 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/trace.h|6 +-
 .../cobalt/{kernel/uapi => uapi/kernel}/types.h|6 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/urw.h  |6 +-
 include/cobalt/{kernel/uapi => uapi/kernel}/vdso.h |8 +-
 include/cobalt/uapi/rtdm/Makefile.in   |2 +-
 include/cobalt/uapi/signal.h   |   22 +
 include/cobalt/uapi/syscall.h  |2 +-
 include/cobalt/uapi/thread.h