diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 629fbc97a5..28963d1419 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -89,7 +89,11 @@ PAGE_LIST_HEAD(page_broken_list); * BOOT-TIME ALLOCATOR */ -static unsigned long __initdata first_valid_mfn = ~0UL; +/* + * first_valid_mfn is exported because it is use in ARM specific NUMA + * helpers. See comment in asm-arm/numa.h. + */ +unsigned long first_valid_mfn = ~0UL; static struct bootmem_region { unsigned long s, e; /* MFNs @s through @e-1 inclusive are free */ diff --git a/xen/include/asm-arm/numa.h b/xen/include/asm-arm/numa.h index a2c1a3476d..7e0b69413d 100644 --- a/xen/include/asm-arm/numa.h +++ b/xen/include/asm-arm/numa.h @@ -12,9 +12,15 @@ static inline __attribute__((pure)) nodeid_t phys_to_nid(paddr_t addr) return 0; } +/* + * TODO: make first_valid_mfn static when NUMA is supported on Arm, this + * is required because the dummy helpers are using it. + */ +extern unsigned long first_valid_mfn; + /* XXX: implement NUMA support */ -#define node_spanned_pages(nid) (total_pages) -#define node_start_pfn(nid) (pdx_to_pfn(frametable_base_pdx)) +#define node_spanned_pages(nid) (max_page - first_valid_mfn) +#define node_start_pfn(nid) (first_valid_mfn) #define __node_distance(a, b) (20) static inline unsigned int arch_get_dma_bitsize(void)