aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/init.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-08-21 12:06:38 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-20 09:58:35 -0400
commit1b2e2b73b4c84c918686c04a00724197036c0847 (patch)
treed0b2d703573dbe5a7f3d6d647b51a3137e039007 /arch/arm/mm/init.c
parente478bec0ba0a83a48a0f6982934b6de079e7e6b3 (diff)
[ARM] Cleanup arch/arm/mm a little
Move top_pmd into arch/arm/mm/mm.h - nothing outside arch/arm/mm references it. Move the repeated definition of TOP_PTE into mm/mm.h, as well as a few function prototypes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r--arch/arm/mm/init.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index fe3f7f625008..1099af6d470a 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -25,6 +25,8 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include "mm.h"
29
28DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 30DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
29 31
30extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 32extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
@@ -44,6 +46,11 @@ static struct meminfo meminfo __initdata = { 0, };
44 */ 46 */
45struct page *empty_zero_page; 47struct page *empty_zero_page;
46 48
49/*
50 * The pmd table for the upper-most set of pages.
51 */
52pmd_t *top_pmd;
53
47void show_mem(void) 54void show_mem(void)
48{ 55{
49 int free = 0, total = 0, reserved = 0; 56 int free = 0, total = 0, reserved = 0;
@@ -83,16 +90,6 @@ void show_mem(void)
83 printk("%d pages swap cached\n", cached); 90 printk("%d pages swap cached\n", cached);
84} 91}
85 92
86static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt)
87{
88 return pmd_offset(pgd, virt);
89}
90
91static inline pmd_t *pmd_off_k(unsigned long virt)
92{
93 return pmd_off(pgd_offset_k(virt), virt);
94}
95
96#define for_each_nodebank(iter,mi,no) \ 93#define for_each_nodebank(iter,mi,no) \
97 for (iter = 0; iter < mi->nr_banks; iter++) \ 94 for (iter = 0; iter < mi->nr_banks; iter++) \
98 if (mi->bank[iter].node == no) 95 if (mi->bank[iter].node == no)
@@ -229,9 +226,6 @@ static __init void reserve_node_zero(pg_data_t *pgdat)
229 reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size); 226 reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size);
230} 227}
231 228
232void __init build_mem_type_table(void);
233void __init create_mapping(struct map_desc *md);
234
235static unsigned long __init 229static unsigned long __init
236bootmem_init_node(int node, int initrd_node, struct meminfo *mi) 230bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
237{ 231{