amd64: initialize APs kpmap_store in init_secondary()
The APs pcpu area is zeroed in init_secondary() by pcpu_init(), so the early initialization in pmap_bootstrap() is nop. Fixes: 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2ESC Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39945
This commit is contained in:
parent
5fd34912b4
commit
e704f88f3d
@ -215,6 +215,8 @@ init_secondary(void)
|
||||
/* See comment in pmap_bootstrap(). */
|
||||
pc->pc_pcid_next = PMAP_PCID_KERN + 2;
|
||||
pc->pc_pcid_gen = 1;
|
||||
pc->pc_kpmap_store.pm_pcid = PMAP_PCID_KERN;
|
||||
pc->pc_kpmap_store.pm_gen = 1;
|
||||
|
||||
pc->pc_smp_tlb_gen = 1;
|
||||
|
||||
|
@ -2036,13 +2036,9 @@ pmap_bootstrap(vm_paddr_t *firstaddr)
|
||||
if (pmap_pcid_enabled) {
|
||||
kernel_pmap->pm_pcidp = (void *)(uintptr_t)
|
||||
offsetof(struct pcpu, pc_kpmap_store);
|
||||
for (i = 0; i < MAXCPU; i++) {
|
||||
struct pmap_pcid *pcidp;
|
||||
|
||||
pcidp = zpcpu_get_cpu(kernel_pmap->pm_pcidp, i);
|
||||
pcidp->pm_pcid = PMAP_PCID_KERN;
|
||||
pcidp->pm_gen = 1;
|
||||
}
|
||||
PCPU_SET(kpmap_store.pm_pcid, PMAP_PCID_KERN);
|
||||
PCPU_SET(kpmap_store.pm_gen, 1);
|
||||
|
||||
/*
|
||||
* PMAP_PCID_KERN + 1 is used for initialization of
|
||||
|
Loading…
Reference in New Issue
Block a user