Merge branch 'test' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi...
[linux-2.6/linux-acpi-2.6/acpi4asus.git] / arch / arm / mm / nommu.c
blob63c62fdea52115e168751c5efa5eec96c7602341
1 /*
2 * linux/arch/arm/mm/nommu.c
4 * ARM uCLinux supporting functions.
5 */
6 #include <linux/module.h>
7 #include <linux/mm.h>
8 #include <linux/pagemap.h>
9 #include <linux/bootmem.h>
11 #include <asm/cacheflush.h>
12 #include <asm/io.h>
13 #include <asm/page.h>
14 #include <asm/mach/arch.h>
16 #include "mm.h"
18 extern void _stext, __data_start, _end;
21 * Reserve the various regions of node 0
23 void __init reserve_node_zero(pg_data_t *pgdat)
26 * Register the kernel text and data with bootmem.
27 * Note that this can only be in node 0.
29 #ifdef CONFIG_XIP_KERNEL
30 reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start,
31 BOOTMEM_DEFAULT);
32 #else
33 reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext,
34 BOOTMEM_DEFAULT);
35 #endif
38 * Register the exception vector page.
39 * some architectures which the DRAM is the exception vector to trap,
40 * alloc_page breaks with error, although it is not NULL, but "0."
42 reserve_bootmem_node(pgdat, CONFIG_VECTORS_BASE, PAGE_SIZE,
43 BOOTMEM_DEFAULT);
47 * paging_init() sets up the page tables, initialises the zone memory
48 * maps, and sets up the zero page, bad page and bad page tables.
50 void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
52 bootmem_init(mi);
56 * We don't need to do anything here for nommu machines.
58 void setup_mm_for_reboot(char mode)
62 void flush_dcache_page(struct page *page)
64 __cpuc_flush_dcache_page(page_address(page));
66 EXPORT_SYMBOL(flush_dcache_page);
68 void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset,
69 size_t size, unsigned int mtype)
71 if (pfn >= (0x100000000ULL >> PAGE_SHIFT))
72 return NULL;
73 return (void __iomem *) (offset + (pfn << PAGE_SHIFT));
75 EXPORT_SYMBOL(__arm_ioremap_pfn);
77 void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
78 unsigned int mtype)
80 return (void __iomem *)phys_addr;
82 EXPORT_SYMBOL(__arm_ioremap);
84 void __iounmap(volatile void __iomem *addr)
87 EXPORT_SYMBOL(__iounmap);