Changeset View
Changeset View
Standalone View
Standalone View
sys/crypto/blake2/blake2_cryptodev.c
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | |||||
blake2_cleanctx(void) | blake2_cleanctx(void) | ||||
{ | { | ||||
int i; | int i; | ||||
/* XXX - no way to return driverid */ | /* XXX - no way to return driverid */ | ||||
CPU_FOREACH(i) { | CPU_FOREACH(i) { | ||||
if (ctx_fpu[i] != NULL) { | if (ctx_fpu[i] != NULL) { | ||||
mtx_destroy(&ctx_mtx[i]); | mtx_destroy(&ctx_mtx[i]); | ||||
#ifdef __amd64__ | |||||
fpu_kern_free_ctx_domain(ctx_fpu[i]); | |||||
#else | |||||
fpu_kern_free_ctx(ctx_fpu[i]); | fpu_kern_free_ctx(ctx_fpu[i]); | ||||
#endif | |||||
} | } | ||||
ctx_fpu[i] = NULL; | ctx_fpu[i] = NULL; | ||||
} | } | ||||
free(ctx_mtx, M_BLAKE2); | free(ctx_mtx, M_BLAKE2); | ||||
ctx_mtx = NULL; | ctx_mtx = NULL; | ||||
free(ctx_fpu, M_BLAKE2); | free(ctx_fpu, M_BLAKE2); | ||||
ctx_fpu = NULL; | ctx_fpu = NULL; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines |