diff options
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/numa_32.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c index abf1247a4c32..d0369a56f843 100644 --- a/arch/x86/mm/numa_32.c +++ b/arch/x86/mm/numa_32.c | |||
@@ -414,3 +414,37 @@ int memory_add_physaddr_to_nid(u64 addr) | |||
414 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); | 414 | EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); |
415 | #endif | 415 | #endif |
416 | 416 | ||
417 | /* temporary shim, will go away soon */ | ||
418 | int __init numa_add_memblk(int nid, u64 start, u64 end) | ||
419 | { | ||
420 | unsigned long start_pfn = start >> PAGE_SHIFT; | ||
421 | unsigned long end_pfn = end >> PAGE_SHIFT; | ||
422 | |||
423 | printk(KERN_DEBUG "nid %d start_pfn %08lx end_pfn %08lx\n", | ||
424 | nid, start_pfn, end_pfn); | ||
425 | |||
426 | if (start >= (u64)max_pfn << PAGE_SHIFT) { | ||
427 | printk(KERN_INFO "Ignoring SRAT pfns: %08lx - %08lx\n", | ||
428 | start_pfn, end_pfn); | ||
429 | return 0; | ||
430 | } | ||
431 | |||
432 | node_set_online(nid); | ||
433 | memblock_x86_register_active_regions(nid, start_pfn, | ||
434 | min(end_pfn, max_pfn)); | ||
435 | |||
436 | if (!node_has_online_mem(nid)) { | ||
437 | node_start_pfn[nid] = start_pfn; | ||
438 | node_end_pfn[nid] = end_pfn; | ||
439 | } else { | ||
440 | node_start_pfn[nid] = min(node_start_pfn[nid], start_pfn); | ||
441 | node_end_pfn[nid] = max(node_end_pfn[nid], end_pfn); | ||
442 | } | ||
443 | return 0; | ||
444 | } | ||
445 | |||
446 | /* temporary shim, will go away soon */ | ||
447 | void __init numa_set_distance(int from, int to, int distance) | ||
448 | { | ||
449 | /* nada */ | ||
450 | } | ||