]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/arm/mm/nommu.c
Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into devel
[mirror_ubuntu-zesty-kernel.git] / arch / arm / mm / nommu.c
1 /*
2 * linux/arch/arm/mm/nommu.c
3 *
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>
11
12 #include <asm/cacheflush.h>
13 #include <asm/page.h>
14 #include <asm/mach/arch.h>
15
16 #include "mm.h"
17
18 /*
19 * Reserve the various regions of node 0
20 */
21 void __init reserve_node_zero(pg_data_t *pgdat)
22 {
23 /*
24 * Register the kernel text and data with bootmem.
25 * Note that this can only be in node 0.
26 */
27 #ifdef CONFIG_XIP_KERNEL
28 reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start,
29 BOOTMEM_DEFAULT);
30 #else
31 reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext,
32 BOOTMEM_DEFAULT);
33 #endif
34
35 /*
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."
39 */
40 reserve_bootmem_node(pgdat, CONFIG_VECTORS_BASE, PAGE_SIZE,
41 BOOTMEM_DEFAULT);
42 }
43
44 /*
45 * paging_init() sets up the page tables, initialises the zone memory
46 * maps, and sets up the zero page, bad page and bad page tables.
47 */
48 void __init paging_init(struct machine_desc *mdesc)
49 {
50 bootmem_init();
51 }
52
53 /*
54 * We don't need to do anything here for nommu machines.
55 */
56 void setup_mm_for_reboot(char mode)
57 {
58 }
59
60 void flush_dcache_page(struct page *page)
61 {
62 __cpuc_flush_dcache_page(page_address(page));
63 }
64 EXPORT_SYMBOL(flush_dcache_page);
65
66 void __iomem *__arm_ioremap_pfn(unsigned long pfn, unsigned long offset,
67 size_t size, unsigned int mtype)
68 {
69 if (pfn >= (0x100000000ULL >> PAGE_SHIFT))
70 return NULL;
71 return (void __iomem *) (offset + (pfn << PAGE_SHIFT));
72 }
73 EXPORT_SYMBOL(__arm_ioremap_pfn);
74
75 void __iomem *__arm_ioremap(unsigned long phys_addr, size_t size,
76 unsigned int mtype)
77 {
78 return (void __iomem *)phys_addr;
79 }
80 EXPORT_SYMBOL(__arm_ioremap);
81
82 void __iounmap(volatile void __iomem *addr)
83 {
84 }
85 EXPORT_SYMBOL(__iounmap);