2 * linux/arch/arm/mm/nommu.c
4 * ARM uCLinux supporting functions.
6 #include <linux/module.h>
8 #include <linux/pagemap.h>
10 #include <linux/memblock.h>
12 #include <asm/cacheflush.h>
13 #include <asm/sections.h>
15 #include <asm/setup.h>
16 #include <asm/mach/arch.h>
20 void __init
arm_mm_memblock_reserve(void)
23 * Register the exception vector page.
24 * some architectures which the DRAM is the exception vector to trap,
25 * alloc_page breaks with error, although it is not NULL, but "0."
27 memblock_reserve(CONFIG_VECTORS_BASE
, PAGE_SIZE
);
30 void __init
sanity_check_meminfo(void)
32 phys_addr_t end
= bank_phys_end(&meminfo
.bank
[meminfo
.nr_banks
- 1]);
33 high_memory
= __va(end
- 1) + 1;
37 * paging_init() sets up the page tables, initialises the zone memory
38 * maps, and sets up the zero page, bad page and bad page tables.
40 void __init
paging_init(struct machine_desc
*mdesc
)
46 * We don't need to do anything here for nommu machines.
48 void setup_mm_for_reboot(void)
52 void flush_dcache_page(struct page
*page
)
54 __cpuc_flush_dcache_area(page_address(page
), PAGE_SIZE
);
56 EXPORT_SYMBOL(flush_dcache_page
);
58 void copy_to_user_page(struct vm_area_struct
*vma
, struct page
*page
,
59 unsigned long uaddr
, void *dst
, const void *src
,
62 memcpy(dst
, src
, len
);
63 if (vma
->vm_flags
& VM_EXEC
)
64 __cpuc_coherent_user_range(uaddr
, uaddr
+ len
);
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
))
72 return (void __iomem
*) (offset
+ (pfn
<< PAGE_SHIFT
));
74 EXPORT_SYMBOL(__arm_ioremap_pfn
);
76 void __iomem
*__arm_ioremap_pfn_caller(unsigned long pfn
, unsigned long offset
,
77 size_t size
, unsigned int mtype
, void *caller
)
79 return __arm_ioremap_pfn(pfn
, offset
, size
, mtype
);
82 void __iomem
*__arm_ioremap(unsigned long phys_addr
, size_t size
,
85 return (void __iomem
*)phys_addr
;
87 EXPORT_SYMBOL(__arm_ioremap
);
89 void __iomem
*__arm_ioremap_caller(unsigned long phys_addr
, size_t size
,
90 unsigned int mtype
, void *caller
)
92 return __arm_ioremap(phys_addr
, size
, mtype
);
95 void __iounmap(volatile void __iomem
*addr
)
98 EXPORT_SYMBOL(__iounmap
);