[PATCH 01/14] x86, boot: align the .bss section in the decompressor
H. Peter Anvin
hpa at zytor.com
Fri May 8 12:54:41 EDT 2009
Sam Ravnborg wrote:
>> }
>> + . = ALIGN(32);
>
> Where does this magic 32 comes from?
> I would assume the better choice would be:
> . = ALIGN(L1_CACHE_BYTES);
>
> So we match the relevant CPU.
>
> In general for alignmnet of output sections I see the need for:
> 1) Function call
> 2) L1_CACHE_BYTES
> 3) PAGE_SIZE
> 4) 2*PAGE_SIZE
>
> But I see magic constant used here and there that does not match
> the above (when looking at all archs).
> So I act when I see a new 'magic' number..
>
I picked 32 as being larger than the maximum known size that affects rep
performance, but L1_CACHE_BYTES really would make more sense, you're right.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
More information about the kexec
mailing list