aarch64: Move tpidr_el0 setup from spawn to switch
This commit is contained in:
@@ -92,7 +92,6 @@ impl ContextList {
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
{
|
||||
let context_id = context.id.into();
|
||||
context.arch.set_tcb(context_id);
|
||||
context.arch.set_lr(func as usize);
|
||||
context.arch.set_context_handle();
|
||||
}
|
||||
|
||||
@@ -151,6 +151,11 @@ pub unsafe fn switch() -> bool {
|
||||
}
|
||||
gdt::set_tcb((*to_ptr).id.into());
|
||||
}
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
{
|
||||
let pid = (*to_ptr).id.into();
|
||||
(*to_ptr).arch.set_tcb(pid);
|
||||
}
|
||||
CONTEXT_ID.store((*to_ptr).id, Ordering::SeqCst);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user