On 8 November 2011 05:50, Jean-Yves Migeon <jeanyves.mig...@free.fr> wrote: > On 06.11.2011 16:18, Cherry G. Mathew wrote: >> Module Name: src >> Committed By: cherry >> Date: Sun Nov 6 15:18:19 UTC 2011 >> >> Modified Files: >> src/sys/arch/amd64/include: pmap.h >> src/sys/arch/i386/include: pmap.h >> src/sys/arch/x86/include: cpu.h >> src/sys/arch/x86/x86: pmap.c >> src/sys/arch/xen/x86: cpu.c x86_xpmap.c >> >> Log Message: >> [merging from cherry-xenmp] make pmap_kernel() shadow PMD per-cpu and MP >> aware. > > Some comments. > >> -#ifdef PAE >> -/* Address of the static kernel's L2 page */ >> -pd_entry_t *pmap_kl2pd; >> -paddr_t pmap_kl2paddr; >> -#endif >> - >> - > [snip] >> #ifdef PAE >> - uint32_t ci_pae_l3_pdirpa; /* PA of L3 PD */ >> + paddr_t ci_pae_l3_pdirpa; /* PA of L3 PD */ >> pd_entry_t * ci_pae_l3_pdir; /* VA pointer to L3 PD */ >> #endif >> > [snip] >> + >> +#if defined(PAE) >> + ci->ci_pae_l3_pdir = (paddr_t *)uvm_km_alloc(kernel_map, PAGE_SIZE, >> 0, >> + UVM_KMF_WIRED | UVM_KMF_ZERO | UVM_KMF_NOWAIT); >> + >> + if (ci->ci_pae_l3_pdir == NULL) { >> + panic("%s: failed to allocate L3 per-cpu PD for CPU %d\n", >> + __func__, cpu_index(ci)); >> + } > > Please keep ci_pae_l3_pdir to a uint32_t and back out its paddr_t type. >
Done. Forgot to attribute your suggestion + this thread in the commit log. I hope this makes up for it :-) -- ~Cherry