[parisc-linux] Lightweight syscalls
Matthew Wilcox
matthew@wil.cx
Wed, 4 Apr 2001 19:57:32 +0100
I've just written a `lightweight syscall' which will be used to set cr27
to a per-thread value. Comments, criticism, etc all welcome.
set_thread_pointer:
gate .+8, %r0 /* increase privilege */
depi 3, 31, 2, %r31 /* Ensure we return into user mode. */
be 0(%sr3,%r31) /* return to user space */
mtctl %r26, %cr27 /* move arg0 to the control register */
note that the intended model is to place this at a fixed location on the
gateway page, and it will be called with BLE. I haven't tested this yet,
in the best traditions of linux :-)
--
Revolutions do not require corporate support.