mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Johannes Weiner <jw@emlix.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Howells <dhowells@redhat.com>,
	Russell King <rmk@arm.linux.org.uk>,
	Bryan Wu <cooloney@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Greg Ungerer <gerg@uclinux.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch -v2] flat: fix data sections alignment
Date: Thu, 5 Mar 2009 17:43:07 +0900	[thread overview]
Message-ID: <20090305084307.GB16451@linux-sh.org> (raw)
In-Reply-To: <E1LerUo-0000NE-Q3@mailer.emlix.com>

On Wed, Mar 04, 2009 at 02:51:17PM +0100, Johannes Weiner wrote:
> Paul, please note that on sh ARCH_SLAB_MINALIGN is defined to be 8
> while the userspace stack was aligned to 4 before.  I suppose aligning
> the stack (and data sections) to 8 as well is the right thing...?
> 
This is intentional. As I noted before, the ARCH_SLAB_MINALIGN on SH
refers specifically to SH-5 (or anything implementing a 32-bit sh64 ABI),
which presently does not support nommu, but could in theory. The SH parts
that do nommu today generally need ARCH_KMALLOC_MINALIGN, but do not have
the ARCH_SLAB_MINALIGN requirement that SH-5 does.

> --- a/fs/binfmt_flat.c
> +++ b/fs/binfmt_flat.c
> @@ -41,6 +41,7 @@
>  #include <asm/uaccess.h>
>  #include <asm/unaligned.h>
>  #include <asm/cacheflush.h>
> +#include <asm/page.h>
>  
>  /****************************************************************************/
>  
> @@ -54,6 +55,12 @@
>  #define	DBG_FLT(a...)
>  #endif
>  
> +#ifdef ARCH_SLAB_MINALIGN
> +#define FLAT_DATA_ALIGN	(ARCH_SLAB_MINALIGN)
> +#else
> +#define FLAT_DATA_ALIGN	(sizeof(void *))
> +#endif
> +
As it's not entirely obvious what this is used for outside of the slab
context, you will want to have a comment here explaining the situation,
and particularly what the implication for stack alignment is.

  parent reply	other threads:[~2009-03-05  8:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04 13:51 Johannes Weiner
2009-03-04 18:04 ` Mike Frysinger
2009-03-04 19:33   ` Johannes Weiner
2009-03-04 20:00     ` Mike Frysinger
2009-03-04 20:13       ` Johannes Weiner
2009-03-04 21:48 ` Mike Frysinger
2009-03-05 10:53   ` Johannes Weiner
2009-03-05 16:40   ` Oskar Schirmer
2009-03-05  8:43 ` Paul Mundt [this message]
2009-05-29  0:01 ` John Williams
2009-05-29  3:58   ` Paul Mundt
2009-05-29  5:11     ` John Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090305084307.GB16451@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=akpm@linux-foundation.org \
    --cc=cooloney@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@uclinux.org \
    --cc=jw@emlix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome