Message-ID: <502E5D04.70002@xenomai.org> Date: Fri, 17 Aug 2012 17:02:28 +0200 From: Philippe Gerum MIME-Version: 1.0 References: <502D040F.2010906@axesseurope.com> <20120816144617.GD1237@csclub.uwaterloo.ca> <502E541F.7090801@axesseurope.com> <502E5830.4080205@xenomai.org> In-Reply-To: <502E5830.4080205@xenomai.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Trying to get Xenomai on P1010RDB List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Charles Retailleau Cc: xenomai@xenomai.org On 08/17/2012 04:41 PM, Gilles Chanteperdrix wrote: > On 08/17/2012 04:24 PM, Charles Retailleau wrote: >> Thanks Lennart that was very useful, it now works. >> Here is the little patch I made, yet I couldn't find a switch to force >> it for core e500/e500xx only... >> >> >> --- ./xenomai-2.6.1.orig/include/asm-powerpc/syscall.h 2011-11-09 >> 13:21:36.000000000 +0100 >> +++ ./xenomai-2.6.1.mine/./include/asm-powerpc/syscall.h 2012-08-17 >> 15:47:28.387435909 +0200 >> @@ -167,9 +167,9 @@ >> } u; >> unsigned long __tbu; >> >> - __asm__ __volatile__("1: mftbu %0\n" >> - "mftb %1\n" >> - "mftbu %2\n" >> + __asm__ __volatile__("1: mfspr %0,269\n" >> + "mfspr %1,268\n" >> + "mfspr %2,269\n" >> "cmpw %2,%0\n" >> "bne- 1b\n":"=r"(u.v[0]), >> "=r"(u.v[1]), "=r"(__tbu)); >> Thanks to all for your help >> Charles, > > If I understand correctly, this patch breaks old powerpcs. So, do we > have a compilation constant allowing to know whether we are compiling > for an old or new powerpc? > For the sake of completeness, we could condition mftb to CONFIG_POWER3, all others we care for (i.e. >= ISA 2.01) do support mfspr 268. -- Philippe.