diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-05-29 18:06:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:21 -0400 |
commit | a62e2f4f508863da8e0c2f2b42f5252a87330297 (patch) | |
tree | b9f6f77322d9a72ba753e45bd8671fecf4016c1a /mm/memory_hotplug.c | |
parent | 3af684c7c5b3dddf7c5d83b8ad431380cdc6f164 (diff) |
mm: print physical addresses consistently with other parts of kernel
Print physical address info in a style consistent with the %pR style used
elsewhere in the kernel. For example:
-Zone PFN ranges:
+Zone ranges:
- DMA32 0x00000010 -> 0x00100000
+ DMA32 [mem 0x00010000-0xffffffff]
- Normal 0x00100000 -> 0x01080000
+ Normal [mem 0x100000000-0x107fffffff]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index fc898cb4fe8f..0d7e3ec8e0f3 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -74,8 +74,7 @@ static struct resource *register_memory_resource(u64 start, u64 size) | |||
74 | res->end = start + size - 1; | 74 | res->end = start + size - 1; |
75 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 75 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
76 | if (request_resource(&iomem_resource, res) < 0) { | 76 | if (request_resource(&iomem_resource, res) < 0) { |
77 | printk("System RAM resource %llx - %llx cannot be added\n", | 77 | printk("System RAM resource %pR cannot be added\n", res); |
78 | (unsigned long long)res->start, (unsigned long long)res->end); | ||
79 | kfree(res); | 78 | kfree(res); |
80 | res = NULL; | 79 | res = NULL; |
81 | } | 80 | } |
@@ -502,8 +501,10 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages) | |||
502 | online_pages_range); | 501 | online_pages_range); |
503 | if (ret) { | 502 | if (ret) { |
504 | mutex_unlock(&zonelists_mutex); | 503 | mutex_unlock(&zonelists_mutex); |
505 | printk(KERN_DEBUG "online_pages %lx at %lx failed\n", | 504 | printk(KERN_DEBUG "online_pages [mem %#010llx-%#010llx] failed\n", |
506 | nr_pages, pfn); | 505 | (unsigned long long) pfn << PAGE_SHIFT, |
506 | (((unsigned long long) pfn + nr_pages) | ||
507 | << PAGE_SHIFT) - 1); | ||
507 | memory_notify(MEM_CANCEL_ONLINE, &arg); | 508 | memory_notify(MEM_CANCEL_ONLINE, &arg); |
508 | unlock_memory_hotplug(); | 509 | unlock_memory_hotplug(); |
509 | return ret; | 510 | return ret; |
@@ -977,8 +978,9 @@ repeat: | |||
977 | return 0; | 978 | return 0; |
978 | 979 | ||
979 | failed_removal: | 980 | failed_removal: |
980 | printk(KERN_INFO "memory offlining %lx to %lx failed\n", | 981 | printk(KERN_INFO "memory offlining [mem %#010llx-%#010llx] failed\n", |
981 | start_pfn, end_pfn); | 982 | (unsigned long long) start_pfn << PAGE_SHIFT, |
983 | ((unsigned long long) end_pfn << PAGE_SHIFT) - 1); | ||
982 | memory_notify(MEM_CANCEL_OFFLINE, &arg); | 984 | memory_notify(MEM_CANCEL_OFFLINE, &arg); |
983 | /* pushback to free area */ | 985 | /* pushback to free area */ |
984 | undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); | 986 | undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE); |