[OpenBIOS] PPC: QEMU breaks static variables in OpenBIOS

Alexander Graf agraf at suse.de
Sat Jan 5 22:51:13 CET 2013



Am 05.01.2013 um 22:47 schrieb Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>:

> On 05/01/13 21:23, Alexander Graf wrote:
> 
>>> I thought about that, but figured that because it was a hot-path I'd do it inline to save some cycles invoking another function. Since it uses the same OF_* constants as those functions then it should just work.
>> 
>> If the calculation function was provided through a static inline function in a header, this'd be a no-issue.
>> 
>> Alex
> 
> va2pa() looks like a good candidate for this, however it isn't marked as static inline because it's called from ofmem_common.c in libopenbios.
> 
> Then again I'm not sure this is important as I've heard in several places that most optimising compilers ignore the inline keyword, and will just inline whatever they think will run fastest based upon the current optimisation level.
> 
> Anyway let me know which way you'd prefer.

I don't have the source in front of me atm. But basically I'd say you should ignore any function calling overhead for now and instead reuse as much infrastructure as you can.

Alex

> 
> 
> ATB,
> 
> Mark.



More information about the OpenBIOS mailing list