MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfp_restore_state

Function vfp_restore_state

freebsd/arm64/arm64/vfp.c:202–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void
203vfp_restore_state(void)
204{
205 struct pcb *curpcb;
206 u_int cpu;
207
208 critical_enter();
209
210 cpu = PCPU_GET(cpuid);
211 curpcb = curthread->td_pcb;
212 curpcb->pcb_fpflags |= PCB_FP_STARTED;
213
214 vfp_enable();
215
216 /*
217 * If the previous thread on this cpu to use the VFP was not the
218 * current thread, or the current thread last used it on a different
219 * cpu we need to restore the old state.
220 */
221 if (PCPU_GET(fpcurthread) != curthread || cpu != curpcb->pcb_vfpcpu) {
222 vfp_restore(curthread->td_pcb->pcb_fpusaved);
223 PCPU_SET(fpcurthread, curthread);
224 curpcb->pcb_vfpcpu = cpu;
225 }
226
227 critical_exit();
228}
229
230void
231vfp_init(void)

Callers 2

do_el1h_syncFunction · 0.85
do_el0_syncFunction · 0.85

Calls 4

vfp_enableFunction · 0.85
vfp_restoreFunction · 0.70
critical_enterFunction · 0.50
critical_exitFunction · 0.50

Tested by

no test coverage detected