lkml.org 
[lkml]   [2009]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v3] flat: fix data sections alignment
On Thu, Mar 05, 2009 at 06:00:59PM +0100, Oskar Schirmer wrote:
> The flat loader uses an architecture's flat_stack_align() to align the
> stack but assumes word-alignment is enough for the data sections.
>
> However, on the Xtensa S6000 we have registers up to 128bit width
> which can be used from userspace and therefor need userspace stack and
> data-section alignment of at least this size.
>
> This patch drops flat_stack_align() and uses the same alignment that
> is required for slab caches, ARCH_SLAB_MINALIGN, or wordsize if it's
> not defined by the architecture.
>
> It also fixes m32r which was obviously kaput, aligning an
> uninitialized stack entry instead of the stack pointer.
>
> Signed-off-by: Oskar Schirmer <os@emlix.com>
> Signed-off-by: Johannes Weiner <jw@emlix.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Russell King <rmk@arm.linux.org.uk>
> Cc: Bryan Wu <cooloney@kernel.org>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: Greg Ungerer <gerg@uclinux.org>
> Cc: Mike Frysinger <vapier.adi@gmail.com>

The updated version looks ok to me anyways, and it's certainly an
improvement over defining the same alignment requirements all over the
place.

Acked-by: Paul Mundt <lethal@linux-sh.org>


\
 
 \ /
  Last update: 2009-03-10 08:41    [W:0.074 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site