Searched refs:pctx (Results 1 - 3 of 3) sorted by relevance

/linux-4.1.27/crypto/
H A Dccm.c165 struct crypto_ccm_req_priv_ctx *pctx) compute_mac()
168 u8 *odata = pctx->odata; compute_mac()
169 u8 *idata = pctx->idata; compute_mac()
175 getlen = bs - pctx->ilen; compute_mac()
177 memcpy(idata + pctx->ilen, data, getlen); compute_mac()
182 pctx->ilen = 0; compute_mac()
198 memcpy(idata + pctx->ilen, data, datalen); compute_mac()
199 pctx->ilen += datalen; compute_mac()
204 struct crypto_ccm_req_priv_ctx *pctx, get_data_to_compute()
221 compute_mac(tfm, data_src, n, pctx); get_data_to_compute()
228 crypto_yield(pctx->flags); get_data_to_compute()
232 if (pctx->ilen) { get_data_to_compute()
234 u8 *odata = pctx->odata; get_data_to_compute()
235 u8 *idata = pctx->idata; get_data_to_compute()
237 padlen = 16 - pctx->ilen; get_data_to_compute()
238 memset(idata + pctx->ilen, 0, padlen); get_data_to_compute()
241 pctx->ilen = 0; get_data_to_compute()
250 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); crypto_ccm_auth() local
253 u8 *odata = pctx->odata; crypto_ccm_auth()
254 u8 *idata = pctx->idata; crypto_ccm_auth()
267 pctx->ilen = format_adata(idata, assoclen); crypto_ccm_auth()
268 get_data_to_compute(cipher, pctx, req->assoc, req->assoclen); crypto_ccm_auth()
270 pctx->ilen = 0; crypto_ccm_auth()
275 get_data_to_compute(cipher, pctx, plain, cryptlen); crypto_ccm_auth()
285 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); crypto_ccm_encrypt_done() local
286 u8 *odata = pctx->odata; crypto_ccm_encrypt_done()
307 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); crypto_ccm_encrypt() local
308 struct ablkcipher_request *abreq = &pctx->abreq; crypto_ccm_encrypt()
311 u8 *odata = pctx->odata; crypto_ccm_encrypt()
319 pctx->flags = aead_request_flags(req); crypto_ccm_encrypt()
330 sg_init_table(pctx->src, 2); crypto_ccm_encrypt()
331 sg_set_buf(pctx->src, odata, 16); crypto_ccm_encrypt()
332 scatterwalk_sg_chain(pctx->src, 2, req->src); crypto_ccm_encrypt()
334 dst = pctx->src; crypto_ccm_encrypt()
336 sg_init_table(pctx->dst, 2); crypto_ccm_encrypt()
337 sg_set_buf(pctx->dst, odata, 16); crypto_ccm_encrypt()
338 scatterwalk_sg_chain(pctx->dst, 2, req->dst); crypto_ccm_encrypt()
339 dst = pctx->dst; crypto_ccm_encrypt()
343 ablkcipher_request_set_callback(abreq, pctx->flags, crypto_ccm_encrypt()
345 ablkcipher_request_set_crypt(abreq, pctx->src, dst, cryptlen + 16, iv); crypto_ccm_encrypt()
360 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); crypto_ccm_decrypt_done() local
367 if (!err && crypto_memneq(pctx->auth_tag, pctx->odata, authsize)) crypto_ccm_decrypt_done()
377 struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req); crypto_ccm_decrypt() local
378 struct ablkcipher_request *abreq = &pctx->abreq; crypto_ccm_decrypt()
382 u8 *authtag = pctx->auth_tag; crypto_ccm_decrypt()
383 u8 *odata = pctx->odata; crypto_ccm_decrypt()
395 pctx->flags = aead_request_flags(req); crypto_ccm_decrypt()
401 sg_init_table(pctx->src, 2); crypto_ccm_decrypt()
402 sg_set_buf(pctx->src, authtag, 16); crypto_ccm_decrypt()
403 scatterwalk_sg_chain(pctx->src, 2, req->src); crypto_ccm_decrypt()
405 dst = pctx->src; crypto_ccm_decrypt()
407 sg_init_table(pctx->dst, 2); crypto_ccm_decrypt()
408 sg_set_buf(pctx->dst, authtag, 16); crypto_ccm_decrypt()
409 scatterwalk_sg_chain(pctx->dst, 2, req->dst); crypto_ccm_decrypt()
410 dst = pctx->dst; crypto_ccm_decrypt()
414 ablkcipher_request_set_callback(abreq, pctx->flags, crypto_ccm_decrypt()
416 ablkcipher_request_set_crypt(abreq, pctx->src, dst, cryptlen + 16, iv); crypto_ccm_decrypt()
164 compute_mac(struct crypto_cipher *tfm, u8 *data, int n, struct crypto_ccm_req_priv_ctx *pctx) compute_mac() argument
203 get_data_to_compute(struct crypto_cipher *tfm, struct crypto_ccm_req_priv_ctx *pctx, struct scatterlist *sg, unsigned int len) get_data_to_compute() argument
H A Dgcm.c195 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); crypto_gcm_init_crypt() local
199 memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag)); crypto_gcm_init_crypt()
202 sg_init_table(pctx->src, 2); crypto_gcm_init_crypt()
203 sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag)); crypto_gcm_init_crypt()
204 scatterwalk_sg_chain(pctx->src, 2, req->src); crypto_gcm_init_crypt()
206 dst = pctx->src; crypto_gcm_init_crypt()
208 sg_init_table(pctx->dst, 2); crypto_gcm_init_crypt()
209 sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag)); crypto_gcm_init_crypt()
210 scatterwalk_sg_chain(pctx->dst, 2, req->dst); crypto_gcm_init_crypt()
211 dst = pctx->dst; crypto_gcm_init_crypt()
215 ablkcipher_request_set_crypt(ablk_req, pctx->src, dst, crypto_gcm_init_crypt()
216 cryptlen + sizeof(pctx->auth_tag), crypto_gcm_init_crypt()
230 struct crypto_gcm_req_priv_ctx *pctx, gcm_hash_update()
235 struct ahash_request *ahreq = &pctx->u.ahreq; gcm_hash_update()
245 struct crypto_gcm_req_priv_ctx *pctx, gcm_hash_remain()
249 struct ahash_request *ahreq = &pctx->u.ahreq; gcm_hash_remain()
253 sg_init_one(pctx->src, gcm_zeroes, remain); gcm_hash_remain()
254 ahash_request_set_crypt(ahreq, pctx->src, NULL, remain); gcm_hash_remain()
260 struct crypto_gcm_req_priv_ctx *pctx) gcm_hash_len()
262 struct ahash_request *ahreq = &pctx->u.ahreq; gcm_hash_len()
263 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; gcm_hash_len()
268 memcpy(pctx->iauth_tag, &lengths, 16); gcm_hash_len()
269 sg_init_one(pctx->src, pctx->iauth_tag, 16); gcm_hash_len()
272 ahash_request_set_crypt(ahreq, pctx->src, gcm_hash_len()
279 struct crypto_gcm_req_priv_ctx *pctx) gcm_hash_final()
281 struct ahash_request *ahreq = &pctx->u.ahreq; gcm_hash_final()
285 ahash_request_set_crypt(ahreq, NULL, pctx->iauth_tag, 0); gcm_hash_final()
292 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __gcm_hash_final_done() local
293 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; __gcm_hash_final_done()
296 crypto_xor(pctx->auth_tag, pctx->iauth_tag, 16); __gcm_hash_final_done()
310 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __gcm_hash_len_done() local
313 err = gcm_hash_final(req, pctx); __gcm_hash_len_done()
330 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __gcm_hash_crypt_remain_done() local
333 err = gcm_hash_len(req, pctx); __gcm_hash_crypt_remain_done()
351 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __gcm_hash_crypt_done() local
352 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; __gcm_hash_crypt_done()
358 err = gcm_hash_remain(req, pctx, remain, __gcm_hash_crypt_done()
376 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __gcm_hash_assoc_remain_done() local
377 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; __gcm_hash_assoc_remain_done()
385 err = gcm_hash_update(req, pctx, compl, __gcm_hash_assoc_remain_done()
407 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __gcm_hash_assoc_done() local
413 err = gcm_hash_remain(req, pctx, remain, __gcm_hash_assoc_done()
431 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __gcm_hash_init_done() local
439 err = gcm_hash_update(req, pctx, compl, __gcm_hash_init_done()
459 struct crypto_gcm_req_priv_ctx *pctx) gcm_hash()
461 struct ahash_request *ahreq = &pctx->u.ahreq; gcm_hash()
462 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; gcm_hash()
477 err = gcm_hash_update(req, pctx, compl, req->assoc, req->assoclen); gcm_hash()
481 err = gcm_hash_remain(req, pctx, remain, gcm_hash()
488 err = gcm_hash_update(req, pctx, compl, gctx->src, gctx->cryptlen); gcm_hash()
492 err = gcm_hash_remain(req, pctx, remain, gcm_hash()
497 err = gcm_hash_len(req, pctx); gcm_hash()
500 err = gcm_hash_final(req, pctx); gcm_hash()
508 struct crypto_gcm_req_priv_ctx *pctx) gcm_enc_copy_hash()
511 u8 *auth_tag = pctx->auth_tag; gcm_enc_copy_hash()
519 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); gcm_enc_hash_done() local
522 gcm_enc_copy_hash(req, pctx); gcm_enc_hash_done()
530 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); gcm_encrypt_done() local
533 err = gcm_hash(req, pctx); gcm_encrypt_done()
537 crypto_xor(pctx->auth_tag, pctx->iauth_tag, 16); gcm_encrypt_done()
538 gcm_enc_copy_hash(req, pctx); gcm_encrypt_done()
547 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); crypto_gcm_encrypt() local
548 struct ablkcipher_request *abreq = &pctx->u.abreq; crypto_gcm_encrypt()
549 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; crypto_gcm_encrypt()
564 err = gcm_hash(req, pctx); crypto_gcm_encrypt()
568 crypto_xor(pctx->auth_tag, pctx->iauth_tag, 16); crypto_gcm_encrypt()
569 gcm_enc_copy_hash(req, pctx); crypto_gcm_encrypt()
575 struct crypto_gcm_req_priv_ctx *pctx) crypto_gcm_verify()
578 u8 *auth_tag = pctx->auth_tag; crypto_gcm_verify()
579 u8 *iauth_tag = pctx->iauth_tag; crypto_gcm_verify()
591 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); gcm_decrypt_done() local
594 err = crypto_gcm_verify(req, pctx); gcm_decrypt_done()
601 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); gcm_dec_hash_done() local
602 struct ablkcipher_request *abreq = &pctx->u.abreq; gcm_dec_hash_done()
603 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; gcm_dec_hash_done()
613 err = crypto_gcm_verify(req, pctx); gcm_dec_hash_done()
622 struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); crypto_gcm_decrypt() local
623 struct ablkcipher_request *abreq = &pctx->u.abreq; crypto_gcm_decrypt()
624 struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; crypto_gcm_decrypt()
637 err = gcm_hash(req, pctx); crypto_gcm_decrypt()
648 return crypto_gcm_verify(req, pctx); crypto_gcm_decrypt()
229 gcm_hash_update(struct aead_request *req, struct crypto_gcm_req_priv_ctx *pctx, crypto_completion_t compl, struct scatterlist *src, unsigned int len) gcm_hash_update() argument
244 gcm_hash_remain(struct aead_request *req, struct crypto_gcm_req_priv_ctx *pctx, unsigned int remain, crypto_completion_t compl) gcm_hash_remain() argument
259 gcm_hash_len(struct aead_request *req, struct crypto_gcm_req_priv_ctx *pctx) gcm_hash_len() argument
278 gcm_hash_final(struct aead_request *req, struct crypto_gcm_req_priv_ctx *pctx) gcm_hash_final() argument
458 gcm_hash(struct aead_request *req, struct crypto_gcm_req_priv_ctx *pctx) gcm_hash() argument
507 gcm_enc_copy_hash(struct aead_request *req, struct crypto_gcm_req_priv_ctx *pctx) gcm_enc_copy_hash() argument
574 crypto_gcm_verify(struct aead_request *req, struct crypto_gcm_req_priv_ctx *pctx) crypto_gcm_verify() argument
/linux-4.1.27/drivers/gpu/drm/i915/
H A Dintel_pm.c4727 /* Check that the pctx buffer wasn't move under us. */ valleyview_check_pctx()
4771 struct drm_i915_gem_object *pctx; valleyview_setup_pctx() local
4784 pctx = i915_gem_object_create_stolen_for_preallocated(dev_priv->dev, valleyview_setup_pctx()
4801 pctx = i915_gem_object_create_stolen(dev, pctx_size); valleyview_setup_pctx()
4802 if (!pctx) { valleyview_setup_pctx()
4807 pctx_paddr = dev_priv->mm.stolen_base + pctx->stolen->start; valleyview_setup_pctx()
4812 dev_priv->vlv_pctx = pctx; valleyview_setup_pctx()

Completed in 216 milliseconds