linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] use simple_strtoul for unsigned kernel parameters
@ 2003-08-18 17:59 John Bradford
  0 siblings, 0 replies; 13+ messages in thread
From: John Bradford @ 2003-08-18 17:59 UTC (permalink / raw)
  To: john, lm; +Cc: alan, jamie, linux-kernel, rusty, torvalds

> > > But who cares?  Nobody is going to run a Cray in their home for more than
> > > a few days, the power draw would get too expensive.  So this is well into
> > > "angels in the head of a pin" land.
> > 
> > Far from it - the phase converter info has re-awakened my dream of
> > owning a VAX 11/780, and I'm sure I'm not the only one...
>
> Great, then trundle over to comp.sys.dec and have the big fun.  10 seconds
> in google groups would have found you all the info you want.

Good point -  I obviously didn't put too much effort in before the
dream died off the first time :-/.

John.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH] use simple_strtoul for unsigned kernel parameters
@ 2003-08-18 17:40 John Bradford
  2003-08-18 17:39 ` Larry McVoy
  0 siblings, 1 reply; 13+ messages in thread
From: John Bradford @ 2003-08-18 17:40 UTC (permalink / raw)
  To: john, lm; +Cc: alan, jamie, linux-kernel, rusty, torvalds

> > Hmmm, at least some Cray machines require three-phase power, though,
> > which is a problem for home use.
>
> Huh?  You can get phase converters.  It's a common thing to do for home
> shops with metal working tools.

Interesting, I didn't know you could buy phase converters...

> But who cares?  Nobody is going to run a Cray in their home for more than
> a few days, the power draw would get too expensive.  So this is well into
> "angels in the head of a pin" land.

Far from it - the phase converter info has re-awakened my dream of
owning a VAX 11/780, and I'm sure I'm not the only one...

John.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH] use simple_strtoul for unsigned kernel parameters
@ 2003-08-18 17:18 John Bradford
  2003-08-18 17:15 ` Larry McVoy
  0 siblings, 1 reply; 13+ messages in thread
From: John Bradford @ 2003-08-18 17:18 UTC (permalink / raw)
  To: alan, torvalds; +Cc: jamie, linux-kernel, rusty

> > Well, in theory short/int/long can all be the same size and thus a
> > "unsigned short" may not actually fit in a "long". I think that was the
> > case on the old 64-bit cray machines, for example ("char" was a very slow
> > 8-bit thing, everything else was purely 64-bit).
> > 
> > Not likely something we want to port Linux to, admittedly.
>
> Bear in mind we have the compiler source 8). If someone desperately
> wants to run Linux (probably ucLinux) on their cray they can fix the
> types too.

Hmmm, at least some Cray machines require three-phase power, though,
which is a problem for home use.

Do Cray boxes support virtualisation in hardware, or is it all done in
software?

> Things like the DEC10 (9,18,36 bit) and HLH Orion (word addressed) would
> be a lot more fun but thankfully are extinct 

No architecture is _thankfully_ extinct :-).

John.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH] use simple_strtoul for unsigned kernel parameters
@ 2003-08-18  0:46 Jamie Lokier
  2003-08-18 10:13 ` Rusty Russell
  0 siblings, 1 reply; 13+ messages in thread
From: Jamie Lokier @ 2003-08-18  0:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Rusty Russell, linux-kernel

The largest "unsigned int" value doesn't fit in a "long", on many machines.
So we should use simple_strtoul, not simple_strtol, to decode these values.

Enjoy,
-- Jamie

--- orig-2.5.75/kernel/params.c	2003-07-08 21:44:26.000000000 +0100
+++ laptop-2.5.75/kernel/params.c	2003-08-17 03:17:40.116594605 +0100
@@ -165,9 +165,9 @@
 	}
 
 STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol);
-STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", long, simple_strtol);
+STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, simple_strtoul);
 STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol);
-STANDARD_PARAM_DEF(uint, unsigned int, "%u", long, simple_strtol);
+STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, simple_strtoul);
 STANDARD_PARAM_DEF(long, long, "%li", long, simple_strtol);
 STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, simple_strtoul);
 

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

end of thread, other threads:[~2003-08-18 19:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 17:59 [PATCH] use simple_strtoul for unsigned kernel parameters John Bradford
  -- strict thread matches above, loose matches on Subject: below --
2003-08-18 17:40 John Bradford
2003-08-18 17:39 ` Larry McVoy
2003-08-18 17:18 John Bradford
2003-08-18 17:15 ` Larry McVoy
2003-08-18 19:17   ` Alan Cox
2003-08-18  0:46 Jamie Lokier
2003-08-18 10:13 ` Rusty Russell
2003-08-18 12:09   ` Jamie Lokier
2003-08-18 15:32     ` Rusty Russell
2003-08-18 15:20   ` Linus Torvalds
2003-08-18 15:31     ` Jamie Lokier
2003-08-18 16:43     ` Alan Cox

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).