smp.c (c4a1f032ed35d744e3d74b8aebe8d85f29aecd88) | smp.c (eb08375ea66e63c5e11dea69b43c5633d531ce81) |
---|---|
1/* 2 * linux/arch/arm/kernel/smp.c 3 * 4 * Copyright (C) 2002 ARM Limited, All Rights Reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 31 unchanged lines hidden (view full) --- 40#include <asm/processor.h> 41#include <asm/sections.h> 42#include <asm/tlbflush.h> 43#include <asm/ptrace.h> 44#include <asm/localtimer.h> 45#include <asm/smp_plat.h> 46#include <asm/virt.h> 47#include <asm/mach/arch.h> | 1/* 2 * linux/arch/arm/kernel/smp.c 3 * 4 * Copyright (C) 2002 ARM Limited, All Rights Reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 31 unchanged lines hidden (view full) --- 40#include <asm/processor.h> 41#include <asm/sections.h> 42#include <asm/tlbflush.h> 43#include <asm/ptrace.h> 44#include <asm/localtimer.h> 45#include <asm/smp_plat.h> 46#include <asm/virt.h> 47#include <asm/mach/arch.h> |
48#include <asm/mpu.h> |
|
48 49/* 50 * as from 2.5, kernels no longer have an init_tasks structure 51 * so we need some other way of telling a new secondary core 52 * where to place its SVC stack 53 */ 54struct secondary_data secondary_data; 55 --- 26 unchanged lines hidden (view full) --- 82{ 83 int ret; 84 85 /* 86 * We need to tell the secondary core where to find 87 * its stack and the page tables. 88 */ 89 secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; | 49 50/* 51 * as from 2.5, kernels no longer have an init_tasks structure 52 * so we need some other way of telling a new secondary core 53 * where to place its SVC stack 54 */ 55struct secondary_data secondary_data; 56 --- 26 unchanged lines hidden (view full) --- 83{ 84 int ret; 85 86 /* 87 * We need to tell the secondary core where to find 88 * its stack and the page tables. 89 */ 90 secondary_data.stack = task_stack_page(idle) + THREAD_START_SP; |
91#ifdef CONFIG_ARM_MPU 92 secondary_data.mpu_rgn_szr = mpu_rgn_info.rgns[MPU_RAM_REGION].drsr; 93#endif 94 |
|
90#ifdef CONFIG_MMU 91 secondary_data.pgdir = virt_to_phys(idmap_pgd); 92 secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); 93#endif 94 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); 95 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); 96 97 /* --- 11 unchanged lines hidden (view full) --- 109 if (!cpu_online(cpu)) { 110 pr_crit("CPU%u: failed to come online\n", cpu); 111 ret = -EIO; 112 } 113 } else { 114 pr_err("CPU%u: failed to boot: %d\n", cpu, ret); 115 } 116 | 95#ifdef CONFIG_MMU 96 secondary_data.pgdir = virt_to_phys(idmap_pgd); 97 secondary_data.swapper_pg_dir = virt_to_phys(swapper_pg_dir); 98#endif 99 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); 100 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); 101 102 /* --- 11 unchanged lines hidden (view full) --- 114 if (!cpu_online(cpu)) { 115 pr_crit("CPU%u: failed to come online\n", cpu); 116 ret = -EIO; 117 } 118 } else { 119 pr_err("CPU%u: failed to boot: %d\n", cpu, ret); 120 } 121 |
117 secondary_data.stack = NULL; 118 secondary_data.pgdir = 0; | |
119 | 122 |
123 memset(&secondary_data, 0, sizeof(secondary_data)); |
|
120 return ret; 121} 122 123/* platform specific SMP operations */ 124void __init smp_init_cpus(void) 125{ 126 if (smp_ops.smp_init_cpus) 127 smp_ops.smp_init_cpus(); --- 620 unchanged lines hidden --- | 124 return ret; 125} 126 127/* platform specific SMP operations */ 128void __init smp_init_cpus(void) 129{ 130 if (smp_ops.smp_init_cpus) 131 smp_ops.smp_init_cpus(); --- 620 unchanged lines hidden --- |