[PATCH v1 12/38] arm64/sme: Provide ABI documentation for SME

Mark Brown broonie at kernel.org
Wed Oct 13 11:37:30 PDT 2021


On Tue, Oct 12, 2021 at 09:23:21AM +0100, Szabolcs Nagy wrote:
> The 10/11/2021 21:10, Mark Brown wrote:

> > OK, that makes sense.  I've changed the code and the kselftest so that
> > TPIDR2 is preserved on thread creation.

> does thread creation have to work the same way as fork?

> (in a pthread_create child we want tpidr2 to be 0,
> since it represents thread specific data. in a fork
> child we want to preserve tpidr2 to mirror the
> state of the parent as much as possible)

...

> i'm not sure when to do tpidr2=0 exactly, but something
> like CLONE_SETTLS is set or child runs on a new stack
> would work for me. if that's too ugly then preserving
> tpidr2 in the child is fine.

Resetting it on CLONE_SETTLS is straightforward to implement so if that
works for you it sounds good to me, I've got it implemented locally
already with a test case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211013/9fceae1c/attachment.sig>


More information about the linux-arm-kernel mailing list