mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-23 19:28:36 +00:00
arm64: Create a version of vfp_save_state for cpu_switch
This will be used when we add SVE support to reduce the registers needed to be saved on context switch. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D43305
This commit is contained in:
parent
4eec584d79
commit
a30149b2a9
|
@ -148,9 +148,7 @@ ENTRY(cpu_switch)
|
||||||
mov x21, x2
|
mov x21, x2
|
||||||
|
|
||||||
#ifdef VFP
|
#ifdef VFP
|
||||||
/* Load the pcb address */
|
bl vfp_save_state_switch
|
||||||
mov x1, x4
|
|
||||||
bl vfp_save_state
|
|
||||||
mov x0, x20
|
mov x0, x20
|
||||||
#else
|
#else
|
||||||
mov x0, x1
|
mov x0, x1
|
||||||
|
|
|
@ -216,6 +216,14 @@ vfp_save_state_savectx(struct pcb *pcb)
|
||||||
vfp_save_state_common(curthread, pcb);
|
vfp_save_state_common(curthread, pcb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
vfp_save_state_switch(struct thread *td)
|
||||||
|
{
|
||||||
|
KASSERT(td != NULL, ("NULL vfp thread"));
|
||||||
|
|
||||||
|
vfp_save_state_common(td, td->td_pcb);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the VFP state for a forked process or new thread. The PCB will
|
* Update the VFP state for a forked process or new thread. The PCB will
|
||||||
* have been copied from the old thread.
|
* have been copied from the old thread.
|
||||||
|
|
|
@ -79,6 +79,7 @@ void vfp_reset_state(struct thread *, struct pcb *);
|
||||||
void vfp_restore_state(void);
|
void vfp_restore_state(void);
|
||||||
void vfp_save_state(struct thread *, struct pcb *);
|
void vfp_save_state(struct thread *, struct pcb *);
|
||||||
void vfp_save_state_savectx(struct pcb *);
|
void vfp_save_state_savectx(struct pcb *);
|
||||||
|
void vfp_save_state_switch(struct thread *);
|
||||||
|
|
||||||
struct fpu_kern_ctx;
|
struct fpu_kern_ctx;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue