aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mti-malta
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2014-01-15 09:07:57 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-03-26 18:09:20 -0400
commitd1965c06160b5c1b00a683ff083d875aa0ebb341 (patch)
tree14cdc2b4673d0f91016b2e0cfecad7e9af430178 /arch/mips/mti-malta
parent3bdd8e6e09cd5e88b3fc8ceddf150976633f43c3 (diff)
MIPS: malta: malta-memory: Add free_init_pages_eva() callback
Use a Malta specific function to free the init section once the kernel has booted. When operating in EVA mode, the physical memory is shifted to 0x80000000. Kernel is loaded into 0x80000000 (virtual) so the offset between physical and virtual addresses is 0. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Diffstat (limited to 'arch/mips/mti-malta')
-rw-r--r--arch/mips/mti-malta/malta-memory.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c
index 9235aee832c7..6d0f4ab3632d 100644
--- a/arch/mips/mti-malta/malta-memory.c
+++ b/arch/mips/mti-malta/malta-memory.c
@@ -111,6 +111,12 @@ fw_memblock_t * __init fw_getmdesc(int eva)
111 return &mdesc[0]; 111 return &mdesc[0];
112} 112}
113 113
114static void free_init_pages_eva_malta(void *begin, void *end)
115{
116 free_init_pages("unused kernel", __pa_symbol((unsigned long *)begin),
117 __pa_symbol((unsigned long *)end));
118}
119
114static int __init fw_memtype_classify(unsigned int type) 120static int __init fw_memtype_classify(unsigned int type)
115{ 121{
116 switch (type) { 122 switch (type) {
@@ -128,6 +134,8 @@ void __init fw_meminit(void)
128 fw_memblock_t *p; 134 fw_memblock_t *p;
129 135
130 p = fw_getmdesc(config_enabled(CONFIG_EVA)); 136 p = fw_getmdesc(config_enabled(CONFIG_EVA));
137 free_init_pages_eva = (config_enabled(CONFIG_EVA) ?
138 free_init_pages_eva_malta : NULL);
131 139
132 while (p->size) { 140 while (p->size) {
133 long type; 141 long type;