diff --git a/xen/include/xen/numa.h b/xen/include/xen/numa.h index 5b3877344b..04556f3a6f 100644 --- a/xen/include/xen/numa.h +++ b/xen/include/xen/numa.h @@ -35,8 +35,6 @@ struct node { extern int compute_hash_shift(const struct node *nodes, unsigned int numnodes, const nodeid_t *nodeids); -#define VIRTUAL_BUG_ON(x) - extern bool numa_off; extern void numa_add_cpu(unsigned int cpu); @@ -69,9 +67,9 @@ extern struct node_data node_data[]; static inline nodeid_t __attribute_pure__ phys_to_nid(paddr_t addr) { nodeid_t nid; - VIRTUAL_BUG_ON((paddr_to_pdx(addr) >> memnode_shift) >= memnodemapsize); + ASSERT((paddr_to_pdx(addr) >> memnode_shift) < memnodemapsize); nid = memnodemap[paddr_to_pdx(addr) >> memnode_shift]; - VIRTUAL_BUG_ON(nid >= MAX_NUMNODES || !node_data[nid]); + ASSERT(nid < MAX_NUMNODES && node_data[nid].node_spanned_pages); return nid; }