Changeset View
Changeset View
Standalone View
Standalone View
head/sys/crypto/armv8/armv8_crypto.c
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct armv8_crypto_softc *sc; | struct armv8_crypto_softc *sc; | ||||
int i; | int i; | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
sc->dieing = 0; | sc->dieing = 0; | ||||
sc->cid = crypto_get_driverid(dev, sizeof(struct armv8_crypto_session), | sc->cid = crypto_get_driverid(dev, sizeof(struct armv8_crypto_session), | ||||
CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_SYNC); | CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_SYNC | CRYPTOCAP_F_ACCEL_SOFTWARE); | ||||
if (sc->cid < 0) { | if (sc->cid < 0) { | ||||
device_printf(dev, "Could not get crypto driver id.\n"); | device_printf(dev, "Could not get crypto driver id.\n"); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
rw_init(&sc->lock, "armv8crypto"); | rw_init(&sc->lock, "armv8crypto"); | ||||
ctx_mtx = malloc(sizeof(*ctx_mtx) * (mp_maxid + 1), M_ARMV8_CRYPTO, | ctx_mtx = malloc(sizeof(*ctx_mtx) * (mp_maxid + 1), M_ARMV8_CRYPTO, | ||||
▲ Show 20 Lines • Show All 243 Lines • Show Last 20 Lines |