I don't see any 64-bit integers here.

Of course not. This is the routine which is called from 32-bit code.
The prototype in the 32-bit code is (int, unsigned, loff_t, loff_t).

Ah I see, sorry for the confusion.

Also, you might want to put something in the syscall file about signed
vs unsigned arguments and how they behave with 32-on-64 systems.

"Both work / unsigned is better / use unsigned whenever
possible" -- but that's true for all C coding.  Wouldn't
hurt to repeat it though :-)

Don't we need (int)(-1) to be represented as 0xFFFFFFFFFFFFFFFF in a
register in 64-bit code, while we only get 0xFFFFFFFF passed in from
userspace?

Yes exactly, signed integers need sign extensions, which
makes them less efficient.  Some ABIs need zero extensions
too, but on a whole unsigned works better.  Most of the
time you don't need to do much on the (C code) kernel side
of things.

Is this enough handwaving?  I'm sure someone else can explain
this a lot better than me :-)


Segher

-
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to