aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 07:34:10 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:34:10 -0500
commit10f22dde556d1ed41d55355d1fb8ad495f9810c8 (patch)
tree8d9cc11f18ec88525cc0f21b2f6493f5be0b3a5a /arch/x86/mm/init_64.c
parent14a62c34b134d24f7fedb8fd66028ecdcffb32c8 (diff)
x86: arch/x86/mm/init_64.c printk fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r--arch/x86/mm/init_64.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index bb732bb79b4a..a95272644591 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -46,10 +46,6 @@
46#include <asm/kdebug.h> 46#include <asm/kdebug.h>
47#include <asm/numa.h> 47#include <asm/numa.h>
48 48
49#ifndef Dprintk
50# define Dprintk(x...)
51#endif
52
53const struct dma_mapping_ops *dma_ops; 49const struct dma_mapping_ops *dma_ops;
54EXPORT_SYMBOL(dma_ops); 50EXPORT_SYMBOL(dma_ops);
55 51
@@ -119,7 +115,7 @@ static __init void *spp_getpage(void)
119 after_bootmem ? "after bootmem" : ""); 115 after_bootmem ? "after bootmem" : "");
120 } 116 }
121 117
122 Dprintk("spp_getpage %p\n", ptr); 118 pr_debug("spp_getpage %p\n", ptr);
123 119
124 return ptr; 120 return ptr;
125} 121}
@@ -132,11 +128,12 @@ set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot)
132 pmd_t *pmd; 128 pmd_t *pmd;
133 pte_t *pte, new_pte; 129 pte_t *pte, new_pte;
134 130
135 Dprintk("set_pte_phys %lx to %lx\n", vaddr, phys); 131 pr_debug("set_pte_phys %lx to %lx\n", vaddr, phys);
136 132
137 pgd = pgd_offset_k(vaddr); 133 pgd = pgd_offset_k(vaddr);
138 if (pgd_none(*pgd)) { 134 if (pgd_none(*pgd)) {
139 printk("PGD FIXMAP MISSING, it should be setup in head.S!\n"); 135 printk(KERN_ERR
136 "PGD FIXMAP MISSING, it should be setup in head.S!\n");
140 return; 137 return;
141 } 138 }
142 pud = pud_offset(pgd, vaddr); 139 pud = pud_offset(pgd, vaddr);
@@ -144,7 +141,7 @@ set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot)
144 pmd = (pmd_t *) spp_getpage(); 141 pmd = (pmd_t *) spp_getpage();
145 set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER)); 142 set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER));
146 if (pmd != pmd_offset(pud, 0)) { 143 if (pmd != pmd_offset(pud, 0)) {
147 printk("PAGETABLE BUG #01! %p <-> %p\n", 144 printk(KERN_ERR "PAGETABLE BUG #01! %p <-> %p\n",
148 pmd, pmd_offset(pud, 0)); 145 pmd, pmd_offset(pud, 0));
149 return; 146 return;
150 } 147 }
@@ -154,7 +151,7 @@ set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot)
154 pte = (pte_t *) spp_getpage(); 151 pte = (pte_t *) spp_getpage();
155 set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER)); 152 set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER));
156 if (pte != pte_offset_kernel(pmd, 0)) { 153 if (pte != pte_offset_kernel(pmd, 0)) {
157 printk("PAGETABLE BUG #02!\n"); 154 printk(KERN_ERR "PAGETABLE BUG #02!\n");
158 return; 155 return;
159 } 156 }
160 } 157 }
@@ -180,7 +177,7 @@ __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
180 unsigned long address = __fix_to_virt(idx); 177 unsigned long address = __fix_to_virt(idx);
181 178
182 if (idx >= __end_of_fixed_addresses) { 179 if (idx >= __end_of_fixed_addresses) {
183 printk("Invalid __set_fixmap\n"); 180 printk(KERN_ERR "Invalid __set_fixmap\n");
184 return; 181 return;
185 } 182 }
186 set_pte_phys(address, phys, prot); 183 set_pte_phys(address, phys, prot);
@@ -246,7 +243,7 @@ __meminit void *early_ioremap(unsigned long addr, unsigned long size)
246continue_outer_loop: 243continue_outer_loop:
247 ; 244 ;
248 } 245 }
249 printk("early_ioremap(0x%lx, %lu) failed\n", addr, size); 246 printk(KERN_ERR "early_ioremap(0x%lx, %lu) failed\n", addr, size);
250 247
251 return NULL; 248 return NULL;
252} 249}
@@ -378,7 +375,7 @@ void __init_refok init_memory_mapping(unsigned long start, unsigned long end)
378{ 375{
379 unsigned long next; 376 unsigned long next;
380 377
381 Dprintk("init_memory_mapping\n"); 378 pr_debug("init_memory_mapping\n");
382 379
383 /* 380 /*
384 * Find space for the kernel direct mapping tables. 381 * Find space for the kernel direct mapping tables.
@@ -506,8 +503,7 @@ int arch_add_memory(int nid, u64 start, u64 size)
506 init_memory_mapping(start, start + size-1); 503 init_memory_mapping(start, start + size-1);
507 504
508 ret = __add_pages(zone, start_pfn, nr_pages); 505 ret = __add_pages(zone, start_pfn, nr_pages);
509 if (ret) 506 WARN_ON(1);
510 printk("%s: Problem encountered in __add_pages!\n", __func__);
511 507
512 return ret; 508 return ret;
513} 509}
@@ -567,7 +563,7 @@ void __init mem_init(void)
567 kclist_add(&kcore_vsyscall, (void *)VSYSCALL_START, 563 kclist_add(&kcore_vsyscall, (void *)VSYSCALL_START,
568 VSYSCALL_END - VSYSCALL_START); 564 VSYSCALL_END - VSYSCALL_START);
569 565
570 printk("Memory: %luk/%luk available (%ldk kernel code, " 566 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
571 "%ldk reserved, %ldk data, %ldk init)\n", 567 "%ldk reserved, %ldk data, %ldk init)\n",
572 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 568 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
573 end_pfn << (PAGE_SHIFT-10), 569 end_pfn << (PAGE_SHIFT-10),
@@ -646,10 +642,10 @@ void mark_rodata_ro(void)
646 rodata_test(); 642 rodata_test();
647 643
648#ifdef CONFIG_CPA_DEBUG 644#ifdef CONFIG_CPA_DEBUG
649 printk("Testing CPA: undo %lx-%lx\n", start, end); 645 printk(KERN_INFO "Testing CPA: undo %lx-%lx\n", start, end);
650 set_memory_rw(start, (end-start) >> PAGE_SHIFT); 646 set_memory_rw(start, (end-start) >> PAGE_SHIFT);
651 647
652 printk("Testing CPA: again\n"); 648 printk(KERN_INFO "Testing CPA: again\n");
653 set_memory_ro(start, (end-start) >> PAGE_SHIFT); 649 set_memory_ro(start, (end-start) >> PAGE_SHIFT);
654#endif 650#endif
655} 651}