Commit c0943457 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: numa32 pfn print out using hex instead

Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6a07a0ed
...@@ -93,7 +93,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *cpu_affinity) ...@@ -93,7 +93,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *cpu_affinity)
apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain_lo; apicid_to_pxm[cpu_affinity->apic_id] = cpu_affinity->proximity_domain_lo;
printk("CPU 0x%02X in proximity domain 0x%02X\n", printk(KERN_DEBUG "CPU %02x in proximity domain %02x\n",
cpu_affinity->apic_id, cpu_affinity->proximity_domain_lo); cpu_affinity->apic_id, cpu_affinity->proximity_domain_lo);
} }
...@@ -134,7 +134,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *memory_affinity) ...@@ -134,7 +134,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *memory_affinity)
if (num_memory_chunks >= MAXCHUNKS) { if (num_memory_chunks >= MAXCHUNKS) {
printk("Too many mem chunks in SRAT. Ignoring %lld MBytes at %llx\n", printk(KERN_WARNING "Too many mem chunks in SRAT."
" Ignoring %lld MBytes at %llx\n",
size/(1024*1024), paddr); size/(1024*1024), paddr);
return; return;
} }
...@@ -155,7 +156,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *memory_affinity) ...@@ -155,7 +156,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *memory_affinity)
num_memory_chunks++; num_memory_chunks++;
printk("Memory range 0x%lX to 0x%lX (type 0x%X) in proximity domain 0x%02X %s\n", printk(KERN_DEBUG "Memory range %08lx to %08lx (type %x)"
" in proximity domain %02x %s\n",
start_pfn, end_pfn, start_pfn, end_pfn,
memory_affinity->memory_type, memory_affinity->memory_type,
pxm, pxm,
...@@ -186,7 +188,7 @@ static __init void node_read_chunk(int nid, struct node_memory_chunk_s *memory_c ...@@ -186,7 +188,7 @@ static __init void node_read_chunk(int nid, struct node_memory_chunk_s *memory_c
* *possible* memory hotplug areas the same as normal RAM. * *possible* memory hotplug areas the same as normal RAM.
*/ */
if (memory_chunk->start_pfn >= max_pfn) { if (memory_chunk->start_pfn >= max_pfn) {
printk (KERN_INFO "Ignoring SRAT pfns: 0x%08lx -> %08lx\n", printk(KERN_INFO "Ignoring SRAT pfns: %08lx - %08lx\n",
memory_chunk->start_pfn, memory_chunk->end_pfn); memory_chunk->start_pfn, memory_chunk->end_pfn);
return; return;
} }
...@@ -212,7 +214,8 @@ int __init get_memcfg_from_srat(void) ...@@ -212,7 +214,8 @@ int __init get_memcfg_from_srat(void)
goto out_fail; goto out_fail;
if (num_memory_chunks == 0) { if (num_memory_chunks == 0) {
printk("could not finy any ACPI SRAT memory areas.\n"); printk(KERN_WARNING
"could not finy any ACPI SRAT memory areas.\n");
goto out_fail; goto out_fail;
} }
...@@ -239,20 +242,23 @@ int __init get_memcfg_from_srat(void) ...@@ -239,20 +242,23 @@ int __init get_memcfg_from_srat(void)
for (i = 0; i < num_memory_chunks; i++) for (i = 0; i < num_memory_chunks; i++)
node_memory_chunk[i].nid = pxm_to_node(node_memory_chunk[i].pxm); node_memory_chunk[i].nid = pxm_to_node(node_memory_chunk[i].pxm);
printk("pxm bitmap: "); printk(KERN_DEBUG "pxm bitmap: ");
for (i = 0; i < sizeof(pxm_bitmap); i++) { for (i = 0; i < sizeof(pxm_bitmap); i++) {
printk("%02X ", pxm_bitmap[i]); printk(KERN_CONT "%02x ", pxm_bitmap[i]);
} }
printk("\n"); printk(KERN_CONT "\n");
printk("Number of logical nodes in system = %d\n", num_online_nodes()); printk(KERN_DEBUG "Number of logical nodes in system = %d\n",
printk("Number of memory chunks in system = %d\n", num_memory_chunks); num_online_nodes());
printk(KERN_DEBUG "Number of memory chunks in system = %d\n",
num_memory_chunks);
for (i = 0; i < MAX_APICID; i++) for (i = 0; i < MAX_APICID; i++)
apicid_2_node[i] = pxm_to_node(apicid_to_pxm[i]); apicid_2_node[i] = pxm_to_node(apicid_to_pxm[i]);
for (j = 0; j < num_memory_chunks; j++){ for (j = 0; j < num_memory_chunks; j++){
struct node_memory_chunk_s * chunk = &node_memory_chunk[j]; struct node_memory_chunk_s * chunk = &node_memory_chunk[j];
printk("chunk %d nid %d start_pfn %08lx end_pfn %08lx\n", printk(KERN_DEBUG
"chunk %d nid %d start_pfn %08lx end_pfn %08lx\n",
j, chunk->nid, chunk->start_pfn, chunk->end_pfn); j, chunk->nid, chunk->start_pfn, chunk->end_pfn);
node_read_chunk(chunk->nid, chunk); node_read_chunk(chunk->nid, chunk);
e820_register_active_regions(chunk->nid, chunk->start_pfn, e820_register_active_regions(chunk->nid, chunk->start_pfn,
...@@ -268,6 +274,7 @@ int __init get_memcfg_from_srat(void) ...@@ -268,6 +274,7 @@ int __init get_memcfg_from_srat(void)
} }
return 1; return 1;
out_fail: out_fail:
printk("failed to get NUMA memory information from SRAT table\n"); printk(KERN_ERR "failed to get NUMA memory information from SRAT"
" table\n");
return 0; return 0;
} }
...@@ -76,13 +76,13 @@ void memory_present(int nid, unsigned long start, unsigned long end) ...@@ -76,13 +76,13 @@ void memory_present(int nid, unsigned long start, unsigned long end)
{ {
unsigned long pfn; unsigned long pfn;
printk(KERN_INFO "Node: %d, start_pfn: %ld, end_pfn: %ld\n", printk(KERN_INFO "Node: %d, start_pfn: %lx, end_pfn: %lx\n",
nid, start, end); nid, start, end);
printk(KERN_DEBUG " Setting physnode_map array to node %d for pfns:\n", nid); printk(KERN_DEBUG " Setting physnode_map array to node %d for pfns:\n", nid);
printk(KERN_DEBUG " "); printk(KERN_DEBUG " ");
for (pfn = start; pfn < end; pfn += PAGES_PER_ELEMENT) { for (pfn = start; pfn < end; pfn += PAGES_PER_ELEMENT) {
physnode_map[pfn / PAGES_PER_ELEMENT] = nid; physnode_map[pfn / PAGES_PER_ELEMENT] = nid;
printk(KERN_CONT "%ld ", pfn); printk(KERN_CONT "%lx ", pfn);
} }
printk(KERN_CONT "\n"); printk(KERN_CONT "\n");
} }
...@@ -117,7 +117,7 @@ static unsigned long kva_pages; ...@@ -117,7 +117,7 @@ static unsigned long kva_pages;
*/ */
int __init get_memcfg_numa_flat(void) int __init get_memcfg_numa_flat(void)
{ {
printk("NUMA - single node, flat memory mode\n"); printk(KERN_DEBUG "NUMA - single node, flat memory mode\n");
node_start_pfn[0] = 0; node_start_pfn[0] = 0;
node_end_pfn[0] = max_pfn; node_end_pfn[0] = max_pfn;
...@@ -233,7 +233,7 @@ static unsigned long calculate_numa_remap_pages(void) ...@@ -233,7 +233,7 @@ static unsigned long calculate_numa_remap_pages(void)
* The acpi/srat node info can show hot-add memroy zones * The acpi/srat node info can show hot-add memroy zones
* where memory could be added but not currently present. * where memory could be added but not currently present.
*/ */
printk("node %d pfn: [%lx - %lx]\n", printk(KERN_DEBUG "node %d pfn: [%lx - %lx]\n",
nid, node_start_pfn[nid], node_end_pfn[nid]); nid, node_start_pfn[nid], node_end_pfn[nid]);
if (node_start_pfn[nid] > max_pfn) if (node_start_pfn[nid] > max_pfn)
continue; continue;
...@@ -268,7 +268,8 @@ static unsigned long calculate_numa_remap_pages(void) ...@@ -268,7 +268,8 @@ static unsigned long calculate_numa_remap_pages(void)
node_remap_size[nid] = size; node_remap_size[nid] = size;
node_remap_offset[nid] = reserve_pages; node_remap_offset[nid] = reserve_pages;
reserve_pages += size; reserve_pages += size;
printk("Reserving %ld pages of KVA for lmem_map of node %d at %llx\n", printk(KERN_DEBUG "Reserving %ld pages of KVA for lmem_map of"
" node %d at %llx\n",
size, nid, node_kva_final>>PAGE_SHIFT); size, nid, node_kva_final>>PAGE_SHIFT);
/* /*
...@@ -290,7 +291,7 @@ static unsigned long calculate_numa_remap_pages(void) ...@@ -290,7 +291,7 @@ static unsigned long calculate_numa_remap_pages(void)
remove_active_range(nid, node_remap_start_pfn[nid], remove_active_range(nid, node_remap_start_pfn[nid],
node_remap_start_pfn[nid] + size); node_remap_start_pfn[nid] + size);
} }
printk("Reserving total of %ld pages for numa KVA remap\n", printk(KERN_INFO "Reserving total of %lx pages for numa KVA remap\n",
reserve_pages); reserve_pages);
return reserve_pages; return reserve_pages;
} }
...@@ -304,7 +305,7 @@ static void init_remap_allocator(int nid) ...@@ -304,7 +305,7 @@ static void init_remap_allocator(int nid)
node_remap_alloc_vaddr[nid] = node_remap_start_vaddr[nid] + node_remap_alloc_vaddr[nid] = node_remap_start_vaddr[nid] +
ALIGN(sizeof(pg_data_t), PAGE_SIZE); ALIGN(sizeof(pg_data_t), PAGE_SIZE);
printk ("node %d will remap to vaddr %08lx - %08lx\n", nid, printk(KERN_DEBUG "node %d will remap to vaddr %08lx - %08lx\n", nid,
(ulong) node_remap_start_vaddr[nid], (ulong) node_remap_start_vaddr[nid],
(ulong) node_remap_end_vaddr[nid]); (ulong) node_remap_end_vaddr[nid]);
} }
...@@ -340,9 +341,9 @@ void __init initmem_init(unsigned long start_pfn, ...@@ -340,9 +341,9 @@ void __init initmem_init(unsigned long start_pfn,
if (kva_start_pfn == -1UL) if (kva_start_pfn == -1UL)
panic("Can not get kva space\n"); panic("Can not get kva space\n");
printk("kva_start_pfn ~ %ld find_max_low_pfn() ~ %ld\n", printk(KERN_INFO "kva_start_pfn ~ %lx max_low_pfn ~ %lx\n",
kva_start_pfn, max_low_pfn); kva_start_pfn, max_low_pfn);
printk("max_pfn = %ld\n", max_pfn); printk(KERN_INFO "max_pfn = %lx\n", max_pfn);
/* avoid clash with initrd */ /* avoid clash with initrd */
reserve_early(kva_start_pfn<<PAGE_SHIFT, reserve_early(kva_start_pfn<<PAGE_SHIFT,
...@@ -362,17 +363,17 @@ void __init initmem_init(unsigned long start_pfn, ...@@ -362,17 +363,17 @@ void __init initmem_init(unsigned long start_pfn,
#endif #endif
printk(KERN_NOTICE "%ldMB LOWMEM available.\n", printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
pages_to_mb(max_low_pfn)); pages_to_mb(max_low_pfn));
printk("min_low_pfn = %ld, max_low_pfn = %ld, highstart_pfn = %ld\n", printk(KERN_DEBUG "max_low_pfn = %lx, highstart_pfn = %lx\n",
min_low_pfn, max_low_pfn, highstart_pfn); max_low_pfn, highstart_pfn);
printk("Low memory ends at vaddr %08lx\n", printk(KERN_DEBUG "Low memory ends at vaddr %08lx\n",
(ulong) pfn_to_kaddr(max_low_pfn)); (ulong) pfn_to_kaddr(max_low_pfn));
for_each_online_node(nid) { for_each_online_node(nid) {
init_remap_allocator(nid); init_remap_allocator(nid);
allocate_pgdat(nid); allocate_pgdat(nid);
} }
printk("High memory starts at vaddr %08lx\n", printk(KERN_DEBUG "High memory starts at vaddr %08lx\n",
(ulong) pfn_to_kaddr(highstart_pfn)); (ulong) pfn_to_kaddr(highstart_pfn));
for_each_online_node(nid) for_each_online_node(nid)
propagate_e820_map_node(nid); propagate_e820_map_node(nid);
...@@ -413,7 +414,7 @@ void __init set_highmem_pages_init(void) ...@@ -413,7 +414,7 @@ void __init set_highmem_pages_init(void)
zone_end_pfn = zone_start_pfn + zone->spanned_pages; zone_end_pfn = zone_start_pfn + zone->spanned_pages;
nid = zone_to_nid(zone); nid = zone_to_nid(zone);
printk("Initializing %s for node %d (%08lx:%08lx)\n", printk(KERN_INFO "Initializing %s for node %d (%08lx:%08lx)\n",
zone->name, nid, zone_start_pfn, zone_end_pfn); zone->name, nid, zone_start_pfn, zone_end_pfn);
add_highpages_with_active_regions(nid, zone_start_pfn, add_highpages_with_active_regions(nid, zone_start_pfn,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment