Index: sys/arm/arm/pmap-v6.c =================================================================== --- sys/arm/arm/pmap-v6.c +++ sys/arm/arm/pmap-v6.c @@ -1160,11 +1160,11 @@ * Local CMAP1/CMAP2 are used for zeroing and copying pages. * Local CMAP2 is also used for data cache cleaning. */ - pc = pcpu_find(curcpu); + pc = get_pcpu(); mtx_init(&pc->pc_cmap_lock, "SYSMAPS", NULL, MTX_DEF); SYSMAP(caddr_t, pc->pc_cmap1_pte2p, pc->pc_cmap1_addr, 1); SYSMAP(caddr_t, pc->pc_cmap2_pte2p, pc->pc_cmap2_addr, 1); - SYSMAP(vm_offset_t, unused, pc->pc_qmap_addr, 1); + SYSMAP(vm_offset_t, pc->pc_qmap_pte2p, pc->pc_qmap_addr, 1); /* * Crashdump maps. @@ -1217,6 +1217,7 @@ panic("%s: unable to allocate KVA", __func__); pc->pc_cmap1_pte2p = pt2map_entry(pages); pc->pc_cmap2_pte2p = pt2map_entry(pages + PAGE_SIZE); + pc->pc_qmap_pte2p = pt2map_entry(pages + (PAGE_SIZE * 2)); pc->pc_cmap1_addr = (caddr_t)pages; pc->pc_cmap2_addr = (caddr_t)(pages + PAGE_SIZE); pc->pc_qmap_addr = pages + (PAGE_SIZE * 2); @@ -1584,7 +1585,7 @@ * to sync it even if the sync is only DSB. */ sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); if (pte2_load(cmap2_pte2p) != 0) @@ -5661,7 +5662,7 @@ if (ma != oma) { pa = VM_PAGE_TO_PHYS(m); sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); if (pte2_load(cmap2_pte2p) != 0) @@ -5754,7 +5755,7 @@ struct pcpu *pc; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); if (pte2_load(cmap2_pte2p) != 0) @@ -5781,7 +5782,7 @@ struct pcpu *pc; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); if (pte2_load(cmap2_pte2p) != 0) @@ -5811,7 +5812,7 @@ struct pcpu *pc; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap1_pte2p = pc->pc_cmap1_pte2p; cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); @@ -5846,7 +5847,7 @@ int cnt; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap1_pte2p = pc->pc_cmap1_pte2p; cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); @@ -5885,12 +5886,14 @@ vm_offset_t pmap_quick_enter_page(vm_page_t m) { + struct pcpu *pc; pt2_entry_t *pte2p; vm_offset_t qmap_addr; critical_enter(); - qmap_addr = PCPU_GET(qmap_addr); - pte2p = pt2map_entry(qmap_addr); + pc = get_pcpu(); + qmap_addr = pc->pc_qmap_addr; + pte2p = pc->pc_qmap_pte2p; KASSERT(pte2_load(pte2p) == 0, ("%s: PTE2 busy", __func__)); @@ -5902,11 +5905,13 @@ void pmap_quick_remove_page(vm_offset_t addr) { + struct pcpu *pc; pt2_entry_t *pte2p; vm_offset_t qmap_addr; - qmap_addr = PCPU_GET(qmap_addr); - pte2p = pt2map_entry(qmap_addr); + pc = get_pcpu(); + qmap_addr = pc->pc_qmap_addr; + pte2p = pc->pc_qmap_pte2p; KASSERT(addr == qmap_addr, ("%s: invalid address", __func__)); KASSERT(pte2_load(pte2p) != 0, ("%s: PTE2 not in use", __func__)); @@ -6212,7 +6217,7 @@ ("%s: not on single page", __func__)); sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); if (pte2_load(cmap2_pte2p) != 0) @@ -6477,7 +6482,7 @@ struct pcpu *pc; sched_pin(); - pc = pcpu_find(curcpu); + pc = get_pcpu(); cmap2_pte2p = pc->pc_cmap2_pte2p; mtx_lock(&pc->pc_cmap_lock); if (pte2_load(cmap2_pte2p) != 0) Index: sys/arm/include/pcpu.h =================================================================== --- sys/arm/include/pcpu.h +++ sys/arm/include/pcpu.h @@ -54,15 +54,13 @@ caddr_t pc_cmap1_addr; \ caddr_t pc_cmap2_addr; \ vm_offset_t pc_qmap_addr; \ - void *pc_qmap_pte; \ + void *pc_qmap_pte2p; \ unsigned int pc_dbreg[32]; \ int pc_dbreg_cmd; \ char __pad[27] #else #define PCPU_MD_FIELDS \ - vm_offset_t qmap_addr; \ - void *pc_qmap_pte; \ - char __pad[149] + char __pad[157] #endif #ifdef _KERNEL