lkml.org 
[lkml]   [2012]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 6/8] x86/ftrace: Use __pa_symbol instead of __pa on C visible symbols
On 11/16/2012 03:06 PM, H. Peter Anvin wrote:
> On 11/16/2012 02:45 PM, Steven Rostedt wrote:
>>
>> #define __pa(x) __phys_addr((unsigned long)(x))
>> #define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x)))
>>
>> I'm confused. __pa_symbol() just calls __pa() with some macro magic to
>> its parameter. How is this a performance improvement?
>>
>
> One of the earlier patches in this series changes __pa_symbol() to
> avoid the conditional hidden inside __phys_addr(), since by definition
> a symbol can only be on one side of that branch.
>
> -hpa
>

In addition to being a bit faster the code is also a bit smaller since
it can combine the the constants from __va() and __pa_symbol() as the
new __pa_symbol is an inline in the non-debug case.

Thanks,

Alex


\
 
 \ /
  Last update: 2012-11-17 01:01    [W:0.115 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site