cpu_init_small_core() records in the pcpu area that a CPU is an Intel
small (Atom) core, and that it needs the workaround for INVLPG not
flushing global TLB entries when PCID is enabled. hammer_time() calls
it for the BSP before the BSP has a pcpu area: the temporary one is
zeroed and installed only later, and pmap_bootstrap() then replaces it
with the final one, zeroed again. The BSP therefore never has
pc_small_core or pc_pcid_invlpg_workaround set, while the APs, which
call it from initializecpu(), do.
On a hybrid machine the BSP is normally a large core and nothing is
missing. On a machine with small cores only, such as an Atom C1110 or
x7809C, the BSP is one of them, and its invalidations of kernel
mappings in pmap_invlpg(), pmap_invalidate_range() and the shootdown
handler go without the workaround.
Do it in amd64_bsp_pcpu_init1() instead, which runs for both of the
BSP's pcpu areas once %gs points at them. The PCID features and
tunables it depends on are still evaluated first.
Fixes: a2c08eba43a2 ("amd64: be more precise when...")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")