diff options
Diffstat (limited to 'arch/avr32/mm/init.c')
-rw-r--r-- | arch/avr32/mm/init.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c index 0e64ddc45e37..3f90a87527bb 100644 --- a/arch/avr32/mm/init.c +++ b/arch/avr32/mm/init.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/swap.h> | 11 | #include <linux/swap.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mmzone.h> | 13 | #include <linux/mmzone.h> |
14 | #include <linux/module.h> | ||
14 | #include <linux/bootmem.h> | 15 | #include <linux/bootmem.h> |
15 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
16 | #include <linux/nodemask.h> | 17 | #include <linux/nodemask.h> |
@@ -23,11 +24,14 @@ | |||
23 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
24 | #include <asm/sections.h> | 25 | #include <asm/sections.h> |
25 | 26 | ||
27 | #define __page_aligned __attribute__((section(".data.page_aligned"))) | ||
28 | |||
26 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 29 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
27 | 30 | ||
28 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 31 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned; |
29 | 32 | ||
30 | struct page *empty_zero_page; | 33 | struct page *empty_zero_page; |
34 | EXPORT_SYMBOL(empty_zero_page); | ||
31 | 35 | ||
32 | /* | 36 | /* |
33 | * Cache of MMU context last used. | 37 | * Cache of MMU context last used. |
@@ -106,19 +110,9 @@ void __init paging_init(void) | |||
106 | zero_page = alloc_bootmem_low_pages_node(NODE_DATA(0), | 110 | zero_page = alloc_bootmem_low_pages_node(NODE_DATA(0), |
107 | PAGE_SIZE); | 111 | PAGE_SIZE); |
108 | 112 | ||
109 | { | 113 | sysreg_write(PTBR, (unsigned long)swapper_pg_dir); |
110 | pgd_t *pg_dir; | 114 | enable_mmu(); |
111 | int i; | 115 | printk ("CPU: Paging enabled\n"); |
112 | |||
113 | pg_dir = swapper_pg_dir; | ||
114 | sysreg_write(PTBR, (unsigned long)pg_dir); | ||
115 | |||
116 | for (i = 0; i < PTRS_PER_PGD; i++) | ||
117 | pgd_val(pg_dir[i]) = 0; | ||
118 | |||
119 | enable_mmu(); | ||
120 | printk ("CPU: Paging enabled\n"); | ||
121 | } | ||
122 | 116 | ||
123 | for_each_online_node(nid) { | 117 | for_each_online_node(nid) { |
124 | pg_data_t *pgdat = NODE_DATA(nid); | 118 | pg_data_t *pgdat = NODE_DATA(nid); |