lkml.org 
[lkml]   [2008]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 30/56] microblaze_v2: includes SHM*, msgbuf
Date
On Sunday 04 May 2008, monstr@seznam.cz 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 <><


\
 
 \ /
  Last update: 2008-05-04 23:13    [W:0.332 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site