[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 03/16] x86/numa: vmap the pages for memnodemap
From: Hongyan Xia <hongyxia@xxxxxxxxxx> This avoids the assumption that there is a direct map and boot pages fall inside the direct map. Clean up the variables so that mfn actually stores a type-safe mfn. Signed-off-by: Hongyan Xia <hongyxia@xxxxxxxxxx> --- xen/arch/x86/numa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c index f1066c59c7..51eca3f3fc 100644 --- a/xen/arch/x86/numa.c +++ b/xen/arch/x86/numa.c @@ -100,13 +100,13 @@ static int __init populate_memnodemap(const struct node *nodes, static int __init allocate_cachealigned_memnodemap(void) { unsigned long size = PFN_UP(memnodemapsize * sizeof(*memnodemap)); - unsigned long mfn = mfn_x(alloc_boot_pages(size, 1)); + mfn_t mfn = alloc_boot_pages(size, 1); - memnodemap = mfn_to_virt(mfn); - mfn <<= PAGE_SHIFT; + memnodemap = vmap_boot_pages(mfn, size); + BUG_ON(!memnodemap); size <<= PAGE_SHIFT; printk(KERN_DEBUG "NUMA: Allocated memnodemap from %lx - %lx\n", - mfn, mfn + size); + mfn_to_maddr(mfn), mfn_to_maddr(mfn) + size); memnodemapsize = size / sizeof(*memnodemap); return 0; -- 2.24.1.AMZN
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |