[Xenomai] Porting xenomai 2.6.3 and ipipe to 3.12 kernel

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Tue Apr 1 03:32:27 CEST 2014


On Tue, Apr 01, 2014 at 12:27:45AM +0200, Gilles Chanteperdrix wrote:
> Ok, arch_counter_set_user_access disables user access to the 
> architected timer counter. The following patch should avoid this:
> 
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index b605f04e..7aea949 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -374,7 +374,9 @@ static int arch_timer_setup(struct clock_event_device *clk)
>  			enable_percpu_irq(arch_timer_ppi[PHYS_NONSECURE_PPI], 0);
>  	}
>  
> +#ifndef CONFIG_IPIPE
>  	arch_counter_set_user_access();
> +#endif
>  
>  	return 0;
>  }

That might have taken me a while to track down.  Excellent work.

root at omap5:~# /usr/lib/xenomai/testsuite/latency 
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|     -0.163|      0.488|      3.743|       0|     0|     -0.163|      3.743
RTD|     -0.652|      0.000|      3.092|       0|     0|     -0.652|      3.743
RTD|     -0.652|      0.000|      2.929|       0|     0|     -0.652|      3.743
RTD|     -0.652|      0.000|      2.929|       0|     0|     -0.652|      3.743
RTD|     -0.652|      0.325|      3.255|       0|     0|     -0.652|      3.743
RTD|     -0.652|      0.000|      2.929|       0|     0|     -0.652|      3.743
RTD|     -0.489|      0.162|      3.743|       0|     0|     -0.652|      3.743
RTD|     -0.652|      0.000|      2.929|       0|     0|     -0.652|      3.743
RTD|     -0.652|      0.000|      3.092|       0|     0|     -0.652|      3.743
RTD|     -0.652|      0.325|      3.906|       0|     0|     -0.652|      3.906
RTD|     -0.652|      0.000|      3.255|       0|     0|     -0.652|      3.906
RTD|     -0.652|      0.000|      2.278|       0|     0|     -0.652|      3.906
RTD|     -2.442|      0.000|      2.604|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.162|      3.255|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.325|      3.092|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      3.255|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      3.743|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.325|      3.417|       0|     0|     -2.442|      3.906
RTD|     -1.954|      0.000|      3.255|       0|     0|     -2.442|      3.906
RTT|  00:00:22  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.766|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.766|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.325|      3.092|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.766|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      3.092|       0|     0|     -2.442|      3.906
RTD|     -1.465|      0.000|      2.929|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.325|      3.580|       0|     0|     -2.442|      3.906
RTD|     -1.628|      0.000|      3.092|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      2.766|       0|     0|     -2.442|      3.906
RTD|     -0.652|      0.000|      3.092|       0|     0|     -2.442|      3.906
RTD|     -0.489|      0.325|      4.231|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      3.580|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      2.766|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      2.604|       0|     0|     -2.442|      4.231
RTD|     -1.303|      0.000|      3.417|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.325|      3.743|       0|     0|     -2.442|      4.231
RTD|     -1.954|      0.000|      2.929|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      2.441|       0|     0|     -2.442|      4.231
RTT|  00:00:43  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.325|      3.417|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      2.604|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      2.929|       0|     0|     -2.442|      4.231
RTD|     -0.652|      0.000|      3.092|       0|     0|     -2.442|      4.231
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS|     -2.442|      0.000|      4.231|       0|     0|    00:00:48/00:00:48

mutex torture tests now pass, cond tests pass, most things seem to pass,
but I think the failing ones need either modules enabled I didn't enable,
or maybe special hardware.

Any recommended way to test if things are really working now?

-- 
Len Sorensen




More information about the Xenomai mailing list