From 419387612c03fce2ca6d5a3d6aac3dae42069264 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 15 Dec 2011 14:33:32 +0100 Subject: microblaze: Introduce fixmap Fixmap will be used for highmem support. Signed-off-by: Michal Simek --- arch/microblaze/mm/init.c | 17 +++++++++++------ arch/microblaze/mm/pgtable.c | 11 +++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'arch/microblaze/mm') diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 2253e122aa8..af87fd71a83 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -24,6 +24,7 @@ #include #include #include +#include /* Use for MMU and noMMU because of PCI generic code */ int mem_init_done; @@ -54,6 +55,13 @@ unsigned long lowmem_size; static void __init paging_init(void) { unsigned long zones_size[MAX_NR_ZONES]; +#ifdef CONFIG_MMU + int idx; + + /* Setup fixmaps */ + for (idx = 0; idx < __end_of_fixed_addresses; idx++) + clear_fixmap(idx); +#endif /* Clean every zones */ memset(zones_size, 0, sizeof(zones_size)); @@ -316,12 +324,9 @@ asmlinkage void __init mmu_init(void) /* Map in all of RAM starting at CONFIG_KERNEL_START */ mapin_ram(); -#ifdef CONFIG_HIGHMEM_START_BOOL - ioremap_base = CONFIG_HIGHMEM_START; -#else - ioremap_base = 0xfe000000UL; /* for now, could be 0xfffff000 */ -#endif /* CONFIG_HIGHMEM_START_BOOL */ - ioremap_bot = ioremap_base; + /* Extend vmalloc and ioremap area as big as possible */ + ioremap_base = ioremap_bot = FIXADDR_START; + /* Initialize the context management stuff */ mmu_context_init(); diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c index 68f5c01e4ad..84905da83cb 100644 --- a/arch/microblaze/mm/pgtable.c +++ b/arch/microblaze/mm/pgtable.c @@ -37,6 +37,7 @@ #include #include #include +#include #define flush_HPTE(X, va, pg) _tlbie(va) @@ -249,3 +250,13 @@ __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, } return pte; } + +void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) +{ + unsigned long address = __fix_to_virt(idx); + + if (idx >= __end_of_fixed_addresses) + BUG(); + + map_page(address, phys, pgprot_val(flags)); +} -- cgit v1.2.3