Loading arch/arm/kernel/smp.c +13 −7 Original line number Diff line number Diff line Loading @@ -80,20 +80,24 @@ static DEFINE_SPINLOCK(smp_call_function_lock); int __cpuinit __cpu_up(unsigned int cpu) { struct task_struct *idle; struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); struct task_struct *idle = ci->idle; pgd_t *pgd; pmd_t *pmd; int ret; /* * Spawn a new process manually. Grab a pointer to * its task struct so we can mess with it * Spawn a new process manually, if not already done. * Grab a pointer to its task struct so we can mess with it */ if (!idle) { idle = fork_idle(cpu); if (IS_ERR(idle)) { printk(KERN_ERR "CPU%u: fork() failed\n", cpu); return PTR_ERR(idle); } ci->idle = idle; } /* * Allocate initial page tables to allow the new CPU to Loading Loading @@ -236,6 +240,8 @@ void __init smp_prepare_boot_cpu(void) { unsigned int cpu = smp_processor_id(); per_cpu(cpu_data, cpu).idle = current; cpu_set(cpu, cpu_possible_map); cpu_set(cpu, cpu_present_map); cpu_set(cpu, cpu_online_map); Loading include/asm-arm/cpu.h +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ struct cpuinfo_arm { struct cpu cpu; #ifdef CONFIG_SMP struct task_struct *idle; unsigned int loops_per_jiffy; #endif }; Loading Loading
arch/arm/kernel/smp.c +13 −7 Original line number Diff line number Diff line Loading @@ -80,20 +80,24 @@ static DEFINE_SPINLOCK(smp_call_function_lock); int __cpuinit __cpu_up(unsigned int cpu) { struct task_struct *idle; struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); struct task_struct *idle = ci->idle; pgd_t *pgd; pmd_t *pmd; int ret; /* * Spawn a new process manually. Grab a pointer to * its task struct so we can mess with it * Spawn a new process manually, if not already done. * Grab a pointer to its task struct so we can mess with it */ if (!idle) { idle = fork_idle(cpu); if (IS_ERR(idle)) { printk(KERN_ERR "CPU%u: fork() failed\n", cpu); return PTR_ERR(idle); } ci->idle = idle; } /* * Allocate initial page tables to allow the new CPU to Loading Loading @@ -236,6 +240,8 @@ void __init smp_prepare_boot_cpu(void) { unsigned int cpu = smp_processor_id(); per_cpu(cpu_data, cpu).idle = current; cpu_set(cpu, cpu_possible_map); cpu_set(cpu, cpu_present_map); cpu_set(cpu, cpu_online_map); Loading
include/asm-arm/cpu.h +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ struct cpuinfo_arm { struct cpu cpu; #ifdef CONFIG_SMP struct task_struct *idle; unsigned int loops_per_jiffy; #endif }; Loading