* 64K PAGE_SIZE and arch/powerpc/kernel/vdso.c
@ 2010-10-16 8:03 Nicholas A. Bellinger
2010-10-17 23:44 ` Michael Neuling
0 siblings, 1 reply; 3+ messages in thread
From: Nicholas A. Bellinger @ 2010-10-16 8:03 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Brian King
Greetings Linux-ppc64 folks,
While trying to compile v2.6.36-rc8 with PAGE_SIZE=65536 I run into the
following compile failure w/ strict checking on a RHEL5.4 / gcc (GCC)
4.1.2 20080704 (Red Hat 4.1.2-46) system:
cc1: warnings being treated as errors
arch/powerpc/kernel/vdso.c:81: warning: alignment of ‘vdso_data_store’
is greater than maximum object file alignment. Using 32768
CC arch/powerpc/sysdev/msi_bitmap.o
make[1]: *** [arch/powerpc/kernel/vdso.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Any ideas folks..?
TIA,
--nab
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 64K PAGE_SIZE and arch/powerpc/kernel/vdso.c
2010-10-16 8:03 64K PAGE_SIZE and arch/powerpc/kernel/vdso.c Nicholas A. Bellinger
@ 2010-10-17 23:44 ` Michael Neuling
2010-10-18 10:03 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Michael Neuling @ 2010-10-17 23:44 UTC (permalink / raw)
To: Nicholas A. Bellinger; +Cc: Brian King, Tim Abbott, linuxppc-dev
> Greetings Linux-ppc64 folks,
>=20
> While trying to compile v2.6.36-rc8 with PAGE_SIZE=3D65536 I run into the
> following compile failure w/ strict checking on a RHEL5.4 / gcc (GCC)
> 4.1.2 20080704 (Red Hat 4.1.2-46) system:
>=20
> cc1: warnings being treated as errors
> arch/powerpc/kernel/vdso.c:81: warning: alignment of =E2=80=98vdso_data_s=
tore=E2=80=99
> is greater than maximum object file alignment. Using 32768
> CC arch/powerpc/sysdev/msi_bitmap.o
> make[1]: *** [arch/powerpc/kernel/vdso.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
>=20
> Any ideas folks..?
It seems this broke it:
commit abe1ee3a221d53778c3e58747bbec6e518e5471b
Author: Tim Abbott <tabbott@ksplice.com>
Date: Sun Sep 20 18:14:15 2009 -0400
Use macros for .data.page_aligned section.
=20=20=20=20
This patch changes the remaining direct references to
.data.page_aligned in C and assembly code to use the macros in
include/linux/linkage.h.
Backing out just that part of the change (see below) fixes it.
FYI the error only occurs on gcc 4.1 and 4.2. 4.3 and greater is fine.=20=
=20
Mikey
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 13002fe..c140fce 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -78,7 +78,7 @@ static int vdso_ready;
static union {
struct vdso_data data;
u8 page[PAGE_SIZE];
-} vdso_data_store __page_aligned_data;
+} vdso_data_store __attribute__((__section__(".data.page_aligned")));
struct vdso_data *vdso_data =3D &vdso_data_store.data;
=20
/* Format of the patch table */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: 64K PAGE_SIZE and arch/powerpc/kernel/vdso.c
2010-10-17 23:44 ` Michael Neuling
@ 2010-10-18 10:03 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2010-10-18 10:03 UTC (permalink / raw)
To: Michael Neuling
Cc: Brian King, Tim Abbott, linuxppc-dev, Nicholas A. Bellinger
On Mon, 2010-10-18 at 10:44 +1100, Michael Neuling wrote:
> > Greetings Linux-ppc64 folks,
> >
> > While trying to compile v2.6.36-rc8 with PAGE_SIZE=65536 I run into the
> > following compile failure w/ strict checking on a RHEL5.4 / gcc (GCC)
> > 4.1.2 20080704 (Red Hat 4.1.2-46) system:
> >
> > cc1: warnings being treated as errors
> > arch/powerpc/kernel/vdso.c:81: warning: alignment of ‘vdso_data_store’
> > is greater than maximum object file alignment. Using 32768
> > CC arch/powerpc/sysdev/msi_bitmap.o
> > make[1]: *** [arch/powerpc/kernel/vdso.o] Error 1
> > make[1]: *** Waiting for unfinished jobs....
> >
> > Any ideas folks..?
>
> It seems this broke it:
Yes, this is a known (old) issue. You can apply the workaround locally
if you really want to build with that old toolchain, but the risk is
that if an object whose size is not a multiple of PAGE_SIZE is put in
the .data.page_aligned section, your vdso data page might end up not
being aligned properly. Fortunately that doesn't generally happen but
it's worth double checking your System.map...
This is the reason I decided to leave it alone in the kernel and
encourage people to update their toolchain (and binutils).
Cheers,
Ben.
> commit abe1ee3a221d53778c3e58747bbec6e518e5471b
> Author: Tim Abbott <tabbott@ksplice.com>
> Date: Sun Sep 20 18:14:15 2009 -0400
>
> Use macros for .data.page_aligned section.
>
> This patch changes the remaining direct references to
> .data.page_aligned in C and assembly code to use the macros in
> include/linux/linkage.h.
>
> Backing out just that part of the change (see below) fixes it.
>
> FYI the error only occurs on gcc 4.1 and 4.2. 4.3 and greater is fine.
>
> Mikey
>
> diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
> index 13002fe..c140fce 100644
> --- a/arch/powerpc/kernel/vdso.c
> +++ b/arch/powerpc/kernel/vdso.c
> @@ -78,7 +78,7 @@ static int vdso_ready;
> static union {
> struct vdso_data data;
> u8 page[PAGE_SIZE];
> -} vdso_data_store __page_aligned_data;
> +} vdso_data_store __attribute__((__section__(".data.page_aligned")));
> struct vdso_data *vdso_data = &vdso_data_store.data;
>
> /* Format of the patch table */
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-18 10:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-16 8:03 64K PAGE_SIZE and arch/powerpc/kernel/vdso.c Nicholas A. Bellinger
2010-10-17 23:44 ` Michael Neuling
2010-10-18 10:03 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).