diff options
Diffstat (limited to 'arch/microblaze/mm')
-rw-r--r-- | arch/microblaze/mm/consistent.c | 7 | ||||
-rw-r--r-- | arch/microblaze/mm/fault.c | 10 | ||||
-rw-r--r-- | arch/microblaze/mm/highmem.c | 2 | ||||
-rw-r--r-- | arch/microblaze/mm/init.c | 32 | ||||
-rw-r--r-- | arch/microblaze/mm/pgtable.c | 17 |
5 files changed, 32 insertions, 36 deletions
diff --git a/arch/microblaze/mm/consistent.c b/arch/microblaze/mm/consistent.c index a1e2e18e0961..5226b09cbbb2 100644 --- a/arch/microblaze/mm/consistent.c +++ b/arch/microblaze/mm/consistent.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/export.h> |
17 | #include <linux/signal.h> | 17 | #include <linux/signal.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
@@ -37,7 +37,7 @@ | |||
37 | #include <asm/pgalloc.h> | 37 | #include <asm/pgalloc.h> |
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
39 | #include <linux/hardirq.h> | 39 | #include <linux/hardirq.h> |
40 | #include <asm/mmu_context.h> | 40 | #include <linux/mmu_context.h> |
41 | #include <asm/mmu.h> | 41 | #include <asm/mmu.h> |
42 | #include <linux/uaccess.h> | 42 | #include <linux/uaccess.h> |
43 | #include <asm/pgtable.h> | 43 | #include <asm/pgtable.h> |
@@ -102,8 +102,7 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle) | |||
102 | # endif | 102 | # endif |
103 | if ((unsigned int)ret > cpuinfo.dcache_base && | 103 | if ((unsigned int)ret > cpuinfo.dcache_base && |
104 | (unsigned int)ret < cpuinfo.dcache_high) | 104 | (unsigned int)ret < cpuinfo.dcache_high) |
105 | printk(KERN_WARNING | 105 | pr_warn("ERROR: Your cache coherent area is CACHED!!!\n"); |
106 | "ERROR: Your cache coherent area is CACHED!!!\n"); | ||
107 | 106 | ||
108 | /* dma_handle is same as physical (shadowed) address */ | 107 | /* dma_handle is same as physical (shadowed) address */ |
109 | *dma_handle = (dma_addr_t)ret; | 108 | *dma_handle = (dma_addr_t)ret; |
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c index 714b35a9c4f7..731f739d17a1 100644 --- a/arch/microblaze/mm/fault.c +++ b/arch/microblaze/mm/fault.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/page.h> | 32 | #include <asm/page.h> |
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/mmu.h> | 34 | #include <asm/mmu.h> |
35 | #include <asm/mmu_context.h> | 35 | #include <linux/mmu_context.h> |
36 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
37 | #include <asm/exceptions.h> | 37 | #include <asm/exceptions.h> |
38 | 38 | ||
@@ -100,7 +100,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
100 | 100 | ||
101 | /* On a kernel SLB miss we can only check for a valid exception entry */ | 101 | /* On a kernel SLB miss we can only check for a valid exception entry */ |
102 | if (unlikely(kernel_mode(regs) && (address >= TASK_SIZE))) { | 102 | if (unlikely(kernel_mode(regs) && (address >= TASK_SIZE))) { |
103 | printk(KERN_WARNING "kernel task_size exceed"); | 103 | pr_warn("kernel task_size exceed"); |
104 | _exception(SIGSEGV, regs, code, address); | 104 | _exception(SIGSEGV, regs, code, address); |
105 | } | 105 | } |
106 | 106 | ||
@@ -114,9 +114,9 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
114 | 114 | ||
115 | /* in_atomic() in user mode is really bad, | 115 | /* in_atomic() in user mode is really bad, |
116 | as is current->mm == NULL. */ | 116 | as is current->mm == NULL. */ |
117 | printk(KERN_EMERG "Page fault in user mode with " | 117 | pr_emerg("Page fault in user mode with in_atomic(), mm = %p\n", |
118 | "in_atomic(), mm = %p\n", mm); | 118 | mm); |
119 | printk(KERN_EMERG "r15 = %lx MSR = %lx\n", | 119 | pr_emerg("r15 = %lx MSR = %lx\n", |
120 | regs->r15, regs->msr); | 120 | regs->r15, regs->msr); |
121 | die("Weird page fault", regs, SIGSEGV); | 121 | die("Weird page fault", regs, SIGSEGV); |
122 | } | 122 | } |
diff --git a/arch/microblaze/mm/highmem.c b/arch/microblaze/mm/highmem.c index 7d78838e8bfa..5a92576fad92 100644 --- a/arch/microblaze/mm/highmem.c +++ b/arch/microblaze/mm/highmem.c | |||
@@ -20,8 +20,8 @@ | |||
20 | * highmem.h by Benjamin Herrenschmidt (c) 2009 IBM Corp. | 20 | * highmem.h by Benjamin Herrenschmidt (c) 2009 IBM Corp. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/export.h> | ||
23 | #include <linux/highmem.h> | 24 | #include <linux/highmem.h> |
24 | #include <linux/module.h> | ||
25 | 25 | ||
26 | /* | 26 | /* |
27 | * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap | 27 | * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap |
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index ce80823051ba..8f8b367c079e 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -89,7 +89,7 @@ static unsigned long highmem_setup(void) | |||
89 | reservedpages++; | 89 | reservedpages++; |
90 | } | 90 | } |
91 | totalram_pages += totalhigh_pages; | 91 | totalram_pages += totalhigh_pages; |
92 | printk(KERN_INFO "High memory: %luk\n", | 92 | pr_info("High memory: %luk\n", |
93 | totalhigh_pages << (PAGE_SHIFT-10)); | 93 | totalhigh_pages << (PAGE_SHIFT-10)); |
94 | 94 | ||
95 | return reservedpages; | 95 | return reservedpages; |
@@ -142,8 +142,8 @@ void __init setup_memory(void) | |||
142 | ((u32)_text <= (memory_start + lowmem_size - 1))) { | 142 | ((u32)_text <= (memory_start + lowmem_size - 1))) { |
143 | memory_size = lowmem_size; | 143 | memory_size = lowmem_size; |
144 | PAGE_OFFSET = memory_start; | 144 | PAGE_OFFSET = memory_start; |
145 | printk(KERN_INFO "%s: Main mem: 0x%x, " | 145 | pr_info("%s: Main mem: 0x%x, size 0x%08x\n", |
146 | "size 0x%08x\n", __func__, (u32) memory_start, | 146 | __func__, (u32) memory_start, |
147 | (u32) memory_size); | 147 | (u32) memory_size); |
148 | break; | 148 | break; |
149 | } | 149 | } |
@@ -158,7 +158,7 @@ void __init setup_memory(void) | |||
158 | kernel_align_start = PAGE_DOWN((u32)_text); | 158 | kernel_align_start = PAGE_DOWN((u32)_text); |
159 | /* ALIGN can be remove because _end in vmlinux.lds.S is align */ | 159 | /* ALIGN can be remove because _end in vmlinux.lds.S is align */ |
160 | kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start; | 160 | kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start; |
161 | printk(KERN_INFO "%s: kernel addr:0x%08x-0x%08x size=0x%08x\n", | 161 | pr_info("%s: kernel addr:0x%08x-0x%08x size=0x%08x\n", |
162 | __func__, kernel_align_start, kernel_align_start | 162 | __func__, kernel_align_start, kernel_align_start |
163 | + kernel_align_size, kernel_align_size); | 163 | + kernel_align_size, kernel_align_size); |
164 | memblock_reserve(kernel_align_start, kernel_align_size); | 164 | memblock_reserve(kernel_align_start, kernel_align_size); |
@@ -181,10 +181,10 @@ void __init setup_memory(void) | |||
181 | max_low_pfn = ((u64)memory_start + (u64)lowmem_size) >> PAGE_SHIFT; | 181 | max_low_pfn = ((u64)memory_start + (u64)lowmem_size) >> PAGE_SHIFT; |
182 | max_pfn = ((u64)memory_start + (u64)memory_size) >> PAGE_SHIFT; | 182 | max_pfn = ((u64)memory_start + (u64)memory_size) >> PAGE_SHIFT; |
183 | 183 | ||
184 | printk(KERN_INFO "%s: max_mapnr: %#lx\n", __func__, max_mapnr); | 184 | pr_info("%s: max_mapnr: %#lx\n", __func__, max_mapnr); |
185 | printk(KERN_INFO "%s: min_low_pfn: %#lx\n", __func__, min_low_pfn); | 185 | pr_info("%s: min_low_pfn: %#lx\n", __func__, min_low_pfn); |
186 | printk(KERN_INFO "%s: max_low_pfn: %#lx\n", __func__, max_low_pfn); | 186 | pr_info("%s: max_low_pfn: %#lx\n", __func__, max_low_pfn); |
187 | printk(KERN_INFO "%s: max_pfn: %#lx\n", __func__, max_pfn); | 187 | pr_info("%s: max_pfn: %#lx\n", __func__, max_pfn); |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * Find an area to use for the bootmem bitmap. | 190 | * Find an area to use for the bootmem bitmap. |
@@ -246,7 +246,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
246 | free_page(addr); | 246 | free_page(addr); |
247 | totalram_pages++; | 247 | totalram_pages++; |
248 | } | 248 | } |
249 | printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10); | 249 | pr_info("Freeing %s: %ldk freed\n", what, (end - begin) >> 10); |
250 | } | 250 | } |
251 | 251 | ||
252 | #ifdef CONFIG_BLK_DEV_INITRD | 252 | #ifdef CONFIG_BLK_DEV_INITRD |
@@ -260,7 +260,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
260 | totalram_pages++; | 260 | totalram_pages++; |
261 | pages++; | 261 | pages++; |
262 | } | 262 | } |
263 | printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n", | 263 | pr_notice("Freeing initrd memory: %dk freed\n", |
264 | (int)(pages * (PAGE_SIZE / 1024))); | 264 | (int)(pages * (PAGE_SIZE / 1024))); |
265 | } | 265 | } |
266 | #endif | 266 | #endif |
@@ -304,11 +304,11 @@ void __init mem_init(void) | |||
304 | initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin; | 304 | initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin; |
305 | bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start; | 305 | bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start; |
306 | 306 | ||
307 | pr_info("Memory: %luk/%luk available (%luk kernel code, " | 307 | pr_info("Memory: %luk/%luk available (%luk kernel code, ", |
308 | "%luk reserved, %luk data, %luk bss, %luk init)\n", | ||
309 | nr_free_pages() << (PAGE_SHIFT-10), | 308 | nr_free_pages() << (PAGE_SHIFT-10), |
310 | num_physpages << (PAGE_SHIFT-10), | 309 | num_physpages << (PAGE_SHIFT-10), |
311 | codesize >> 10, | 310 | codesize >> 10); |
311 | pr_cont("%luk reserved, %luk data, %luk bss, %luk init)\n", | ||
312 | reservedpages << (PAGE_SHIFT-10), | 312 | reservedpages << (PAGE_SHIFT-10), |
313 | datasize >> 10, | 313 | datasize >> 10, |
314 | bsssize >> 10, | 314 | bsssize >> 10, |
@@ -394,17 +394,17 @@ asmlinkage void __init mmu_init(void) | |||
394 | unsigned int kstart, ksize; | 394 | unsigned int kstart, ksize; |
395 | 395 | ||
396 | if (!memblock.reserved.cnt) { | 396 | if (!memblock.reserved.cnt) { |
397 | printk(KERN_EMERG "Error memory count\n"); | 397 | pr_emerg("Error memory count\n"); |
398 | machine_restart(NULL); | 398 | machine_restart(NULL); |
399 | } | 399 | } |
400 | 400 | ||
401 | if ((u32) memblock.memory.regions[0].size < 0x400000) { | 401 | if ((u32) memblock.memory.regions[0].size < 0x400000) { |
402 | printk(KERN_EMERG "Memory must be greater than 4MB\n"); | 402 | pr_emerg("Memory must be greater than 4MB\n"); |
403 | machine_restart(NULL); | 403 | machine_restart(NULL); |
404 | } | 404 | } |
405 | 405 | ||
406 | if ((u32) memblock.memory.regions[0].size < kernel_tlb) { | 406 | if ((u32) memblock.memory.regions[0].size < kernel_tlb) { |
407 | printk(KERN_EMERG "Kernel size is greater than memory node\n"); | 407 | pr_emerg("Kernel size is greater than memory node\n"); |
408 | machine_restart(NULL); | 408 | machine_restart(NULL); |
409 | } | 409 | } |
410 | 410 | ||
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c index d1c06d07fed8..10b3bd0a980d 100644 --- a/arch/microblaze/mm/pgtable.c +++ b/arch/microblaze/mm/pgtable.c | |||
@@ -26,8 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/export.h> | ||
29 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | ||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
@@ -39,8 +39,6 @@ | |||
39 | #include <asm/sections.h> | 39 | #include <asm/sections.h> |
40 | #include <asm/fixmap.h> | 40 | #include <asm/fixmap.h> |
41 | 41 | ||
42 | #define flush_HPTE(X, va, pg) _tlbie(va) | ||
43 | |||
44 | unsigned long ioremap_base; | 42 | unsigned long ioremap_base; |
45 | unsigned long ioremap_bot; | 43 | unsigned long ioremap_bot; |
46 | EXPORT_SYMBOL(ioremap_bot); | 44 | EXPORT_SYMBOL(ioremap_bot); |
@@ -75,9 +73,8 @@ static void __iomem *__ioremap(phys_addr_t addr, unsigned long size, | |||
75 | p >= memory_start && p < virt_to_phys(high_memory) && | 73 | p >= memory_start && p < virt_to_phys(high_memory) && |
76 | !(p >= virt_to_phys((unsigned long)&__bss_stop) && | 74 | !(p >= virt_to_phys((unsigned long)&__bss_stop) && |
77 | p < virt_to_phys((unsigned long)__bss_stop))) { | 75 | p < virt_to_phys((unsigned long)__bss_stop))) { |
78 | printk(KERN_WARNING "__ioremap(): phys addr "PTE_FMT | 76 | pr_warn("__ioremap(): phys addr "PTE_FMT" is RAM lr %pf\n", |
79 | " is RAM lr %pf\n", (unsigned long)p, | 77 | (unsigned long)p, __builtin_return_address(0)); |
80 | __builtin_return_address(0)); | ||
81 | return NULL; | 78 | return NULL; |
82 | } | 79 | } |
83 | 80 | ||
@@ -128,9 +125,10 @@ void __iomem *ioremap(phys_addr_t addr, unsigned long size) | |||
128 | } | 125 | } |
129 | EXPORT_SYMBOL(ioremap); | 126 | EXPORT_SYMBOL(ioremap); |
130 | 127 | ||
131 | void iounmap(void *addr) | 128 | void iounmap(void __iomem *addr) |
132 | { | 129 | { |
133 | if (addr > high_memory && (unsigned long) addr < ioremap_bot) | 130 | if ((__force void *)addr > high_memory && |
131 | (unsigned long) addr < ioremap_bot) | ||
134 | vfree((void *) (PAGE_MASK & (unsigned long) addr)); | 132 | vfree((void *) (PAGE_MASK & (unsigned long) addr)); |
135 | } | 133 | } |
136 | EXPORT_SYMBOL(iounmap); | 134 | EXPORT_SYMBOL(iounmap); |
@@ -152,8 +150,7 @@ int map_page(unsigned long va, phys_addr_t pa, int flags) | |||
152 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, | 150 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, |
153 | __pgprot(flags))); | 151 | __pgprot(flags))); |
154 | if (unlikely(mem_init_done)) | 152 | if (unlikely(mem_init_done)) |
155 | flush_HPTE(0, va, pmd_val(*pd)); | 153 | _tlbie(va); |
156 | /* flush_HPTE(0, va, pg); */ | ||
157 | } | 154 | } |
158 | return err; | 155 | return err; |
159 | } | 156 | } |