File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ extern void set_smp_ipi_range(int ipi_base, int nr_ipi);
48
48
* Called from platform specific assembly code, this is the
49
49
* secondary CPU entry point.
50
50
*/
51
- asmlinkage void secondary_start_kernel (void );
51
+ asmlinkage void secondary_start_kernel (struct task_struct * task );
52
52
53
53
54
54
/*
@@ -61,6 +61,7 @@ struct secondary_data {
61
61
};
62
62
unsigned long swapper_pg_dir ;
63
63
void * stack ;
64
+ struct task_struct * task ;
64
65
};
65
66
extern struct secondary_data secondary_data ;
66
67
extern void secondary_startup (void );
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ ENTRY(secondary_startup)
115
115
ret r12
116
116
1 : bl __after_proc_init
117
117
ldr sp , [ r7 , # 12 ] @ set up the stack pointer
118
+ ldr r0 , [ r7 , # 16 ] @ set up task pointer
118
119
mov fp , # 0
119
120
b secondary_start_kernel
120
121
ENDPROC(secondary_startup)
Original file line number Diff line number Diff line change @@ -424,8 +424,9 @@ ENDPROC(secondary_startup)
424
424
ENDPROC(secondary_startup_arm)
425
425
426
426
ENTRY(__secondary_switched)
427
- ldr_l r7 , secondary_data + 12 @ get secondary_data.stack
428
- mov sp , r7
427
+ adr_l r7 , secondary_data + 12 @ get secondary_data.stack
428
+ ldr sp , [ r7 ]
429
+ ldr r0 , [ r7 , # 4 ] @ get secondary_data.task
429
430
mov fp , # 0
430
431
b secondary_start_kernel
431
432
ENDPROC(__secondary_switched)
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
153
153
secondary_data .pgdir = virt_to_phys (idmap_pgd );
154
154
secondary_data .swapper_pg_dir = get_arch_pgd (swapper_pg_dir );
155
155
#endif
156
+ secondary_data .task = idle ;
156
157
sync_cache_w (& secondary_data );
157
158
158
159
/*
@@ -375,9 +376,12 @@ void arch_cpu_idle_dead(void)
375
376
*/
376
377
__asm__("mov sp, %0\n"
377
378
" mov fp, #0\n"
379
+ " mov r0, %1\n"
378
380
" b secondary_start_kernel"
379
381
:
380
- : "r" (task_stack_page (current ) + THREAD_SIZE - 8 ));
382
+ : "r" (task_stack_page (current ) + THREAD_SIZE - 8 ),
383
+ "r" (current )
384
+ : "r0" );
381
385
}
382
386
#endif /* CONFIG_HOTPLUG_CPU */
383
387
@@ -400,7 +404,7 @@ static void smp_store_cpu_info(unsigned int cpuid)
400
404
* This is the secondary CPU boot entry. We're using this CPUs
401
405
* idle thread stack, but a set of temporary page tables.
402
406
*/
403
- asmlinkage void secondary_start_kernel (void )
407
+ asmlinkage void secondary_start_kernel (struct task_struct * task )
404
408
{
405
409
struct mm_struct * mm = & init_mm ;
406
410
unsigned int cpu ;
You can’t perform that action at this time.
0 commit comments