public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Minor header bug? MIPS (32-bit) nlink_t sign
@ 2003-01-18  3:34 Jamie Lokier
  2003-01-21  5:09 ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Jamie Lokier @ 2003-01-18  3:34 UTC (permalink / raw)
  To: Ralf Baechle, linux-kernel; +Cc: Stephen Rothwell

Linux/MIPS32 is unusual in that its type of nlink_t is signed.  In the
header <asm-mips64/posix_types.h>, the 32-bit compatibility type for
nlink_t is defined as unsigned.  Perhaps this is because the MIPS
64-bit nlink_t is always unsigned.

Which header is correct - and which should be changed for consistency -
<asm-mips/posix_types.h> or <asm-mips64/posix_types.h>?

Stephen, I guess you have already figured this out with your recent
32-bit compatibility cleanup?

cheers,
-- Jamie

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Minor header bug? MIPS (32-bit) nlink_t sign
  2003-01-18  3:34 Minor header bug? MIPS (32-bit) nlink_t sign Jamie Lokier
@ 2003-01-21  5:09 ` Stephen Rothwell
  2003-01-21  6:18   ` David S. Miller
  2003-01-21  9:00   ` Ralf Baechle
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2003-01-21  5:09 UTC (permalink / raw)
  To: Jamie Lokier; +Cc: ralf, linux-kernel

Hi Jamie,

On Sat, 18 Jan 2003 03:34:35 +0000 Jamie Lokier <jamie@shareable.org> wrote:
>
> Stephen, I guess you have already figured this out with your recent
> 32-bit compatibility cleanup?

I mainly did direct substitutions, but will have a look shortly and see
what I think.

I assume we are being compatable with Irix? Ralf?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Minor header bug? MIPS (32-bit) nlink_t sign
  2003-01-21  5:09 ` Stephen Rothwell
@ 2003-01-21  6:18   ` David S. Miller
  2003-01-21  9:00   ` Ralf Baechle
  1 sibling, 0 replies; 5+ messages in thread
From: David S. Miller @ 2003-01-21  6:18 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jamie Lokier, ralf, linux-kernel

On Mon, 2003-01-20 at 21:09, Stephen Rothwell wrote:
> On Sat, 18 Jan 2003 03:34:35 +0000 Jamie Lokier <jamie@shareable.org> wrote:
> >
> > Stephen, I guess you have already figured this out with your recent
> > 32-bit compatibility cleanup?
> 
> I mainly did direct substitutions, but will have a look shortly and see
> what I think.
> 
> I assume we are being compatable with Irix? Ralf?

nlink_t is a signed short on sparc32 as well, and yes this is to
be compatible with SunOS


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Minor header bug? MIPS (32-bit) nlink_t sign
  2003-01-21  5:09 ` Stephen Rothwell
  2003-01-21  6:18   ` David S. Miller
@ 2003-01-21  9:00   ` Ralf Baechle
  2003-01-21 11:53     ` Jamie Lokier
  1 sibling, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2003-01-21  9:00 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Jamie Lokier, linux-kernel

On Tue, Jan 21, 2003 at 04:09:59PM +1100, Stephen Rothwell wrote:

> > Stephen, I guess you have already figured this out with your recent
> > 32-bit compatibility cleanup?
> 
> I mainly did direct substitutions, but will have a look shortly and see
> what I think.
> 
> I assume we are being compatable with Irix? Ralf?

Dunno where the signed int for nlink_t did come from.  The original idea
was to avoid pointless creativity and choose data types to match IRIX
rsp. the MIPS psABI.  As using a signed type didn't create any visible
problems so far this never got noticed until Jamie Lokier mailed me last
week.  I now changed the definition to unsigned long for the 32-bit
kernel and unsigned int for the 64-bit kernel.

  Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Minor header bug? MIPS (32-bit) nlink_t sign
  2003-01-21  9:00   ` Ralf Baechle
@ 2003-01-21 11:53     ` Jamie Lokier
  0 siblings, 0 replies; 5+ messages in thread
From: Jamie Lokier @ 2003-01-21 11:53 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Stephen Rothwell, linux-kernel

Ralf Baechle wrote:
> > I assume we are being compatable with Irix? Ralf?
> 
> Dunno where the signed int for nlink_t did come from.  The original idea
> was to avoid pointless creativity and choose data types to match IRIX
> rsp. the MIPS psABI.

(I've been going through all the <asm-*/*.h> API files, and there is a
lot of duplication, with very small variations.  It was with a view to
getting rid of some of the duplication, and making it easy to see what
the _real_ differences are).

MIPS and Sparc are the only architectures that decided to be really
different to all the other Linux archs).

Anyway, I spotted another MIPS suggestion:

	asm-mips/siginfo.h:

	The comments explain that siginfo_t is IRIX compatible with
	extensions.  In fact it is not IRIX compatible, now that
	siginfo_t._sigchld has an additional _uid field in the middle
	of it.  So it's compatible for _some_ uses only.

	It's obvious that the code author knew of this change (because
	_irix_sigchld is there to document it), but didn't change the
	comment.

Suggestion:

	That comment should be removed or changed as siginfo_t
	is not IRIX compatible, at least in this part.  And maybe
	_irix_sigchld should be removed, along with the comment.

cheers,
-- Jamie

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-21 11:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-18  3:34 Minor header bug? MIPS (32-bit) nlink_t sign Jamie Lokier
2003-01-21  5:09 ` Stephen Rothwell
2003-01-21  6:18   ` David S. Miller
2003-01-21  9:00   ` Ralf Baechle
2003-01-21 11:53     ` Jamie Lokier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox