aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/aperture_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-01-30 07:30:10 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:10 -0500
commit31183ba8fd05b6ddc67ab4d726167cbc52e1b346 (patch)
tree4f3685e028e8dd35d4cfdbc2ba8dee16bfd73009 /arch/x86/kernel/aperture_64.c
parentc140df973c07ac328aafd19d4f4c413f2f8902df (diff)
x86: clean up arch/x86/kernel/aperture_64.c printk()s
clean up arch/x86/kernel/aperture_64.c printk()s. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/aperture_64.c')
-rw-r--r--arch/x86/kernel/aperture_64.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 250db0527f5d..52d2beac4556 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -66,14 +66,15 @@ static u32 __init allocate_aperture(void)
66 */ 66 */
67 p = __alloc_bootmem_nopanic(aper_size, aper_size, 0); 67 p = __alloc_bootmem_nopanic(aper_size, aper_size, 0);
68 if (!p || __pa(p)+aper_size > 0xffffffff) { 68 if (!p || __pa(p)+aper_size > 0xffffffff) {
69 printk("Cannot allocate aperture memory hole (%p,%uK)\n", 69 printk(KERN_ERR
70 p, aper_size>>10); 70 "Cannot allocate aperture memory hole (%p,%uK)\n",
71 p, aper_size>>10);
71 if (p) 72 if (p)
72 free_bootmem(__pa(p), aper_size); 73 free_bootmem(__pa(p), aper_size);
73 return 0; 74 return 0;
74 } 75 }
75 printk("Mapping aperture over %d KB of RAM @ %lx\n", 76 printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n",
76 aper_size >> 10, __pa(p)); 77 aper_size >> 10, __pa(p));
77 insert_aperture_resource((u32)__pa(p), aper_size); 78 insert_aperture_resource((u32)__pa(p), aper_size);
78 79
79 return (u32)__pa(p); 80 return (u32)__pa(p);
@@ -83,18 +84,20 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size)
83{ 84{
84 if (!aper_base) 85 if (!aper_base)
85 return 0; 86 return 0;
87
86 if (aper_size < 64*1024*1024) { 88 if (aper_size < 64*1024*1024) {
87 printk("Aperture too small (%d MB)\n", aper_size>>20); 89 printk(KERN_ERR "Aperture too small (%d MB)\n", aper_size>>20);
88 return 0; 90 return 0;
89 } 91 }
90 if (aper_base + aper_size > 0x100000000UL) { 92 if (aper_base + aper_size > 0x100000000UL) {
91 printk("Aperture beyond 4GB. Ignoring.\n"); 93 printk(KERN_ERR "Aperture beyond 4GB. Ignoring.\n");
92 return 0; 94 return 0;
93 } 95 }
94 if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) { 96 if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) {
95 printk("Aperture pointing to e820 RAM. Ignoring.\n"); 97 printk(KERN_ERR "Aperture pointing to e820 RAM. Ignoring.\n");
96 return 0; 98 return 0;
97 } 99 }
100
98 return 1; 101 return 1;
99} 102}
100 103
@@ -133,10 +136,10 @@ static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
133 u32 aper_low, aper_hi; 136 u32 aper_low, aper_hi;
134 u64 aper; 137 u64 aper;
135 138
136 printk("AGP bridge at %02x:%02x:%02x\n", num, slot, func); 139 printk(KERN_INFO "AGP bridge at %02x:%02x:%02x\n", num, slot, func);
137 apsizereg = read_pci_config_16(num, slot, func, cap + 0x14); 140 apsizereg = read_pci_config_16(num, slot, func, cap + 0x14);
138 if (apsizereg == 0xffffffff) { 141 if (apsizereg == 0xffffffff) {
139 printk("APSIZE in AGP bridge unreadable\n"); 142 printk(KERN_ERR "APSIZE in AGP bridge unreadable\n");
140 return 0; 143 return 0;
141 } 144 }
142 145
@@ -153,8 +156,8 @@ static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
153 aper_hi = read_pci_config(num, slot, func, 0x14); 156 aper_hi = read_pci_config(num, slot, func, 0x14);
154 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); 157 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32);
155 158
156 printk("Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n", 159 printk(KERN_INFO "Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n",
157 aper, 32 << *order, apsizereg); 160 aper, 32 << *order, apsizereg);
158 161
159 if (!aperture_valid(aper, (32*1024*1024) << *order)) 162 if (!aperture_valid(aper, (32*1024*1024) << *order))
160 return 0; 163 return 0;
@@ -210,7 +213,7 @@ static __u32 __init search_agp_bridge(u32 *order, int *valid_agp)
210 } 213 }
211 } 214 }
212 } 215 }
213 printk("No AGP bridge found\n"); 216 printk(KERN_INFO "No AGP bridge found\n");
214 217
215 return 0; 218 return 0;
216} 219}
@@ -240,8 +243,8 @@ void __init gart_iommu_hole_init(void)
240 aper_base = read_pci_config(0, num, 3, 0x94) & 0x7fff; 243 aper_base = read_pci_config(0, num, 3, 0x94) & 0x7fff;
241 aper_base <<= 25; 244 aper_base <<= 25;
242 245
243 printk("CPU %d: aperture @ %Lx size %u MB\n", num-24, 246 printk(KERN_INFO "CPU %d: aperture @ %Lx size %u MB\n",
244 aper_base, aper_size>>20); 247 num-24, aper_base, aper_size>>20);
245 248
246 if (!aperture_valid(aper_base, aper_size)) { 249 if (!aperture_valid(aper_base, aper_size)) {
247 fix = 1; 250 fix = 1;
@@ -277,10 +280,13 @@ void __init gart_iommu_hole_init(void)
277 force_iommu || 280 force_iommu ||
278 valid_agp || 281 valid_agp ||
279 fallback_aper_force) { 282 fallback_aper_force) {
280 printk("Your BIOS doesn't leave a aperture memory hole\n"); 283 printk(KERN_ERR
281 printk("Please enable the IOMMU option in the BIOS setup\n"); 284 "Your BIOS doesn't leave a aperture memory hole\n");
282 printk("This costs you %d MB of RAM\n", 285 printk(KERN_ERR
283 32 << fallback_aper_order); 286 "Please enable the IOMMU option in the BIOS setup\n");
287 printk(KERN_ERR
288 "This costs you %d MB of RAM\n",
289 32 << fallback_aper_order);
284 290
285 aper_order = fallback_aper_order; 291 aper_order = fallback_aper_order;
286 aper_alloc = allocate_aperture(); 292 aper_alloc = allocate_aperture();