[RFC] Enable use of UserLocal Register (ULRI) if detected (patches)

Warner Losh wlosh at bsdimp.com
Wed Feb 19 20:37:04 UTC 2014


On Feb 19, 2014, at 11:39 AM, Stacey Son wrote:

> 
> On Feb 19, 2014, at 11:52 AM, Warner Losh <wlosh at bsdimp.com> wrote:
> 
>> +/* Register numbers */
>> +#define	_V0	2
>> +#define	_A1	5
>> +#define	_T0	12
>> +#define	_RA	31
>> 
>> We already have defines for these registers elsewhere. Any reason why you chose not to use them? Also, is there any ABI difference to be worried about?
> 
> Hmm...  I missed these in sys/mips/include/regnum.h for some reason.  :)
> 
>> The rest looks generally good, apart from references to git versions that might be difficult to find in the future. Consider moving details inline instead.
> 
> That was really just a note to myself that I forgot to remove.
> 
> I have refreshed the patch with these changes:
> 
> http://people.freebsd.org/~sson/mips/ulri/ulri_kernel.diff

Did you upload the right patch, since this seems to be using the new #defines still..


>>> The final patch is for qemu system-mode that adds support for the ULRI:
>>> 
>>> http://people.freebsd.org/~sson/mips/ulri/ulri_qemu.diff
>> 
>> Can't say about these...
> 
> Qemu, like a lot of MIPS hardware it seems, doesn't support the ULRI.   The above is a just quick hack to qemu to add support as a 'FYI'.   I should maybe clean it up and submit it to the qemu development list.

OK. I'll have to give these patches a spin on my octeon boards. I'd had a conversation with one if Cavium's engineers years ago where he said that he wished FreeBSD implemented TLS this way, implying cavium has them. But seeing the other note from Juli makes me unsure (since she would know better than I)...

Warner


More information about the freebsd-mips mailing list