lkml.org 
[lkml]   [2010]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 26 May 2010 16:33:34 +0900
FromPaul Mundt <>
SubjectRe: [PATCH] FLAT: allow arches to declare a larger alignment than the slab
On Wed, May 26, 2010 at 03:23:02AM -0400, Mike Frysinger wrote:
> On Wed, May 26, 2010 at 02:59, Geert Uytterhoeven wrote:
> > From looking at <linux/flat.h>, it looks like the FLAT binary format
> > doesn't contain any
> > alignment information? So if I put __attribute__((aligned(4096))) in a
> > file, there's still
> > no guarantee it will actually be in memory at a 4Ki-aligned address?
>
> i believe that is correct. FLAT behavior today provides alignment of
> either sizeof(unsigned long) or ARCH_SLAB_MINALIGN.
>
> i imagine something like this would work today because everyone
> defines it to a constant:
> -#ifdef ARCH_SLAB_MINALIGN
> +#if defined(ARCH_SLAB_MINALIGN) && ARCH_SLAB_MINALIGN != 0
> but this would break if someone tried using gcc sizeof/alignof/etc...

alignof is used by SLUB/SLOB to set the ARCH_SLAB_MINALIGN value if the
architecture hasn't already specified one, so that wouldn't work.


\
 
 \ /
  Last update: 2010-05-26 09:35    [from the cache]
©2003-2010