Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Paul 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: Ingo Molnar <mingo@elte.hu>

authored by

Paul Jackson and committed by
Ingo Molnar
5dab8ec1 3381959d

+4 -4
+1 -1
arch/x86/kernel/e820.c
··· 1014 1014 if (last_pfn > end_user_pfn) 1015 1015 last_pfn = end_user_pfn; 1016 1016 1017 - printk(KERN_INFO "last_pfn = 0x%lx max_arch_pfn = 0x%lx\n", 1017 + printk(KERN_INFO "last_pfn = %#lx max_arch_pfn = %#lx\n", 1018 1018 last_pfn, max_arch_pfn); 1019 1019 return last_pfn; 1020 1020 }
+3 -3
mm/page_alloc.c
··· 3520 3520 { 3521 3521 int i; 3522 3522 3523 - printk(KERN_DEBUG "Entering add_active_range(%d, 0x%lx, 0x%lx) " 3523 + printk(KERN_DEBUG "Entering add_active_range(%d, %#lx, %#lx) " 3524 3524 "%d entries of %d used\n", 3525 3525 nid, start_pfn, end_pfn, 3526 3526 nr_nodemap_entries, MAX_ACTIVE_REGIONS); ··· 3936 3936 for (i = 0; i < MAX_NR_ZONES; i++) { 3937 3937 if (i == ZONE_MOVABLE) 3938 3938 continue; 3939 - printk(" %-8s 0x%8lx -> 0x%8lx\n", 3939 + printk(" %-8s %0#10lx -> %0#10lx\n", 3940 3940 zone_names[i], 3941 3941 arch_zone_lowest_possible_pfn[i], 3942 3942 arch_zone_highest_possible_pfn[i]); ··· 3952 3952 /* Print out the early_node_map[] */ 3953 3953 printk("early_node_map[%d] active PFN ranges\n", nr_nodemap_entries); 3954 3954 for (i = 0; i < nr_nodemap_entries; i++) 3955 - printk(" %3d: 0x%8lx -> 0x%8lx\n", early_node_map[i].nid, 3955 + printk(" %3d: %0#10lx -> %0#10lx\n", early_node_map[i].nid, 3956 3956 early_node_map[i].start_pfn, 3957 3957 early_node_map[i].end_pfn); 3958 3958