aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/mm/pgtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/mm/pgtable.c')
-rw-r--r--arch/microblaze/mm/pgtable.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c
index 59bf2335a4ce..d1c06d07fed8 100644
--- a/arch/microblaze/mm/pgtable.c
+++ b/arch/microblaze/mm/pgtable.c
@@ -37,6 +37,7 @@
37#include <linux/io.h> 37#include <linux/io.h>
38#include <asm/mmu.h> 38#include <asm/mmu.h>
39#include <asm/sections.h> 39#include <asm/sections.h>
40#include <asm/fixmap.h>
40 41
41#define flush_HPTE(X, va, pg) _tlbie(va) 42#define flush_HPTE(X, va, pg) _tlbie(va)
42 43
@@ -44,11 +45,6 @@ unsigned long ioremap_base;
44unsigned long ioremap_bot; 45unsigned long ioremap_bot;
45EXPORT_SYMBOL(ioremap_bot); 46EXPORT_SYMBOL(ioremap_bot);
46 47
47/* The maximum lowmem defaults to 768Mb, but this can be configured to
48 * another value.
49 */
50#define MAX_LOW_MEM CONFIG_LOWMEM_SIZE
51
52#ifndef CONFIG_SMP 48#ifndef CONFIG_SMP
53struct pgtable_cache_struct quicklists; 49struct pgtable_cache_struct quicklists;
54#endif 50#endif
@@ -80,7 +76,7 @@ static void __iomem *__ioremap(phys_addr_t addr, unsigned long size,
80 !(p >= virt_to_phys((unsigned long)&__bss_stop) && 76 !(p >= virt_to_phys((unsigned long)&__bss_stop) &&
81 p < virt_to_phys((unsigned long)__bss_stop))) { 77 p < virt_to_phys((unsigned long)__bss_stop))) {
82 printk(KERN_WARNING "__ioremap(): phys addr "PTE_FMT 78 printk(KERN_WARNING "__ioremap(): phys addr "PTE_FMT
83 " is RAM lr %p\n", (unsigned long)p, 79 " is RAM lr %pf\n", (unsigned long)p,
84 __builtin_return_address(0)); 80 __builtin_return_address(0));
85 return NULL; 81 return NULL;
86 } 82 }
@@ -171,7 +167,7 @@ void __init mapin_ram(void)
171 167
172 v = CONFIG_KERNEL_START; 168 v = CONFIG_KERNEL_START;
173 p = memory_start; 169 p = memory_start;
174 for (s = 0; s < memory_size; s += PAGE_SIZE) { 170 for (s = 0; s < lowmem_size; s += PAGE_SIZE) {
175 f = _PAGE_PRESENT | _PAGE_ACCESSED | 171 f = _PAGE_PRESENT | _PAGE_ACCESSED |
176 _PAGE_SHARED | _PAGE_HWEXEC; 172 _PAGE_SHARED | _PAGE_HWEXEC;
177 if ((char *) v < _stext || (char *) v >= _etext) 173 if ((char *) v < _stext || (char *) v >= _etext)
@@ -254,3 +250,13 @@ __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
254 } 250 }
255 return pte; 251 return pte;
256} 252}
253
254void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags)
255{
256 unsigned long address = __fix_to_virt(idx);
257
258 if (idx >= __end_of_fixed_addresses)
259 BUG();
260
261 map_page(address, phys, pgprot_val(flags));
262}