ARM: support THREAD_INFO_IN_TASK

Move thread_info off the stack and into the task struct, as is done by
 many other architectures. This requires a method to find the task struct
 of the task currently running on the CPU, which is provided in this case
 by the user space TLS (Thread Local Storage) register. This implies that
 the feature is only supported on CPUs that implement this register,
 i.e., ARM v6k or later.
 
 Kindly tested by Amit and reviewed by Linus. The first patch is against
 the GCC plugins subsystem, but was reviewed by the maintainer and can be
 taken through the ARM tree.
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE+9lifEBpyUIVN1cpw08iOZLZjyQFAmFR3FQACgkQw08iOZLZ
 jySeZQwAoeDNTyw6YEZO1A8zhvzv0o3tuq2ifWTK2p8P6sJ9dbbghCN1wZtaYhcz
 YM7rDHGRlu9wT1ad/fYEsZTRnZ6/RlrKoJKF8921mXIMBRHPC4KXDJwsXxvZAjS8
 MB4FEPPN80H3MLIR4d16NBlVjcXuQ+J5+mBMcFRIP2zSdOTFkgS7yCP8dy+ryDLe
 TDJvh/N7ig6DszEEKo7uLIRSt2MIYN7rHPVuKxDDHgKLq/bYDxh+qHprXwhtnxWw
 CGlUmOXBSFuSMyAQ1WHr4ZDyHolfL89U++a+ZH/TQB38PY/2bCCdUbx5np7q7Jv5
 n/eL5Up70+gx9FH7XIAXRpPKJzrQEn0vrQLKBsOLqBNX1lXH1I/IE+GavfRLXbkV
 9ZEo1hj/v1DiLQdrCuoxMFwXZryQ5/KQfolFEjPKS6bbqStAO1S3jrEQtzt2JGo3
 PW5UA0ZQC1nwc/l9GoG/AEm1QV4aHxKqLdFQV0L/ZBN0KOL+xsJYb7dm8mIhLzzh
 xGWDOD7a
 =fGHe
 -----END PGP SIGNATURE-----

Merge tag 'pr-arm32-ti-in-task' of git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux into devel-stable

ARM: support THREAD_INFO_IN_TASK

Move thread_info off the stack and into the task struct, as is done by
many other architectures. This requires a method to find the task struct
of the task currently running on the CPU, which is provided in this case
by the user space TLS (Thread Local Storage) register. This implies that
the feature is only supported on CPUs that implement this register,
i.e., ARM v6k or later.

Kindly tested by Amit and reviewed by Linus. The first patch is against
the GCC plugins subsystem, but was reviewed by the maintainer and can be
taken through the ARM tree.
This commit is contained in:
Russell King (Oracle) 2021-10-19 10:41:57 +01:00
commit 13a695aa50
20 changed files with 174 additions and 50 deletions