HomeFreeBSD

Reuse gp register for pcpu pointer.

Description

Reuse gp register for pcpu pointer.

gp (global pointer) is used by compiler in userland only,
so re-use it for pcpup in kernel, save it on stack on switching
out to userland and load back on return to kernel.

Discussed with: jhb, andrew, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5178

Details

Provenance
brAuthored on
Differential Revision
D5178: Re-use gp register for PCPU.
Parents
rS295252: ARM: Don't use ugly (and hidden) global variable, control register is
Branches
Unknown
Tags
Unknown