Skip to contentSkip to conversation

Lightweight syscalls

parisc-linux Matthew Wilcox 1 participant 1 message Apr 4, 2001

lore
Share & tools
lore
#0 lore raw

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

Signature · 1 line
Revolutions do not require corporate support.