From: at91_enthus <nwromania@gmail.com>
To: xenomai@xenomai.org
Subject: Re: [Xenomai] at91 tsc error on AT91SAM9G20 platform
Date: Sat, 10 Nov 2012 09:03:50 -0600 [thread overview]
Message-ID: <509E6CD6.5080601@gmail.com> (raw)
In-Reply-To: <509E1A13.8050204@xenomai.org>
On 11/10/2012 03:10 AM, Gilles Chanteperdrix wrote:
> On 11/10/2012 04:15 AM, at91_enthus wrote:
>
>
>> Hi.
>>
>> I'm having problems building the user space for Xenomai 2.6.1 (for
>> AT91SAM9G20).
>> Long story short, I issue the following commands:
>>
>> $ ./configure CFLAGS="-march=armv4t" LDFLAGS="-march=armv4t"
>> --host=arm-linux-gnueabi --enable-arm-tsc=at91
>>
>
> According to this link:
> http://www.atmel.com/devices/SAM9G20.aspx
>
> The AT91SAM9G20 is based on an arm926 core, so, it is an armv5, not an
> armv4.
>
> And if you are compiling xenomai for a recent version of the I-pipe
> patch, you do not need to pass the --enable-arm-tsc option. This option
> is made for compiling xenomai for an old kernel.
>
> Anyway, you can try the following patch:
> diff --git a/include/asm-arm/syscall.h b/include/asm-arm/syscall.h
> index 5ca1bf0..8161d39 100644
> --- a/include/asm-arm/syscall.h
> +++ b/include/asm-arm/syscall.h
> @@ -257,9 +257,9 @@ static inline unsigned long long __xn_rdtsc(void)
> return __xn_tscinfo.kuser_tsc_get(__xn_tscinfo.kinfo.counter);
>
> #elif CONFIG_XENO_ARM_TSC_TYPE == __XN_TSC_TYPE_FREERUNNING
> - volatile unsigned long long *const tscp = __xn_tscinfo.tsc;
> - volatile unsigned *const counterp = __xn_tscinfo.counter;
> - const unsigned mask = __xn_tscinfo.mask;
> + volatile unsigned long long *const tscp = __xn_tscinfo.kinfo.tsc;
> + volatile unsigned *const counterp = __xn_tscinfo.kinfo.counter;
> + const unsigned mask = __xn_tscinfo.kinfo.mask;
> register unsigned long long result;
> unsigned counter;
>
> @@ -272,9 +272,9 @@ static inline unsigned long long __xn_rdtsc(void)
> return (result & ~((unsigned long long) mask)) | (counter & mask);
>
> #elif CONFIG_XENO_ARM_TSC_TYPE == __XN_TSC_TYPE_FREERUNNING_COUNTDOWN
> - volatile unsigned long long *const tscp = __xn_tscinfo.tsc;
> - volatile unsigned *const counterp = __xn_tscinfo.counter;
> - const unsigned mask = __xn_tscinfo.mask;
> + volatile unsigned long long *const tscp = __xn_tscinfo.kinfo.tsc;
> + volatile unsigned *const counterp = __xn_tscinfo.kinfo.counter;
> + const unsigned mask = __xn_tscinfo.kinfo.mask;
> register unsigned long long result;
> unsigned counter;
>
> @@ -287,9 +287,9 @@ static inline unsigned long long __xn_rdtsc(void)
> return (result & ~((unsigned long long) mask)) | (counter & mask);
>
> #elif CONFIG_XENO_ARM_TSC_TYPE == __XN_TSC_TYPE_FREERUNNING_FAST_WRAP
> - volatile unsigned long long *const tscp = __xn_tscinfo.tsc;
> - volatile unsigned *const counterp = __xn_tscinfo.counter;
> - const unsigned mask = __xn_tscinfo.mask;
> + volatile unsigned long long *const tscp = __xn_tscinfo.kinfo.tsc;
> + volatile unsigned *const counterp = __xn_tscinfo.kinfo.counter;
> + const unsigned mask = __xn_tscinfo.kinfo.mask;
> register unsigned long long after, before;
> unsigned counter;
>
> @@ -305,10 +305,10 @@ static inline unsigned long long __xn_rdtsc(void)
> return (before & ~((unsigned long long) mask)) | (counter & mask);
>
> #elif CONFIG_XENO_ARM_TSC_TYPE == __XN_TSC_TYPE_DECREMENTER
> - volatile unsigned long long *const tscp = __xn_tscinfo.tsc;
> - volatile unsigned *const counterp = __xn_tscinfo.counter;
> - volatile unsigned *const last_cntp = __xn_tscinfo.last_cnt;
> - const unsigned mask = __xn_tscinfo.mask;
> + volatile unsigned long long *const tscp = __xn_tscinfo.kinfo.tsc;
> + volatile unsigned *const counterp = __xn_tscinfo.kinfo.counter;
> + volatile unsigned *const last_cntp = __xn_tscinfo.kinfo.last_cnt;
> + const unsigned mask = __xn_tscinfo.kinfo.mask;
> register unsigned long long after, before;
> unsigned counter, last_cnt;
>
>
>
>
>> If I don't choose TSC emulation for ARM, everything compiles fine.
>>
>
> ...and if you are using a recent I-pipe patch, it is what you should do
> anyway.
>
>
The patch worked. Everything installed fine.
Thank you.
prev parent reply other threads:[~2012-11-10 15:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-10 3:15 [Xenomai] at91 tsc error on AT91SAM9G20 platform at91_enthus
2012-11-10 9:10 ` Gilles Chanteperdrix
2012-11-10 15:03 ` at91_enthus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=509E6CD6.5080601@gmail.com \
--to=nwromania@gmail.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.