diff options
Diffstat (limited to 'usr/src/uts/i86pc/os/startup.c')
-rw-r--r-- | usr/src/uts/i86pc/os/startup.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/src/uts/i86pc/os/startup.c b/usr/src/uts/i86pc/os/startup.c index e98f049391..dfbb83cd15 100644 --- a/usr/src/uts/i86pc/os/startup.c +++ b/usr/src/uts/i86pc/os/startup.c @@ -2610,9 +2610,7 @@ add_physmem_cb(page_t *pp, pfn_t pnum) * kphysm_init() initializes physical memory. */ static pgcnt_t -kphysm_init( - page_t *pp, - pgcnt_t npages) +kphysm_init(page_t *pp, pgcnt_t npages) { struct memlist *pmem; struct memseg *cur_memseg; @@ -2686,9 +2684,8 @@ kphysm_init( * of these large pages, configure the memsegs based on the * memory node ranges which had been made non-contiguous. */ + end_pfn = base_pfn + num - 1; if (mnode_xwa > 1) { - - end_pfn = base_pfn + num - 1; ms = PFN_2_MEM_NODE(base_pfn); me = PFN_2_MEM_NODE(end_pfn); @@ -2747,8 +2744,14 @@ kphysm_init( /* process next memory node range */ ms++; base_pfn = mem_node_config[ms].physbase; - num = MIN(mem_node_config[ms].physmax, - end_pfn) - base_pfn + 1; + + if (mnode_xwa > 1) { + num = MIN(mem_node_config[ms].physmax, + end_pfn) - base_pfn + 1; + } else { + num = mem_node_config[ms].physmax - + base_pfn + 1; + } } } |