2 * linux/arch/arm/mm/nommu.c
4 * ARM uCLinux supporting functions.
6 #include <linux/module.h>
8 #include <linux/pagemap.h>
9 #include <linux/bootmem.h>
12 #include <asm/cacheflush.h>
14 #include <asm/mach/arch.h>
19 * Reserve the various regions of node 0
21 void __init reserve_node_zero(pg_data_t *pgdat)
24 * Register the kernel text and data with bootmem.
25 * Note that this can only be in node 0.
27 #ifdef CONFIG_XIP_KERNEL
28 reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start,
31 reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext,
36 * Register the exception vector page.
37 * some architectures which the DRAM is the exception vector to trap,
38 * alloc_page breaks with error, although it is not NULL, but "0."
40 reserve_bootmem_node(pgdat, CONFIG_VECTORS_BASE, PAGE_SIZE,
44 static void __init sanity_check_meminfo(struct meminfo *mi)
48 for (i = 0, j = 0; i < mi->nr_banks; i++) {
49 struct membank *mb = &mi->bank[i];
51 if (mb->size != 0 && mb->node < MAX_NUMNODES)
52 mi->bank[j++] = mi->bank[i];
58 * paging_init() sets up the page tables, initialises the zone memory
59 * maps, and sets up the zero page, bad page and bad page tables.
61 void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
63 sanity_check_meminfo(mi);
68 * We don't need to do anything here for nommu machines.
70 void setup_mm_for_reboot(char mode)
74 void flush_dcache_page(struct page *page)
76 __cpuc_flush_dcache_page(page_address(page));
78 EXPORT_SYMBOL(flush_dcache_page);
80 void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset,
81 size_t size, unsigned int mtype)
83 if (pfn >= (0x100000000ULL >> PAGE_SHIFT))
85 return (void __iomem *) (offset + (pfn << PAGE_SHIFT));
87 EXPORT_SYMBOL(__arm_ioremap_pfn);
89 void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
92 return (void __iomem *)phys_addr;
94 EXPORT_SYMBOL(__arm_ioremap);
96 void __iounmap(volatile void __iomem *addr)
99 EXPORT_SYMBOL(__iounmap);