]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove the secondary_stacks array in arm64 and riscv kernels.
authormarkj <markj@FreeBSD.org>
Tue, 24 Mar 2020 18:43:23 +0000 (18:43 +0000)
committermarkj <markj@FreeBSD.org>
Tue, 24 Mar 2020 18:43:23 +0000 (18:43 +0000)
commitb18019e1704ddec73ee5470c5e5e5a04cccdd925
tree2d51ab774539044b4083ee7d30ffe25f67cee006
parent803634f28e06f456f63fcac8d66b92bf621b7bfb
Remove the secondary_stacks array in arm64 and riscv kernels.

Instead, dynamically allocate a page for the boot stack of each AP when
starting them up, like we do on x86.  This shrinks the bss by
MAXCPU*KSTACK_PAGES pages, which corresponds to 4MB on arm64 and 256KB
on riscv.

Duplicate the logic used on x86 to free the bootstacks, by using a
sysinit to wait for each AP to switch to a thread before freeing its
stack.

While here, mark some static MD variables as such.

Reviewed by: kib
MFC after: 1 month
Sponsored by: Juniper Networks, Klara Inc.
Differential Revision: https://reviews.freebsd.org/D24158
sys/arm64/arm64/locore.S
sys/arm64/arm64/mp_machdep.c
sys/riscv/riscv/locore.S
sys/riscv/riscv/mp_machdep.c