[lkml]   [2013]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] tile: use a more conservative __my_cpu_offset in CONFIG_PREEMPT
On 9/26/2013 1:57 PM, Will Deacon wrote:
> Hi Chris,
> On Thu, Sep 26, 2013 at 06:24:53PM +0100, Chris Metcalf wrote:
>> [...]
>> +static inline unsigned long __my_cpu_offset(void)
>> +{
>> + unsigned long tp;
>> + register unsigned long *sp asm("sp");
>> + asm("move %0, tp" : "=r" (tp) : "m" (*sp));
>> + return tp;
>> +}
> Hehe, nice to see this hack working out for you too. One thing to check is
> whether you have any funky addressing modes (things like writeback or
> post-increment), since the "m" constraint can bite you if you don't actually
> use it in the asm.

Well, we do have post increments, though I don't see why this is a problem here.
We define a target specific constraint "U" that excludes post-increments, but
again I don't see why "m" would cause trouble here. What was your experience?

Chris Metcalf, Tilera Corp.

 \ /
  Last update: 2013-09-27 22:41    [W:0.074 / U:19.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site