powerpc: Merge ipcbuf.h

David Gibson david at gibson.dropbear.id.au
Wed Nov 2 11:44:26 EST 2005


On Tue, Nov 01, 2005 at 08:13:50PM +0100, Arnd Bergmann wrote:
> On Dinsdag 01 November 2005 06:53, David Gibson wrote:
> > +struct ipc64_perm
> > +{
> > +???????__kernel_key_t??key;
> > +???????__kernel_uid_t??uid;
> > +???????__kernel_gid_t??gid;
> > +???????__kernel_uid_t??cuid;
> > +???????__kernel_gid_t??cgid;
> > +???????__kernel_mode_t?mode;
> > +???????unsigned int????seq;
> > +???????unsigned int????__pad1;
> > +???????u64?????????????__unused1;
> > +???????u64?????????????__unused2;
> > +};
> 
> ipc64_perm is a user visible structure, so you have to use
> __u64 here instead of u64. Even that does not exists if
> you build with 32 bit and __STRICT_ANSI__, so it might
> be better yet to use four __u32 for the unused fields.

Oops.  I realised it was user visible, but forgot the wrinkle that the
'uXX' names can't be used there.  Here's a patch to correct it.
Paulus, please apply.

Oops, when merging ipcbuf.h, I forgot that 'u64' can't be used in
user-visible headers.  This patch corrects the problem, replacing the
unused fields with an array of four __u32s.

Signed-off-by: David Gibson <dwg at au1.ibm.com>

Index: working-2.6/include/asm-powerpc/ipcbuf.h
===================================================================
--- working-2.6.orig/include/asm-powerpc/ipcbuf.h	2005-11-02 10:41:06.000000000 +1100
+++ working-2.6/include/asm-powerpc/ipcbuf.h	2005-11-02 11:41:36.000000000 +1100
@@ -27,8 +27,7 @@
 	__kernel_mode_t	mode;
 	unsigned int	seq;
 	unsigned int	__pad1;
-	u64		__unused1;
-	u64		__unused2;
+	__u32		__unused[4];
 };
 
 #endif /* _ASM_POWERPC_IPCBUF_H */


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/people/dgibson



More information about the Linuxppc64-dev mailing list