Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2016 12:28:08 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ed Schouten <ed@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r306162 - in head/sys/arm: arm include
Message-ID:  <20160922092808.GR38409@kib.kiev.ua>
In-Reply-To: <201609220815.u8M8F0Lo096297@repo.freebsd.org>
References:  <201609220815.u8M8F0Lo096297@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 22, 2016 at 08:15:00AM +0000, Ed Schouten wrote:
> Author: ed
> Date: Thu Sep 22 08:14:59 2016
> New Revision: 306162
> URL: https://svnweb.freebsd.org/changeset/base/306162
> 
> Log:
>   Make it possible to safely use TPIDRURW from userspace.
>   
>   On amd64, arm64 and i386, we have the possibility to switch between TLS
>   areas in userspace. The nice thing about this is that it makes it easier
>   to do light-weight threading, if we ever feel like doing that. On armv6,
>   let's go into the same direction by making it possible to safely use the
>   TPIDRURW register, which is intended for this purpose.

What do you mean about 'possibility to switch between TLS areas in
usermode' ? On x86, kernel switches %fs/%gs bases on the context
switches. There is, indeed, a way to turn off this functionality, but it
is somewhat unobvious, I have to admit.

E.g. on Ivy+, RDFSBASE/RDGSBASE work.  WRFSBASE/WRGSBASE are enabled,
but they are de-facto not functional, since next context switch overrides
the base, in default setup.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160922092808.GR38409>