Re: [PATCH 30/56] microblaze_v2: includes SHM*, msgbuf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 04 May 2008, monstr@xxxxxxxxx wrote:

>  include/asm-microblaze/msgbuf.h   |   41 +++++++++++++++++++++++++++++
>  include/asm-microblaze/shmbuf.h   |   52 +++++++++++++++++++++++++++++++++++++
>  include/asm-microblaze/shmparam.h |   16 +++++++++++
>  3 files changed, 109 insertions(+), 0 deletions(-)
>  create mode 100644 include/asm-microblaze/msgbuf.h
>  create mode 100644 include/asm-microblaze/shmbuf.h
>  create mode 100644 include/asm-microblaze/shmparam.h

Along with cleaning up the syscall interface, you should create asm-generic
versions of these files, ipcbuf.h and sembuf.h belong in the same category
(sysv IPC).

Unfortunately, most architectures have slightly different versions of them,
few of them really getting it right.
The version you have copied to microblaze is correct for little-endian
32 bit architectures, but not for big-endian architectures. The only
big-endian architectures that correctly implement padding are parisc,
powerpc, sparc, and the only one that gets 32 bit emulation right is
parisc (which, btw is a common scheme: if you want to know how to do
it, look at the parisc code).

I suppose it doesn't really matter much now, because SysV IPC is not
used a lot any more, and people have learned to live with the ill-defined
data structures. Most architectures have made the same mistake by
blindly copying the i386 version, so I'd suggest you take the version
you have and move that to asm-generic/{msg,shm,sem,ipc}buf.h, and
asm-generic/shmparam.h, so that every architecture using a copy of the
i386 headers can move to the generic one.

	Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux