added 2.6.29.6 aldebaran kernel
[nao-ulib.git] / kernel / 2.6.29.6-aldebaran-rt / arch / arm / mm / nommu.c
blobad7bacc693b2553b3571eee8ee4ec54b1bb44de5
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>
10 #include <linux/io.h>
12 #include <asm/cacheflush.h>
13 #include <asm/sections.h>
14 #include <asm/page.h>
15 #include <asm/mach/arch.h>
17 #include "mm.h"
20 * Reserve the various regions of node 0
22 void __init reserve_node_zero(pg_data_t *pgdat)
25 * Register the kernel text and data with bootmem.
26 * Note that this can only be in node 0.
28 #ifdef CONFIG_XIP_KERNEL
29 reserve_bootmem_node(pgdat, __pa(_data), _end - _data,
30 BOOTMEM_DEFAULT);
31 #else
32 reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext,
33 BOOTMEM_DEFAULT);
34 #endif
37 * Register the exception vector page.
38 * some architectures which the DRAM is the exception vector to trap,
39 * alloc_page breaks with error, although it is not NULL, but "0."
41 reserve_bootmem_node(pgdat, CONFIG_VECTORS_BASE, PAGE_SIZE,
42 BOOTMEM_DEFAULT);
46 * paging_init() sets up the page tables, initialises the zone memory
47 * maps, and sets up the zero page, bad page and bad page tables.
49 void __init paging_init(struct machine_desc *mdesc)
51 bootmem_init();
55 * We don't need to do anything here for nommu machines.
57 void setup_mm_for_reboot(char mode)
61 void flush_dcache_page(struct page *page)
63 __cpuc_flush_dcache_page(page_address(page));
65 EXPORT_SYMBOL(flush_dcache_page);
67 void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset,
68 size_t size, unsigned int mtype)
70 if (pfn >= (0x100000000ULL >> PAGE_SHIFT))
71 return NULL;
72 return (void __iomem *) (offset + (pfn << PAGE_SHIFT));
74 EXPORT_SYMBOL(__arm_ioremap_pfn);
76 void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
77 unsigned int mtype)
79 return (void __iomem *)phys_addr;
81 EXPORT_SYMBOL(__arm_ioremap);
83 void __iounmap(volatile void __iomem *addr)
86 EXPORT_SYMBOL(__iounmap);