On Thursday 06 August 2009 11:01:01 Jamie Lokier wrote: > Michael Schnell wrote: > > I'll take a look if this is viable for the NIOS architecture. > > On noMMU, an alternative to using a vsyscall page is to put the > cmpxchg routine in userspace (in Glibc/uclibc), and tell the kernel > what addresses to check for, with a dedicated system call (just like > set_thread_area has a dedicated system call). The kernel will store > the address in per-task state. > > That will save a memory load on noMMU when calling the routine > because it'll be a direct call instead of indirect.
the Blackfin port does this with a "fixed code" region where we've reserved the lowest 4k of memory: - first 1k is to catch NULL pointers - next ~1k is user-space atomic code (initialized by kernel at boot) so when userspace wants to do atomic functions (since the hardware doesnt support it), it calls the functions hardcoded in this region. when the kernel goes to return to userspace, it checks the PC isnt in this region. if it is, it will finish the atomic operation for userspace and update the PC. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev