|
@@ -62,7 +62,6 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
|
{
|
|
{
|
|
struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu);
|
|
struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu);
|
|
struct task_struct *idle = ci->idle;
|
|
struct task_struct *idle = ci->idle;
|
|
- pgd_t *pgd;
|
|
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -84,30 +83,12 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
|
init_idle(idle, cpu);
|
|
init_idle(idle, cpu);
|
|
}
|
|
}
|
|
|
|
|
|
- /*
|
|
|
|
- * Allocate initial page tables to allow the new CPU to
|
|
|
|
- * enable the MMU safely. This essentially means a set
|
|
|
|
- * of our "standard" page tables, with the addition of
|
|
|
|
- * a 1:1 mapping for the physical address of the kernel.
|
|
|
|
- */
|
|
|
|
- pgd = pgd_alloc(&init_mm);
|
|
|
|
- if (!pgd)
|
|
|
|
- return -ENOMEM;
|
|
|
|
-
|
|
|
|
- if (PHYS_OFFSET != PAGE_OFFSET) {
|
|
|
|
-#ifndef CONFIG_HOTPLUG_CPU
|
|
|
|
- identity_mapping_add(pgd, __pa(__init_begin), __pa(__init_end));
|
|
|
|
-#endif
|
|
|
|
- identity_mapping_add(pgd, __pa(_stext), __pa(_etext));
|
|
|
|
- identity_mapping_add(pgd, __pa(_sdata), __pa(_edata));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* We need to tell the secondary core where to find
|
|
* We need to tell the secondary core where to find
|
|
* its stack and the page tables.
|
|
* its stack and the page tables.
|
|
*/
|
|
*/
|
|
secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
|
|
secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
|
|
- secondary_data.pgdir = virt_to_phys(pgd);
|
|
|
|
|
|
+ secondary_data.pgdir = virt_to_phys(idmap_pgd);
|
|
secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir);
|
|
secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir);
|
|
__cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data));
|
|
__cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data));
|
|
outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
|
|
outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
|
|
@@ -143,16 +124,6 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
|
secondary_data.stack = NULL;
|
|
secondary_data.stack = NULL;
|
|
secondary_data.pgdir = 0;
|
|
secondary_data.pgdir = 0;
|
|
|
|
|
|
- if (PHYS_OFFSET != PAGE_OFFSET) {
|
|
|
|
-#ifndef CONFIG_HOTPLUG_CPU
|
|
|
|
- identity_mapping_del(pgd, __pa(__init_begin), __pa(__init_end));
|
|
|
|
-#endif
|
|
|
|
- identity_mapping_del(pgd, __pa(_stext), __pa(_etext));
|
|
|
|
- identity_mapping_del(pgd, __pa(_sdata), __pa(_edata));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- pgd_free(&init_mm, pgd);
|
|
|
|
-
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|