On Thu, 2007-12-13 at 01:21 +0000, Paul Brook wrote: > > - It would be good to limit the changes in the CPU emulation code to > > handle the TLS. For example, on MIPS, the TLS register must not be > > stored in the CPU state. Same for ARM. > > I disagree. The TLS register is part of the CPU state. On many machines > (including ARMv6 CPUs) it's an actual CPU register. I'm fairly sure the same > is true for recent MIPS revisions.
I agree with Paul. Some archs actually use a CPU register and require the kernel to help manage TLS. Other archs can manage TLS completely in user space. It's been a while since I've investigated all the details for each arch but I'll go review it.