提交 5dab8ec1 编写于 作者: P Paul Jackson 提交者: Ingo Molnar

mm, generic, x86 boot: more tweaks to hex prints of some pfn addresses

Fix some problems with (and applies on top of) a previous patch:
  x86 boot: show pfn addresses in hex not decimal in some kernel info printks

Primarily change "0x%8lx" format, which displays with a right aligned
space filled hex number (spaces between the "0x" prefix and the number),
into "%0#10lx" format, which zero fills instead of space fills, and
which uses the printf flag '#' to request the "0x" prefix instead of
hard coding it.

Also replace some other "0x%lx" formats with "%#lx", making use of the
'#' printf flag again.
Signed-off-by: NPaul Jackson <pj@sgi.com>
Cc: "Yinghai Lu" <yhlu.kernel@gmail.com>
Cc: "Jack Steiner" <steiner@sgi.com>
Cc: "Mike Travis" <travis@sgi.com>
Cc: "Huang
Cc: Ying" <ying.huang@intel.com>
Cc: "Andi Kleen" <andi@firstfloor.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 3381959d
...@@ -1014,7 +1014,7 @@ unsigned long __init e820_end_of_ram(void) ...@@ -1014,7 +1014,7 @@ unsigned long __init e820_end_of_ram(void)
if (last_pfn > end_user_pfn) if (last_pfn > end_user_pfn)
last_pfn = end_user_pfn; last_pfn = end_user_pfn;
printk(KERN_INFO "last_pfn = 0x%lx max_arch_pfn = 0x%lx\n", printk(KERN_INFO "last_pfn = %#lx max_arch_pfn = %#lx\n",
last_pfn, max_arch_pfn); last_pfn, max_arch_pfn);
return last_pfn; return last_pfn;
} }
......
...@@ -3520,7 +3520,7 @@ void __init add_active_range(unsigned int nid, unsigned long start_pfn, ...@@ -3520,7 +3520,7 @@ void __init add_active_range(unsigned int nid, unsigned long start_pfn,
{ {
int i; int i;
printk(KERN_DEBUG "Entering add_active_range(%d, 0x%lx, 0x%lx) " printk(KERN_DEBUG "Entering add_active_range(%d, %#lx, %#lx) "
"%d entries of %d used\n", "%d entries of %d used\n",
nid, start_pfn, end_pfn, nid, start_pfn, end_pfn,
nr_nodemap_entries, MAX_ACTIVE_REGIONS); nr_nodemap_entries, MAX_ACTIVE_REGIONS);
...@@ -3936,7 +3936,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn) ...@@ -3936,7 +3936,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn)
for (i = 0; i < MAX_NR_ZONES; i++) { for (i = 0; i < MAX_NR_ZONES; i++) {
if (i == ZONE_MOVABLE) if (i == ZONE_MOVABLE)
continue; continue;
printk(" %-8s 0x%8lx -> 0x%8lx\n", printk(" %-8s %0#10lx -> %0#10lx\n",
zone_names[i], zone_names[i],
arch_zone_lowest_possible_pfn[i], arch_zone_lowest_possible_pfn[i],
arch_zone_highest_possible_pfn[i]); arch_zone_highest_possible_pfn[i]);
...@@ -3952,7 +3952,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn) ...@@ -3952,7 +3952,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn)
/* Print out the early_node_map[] */ /* Print out the early_node_map[] */
printk("early_node_map[%d] active PFN ranges\n", nr_nodemap_entries); printk("early_node_map[%d] active PFN ranges\n", nr_nodemap_entries);
for (i = 0; i < nr_nodemap_entries; i++) for (i = 0; i < nr_nodemap_entries; i++)
printk(" %3d: 0x%8lx -> 0x%8lx\n", early_node_map[i].nid, printk(" %3d: %0#10lx -> %0#10lx\n", early_node_map[i].nid,
early_node_map[i].start_pfn, early_node_map[i].start_pfn,
early_node_map[i].end_pfn); early_node_map[i].end_pfn);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册