Searched refs:nbytes (Results 1 - 200 of 316) sorted by relevance

12

/linux-4.1.27/arch/x86/crypto/
H A Dglue_helper.c41 unsigned int nbytes, i, func_bytes; __glue_ecb_crypt_128bit() local
47 while ((nbytes = walk->nbytes)) { __glue_ecb_crypt_128bit()
52 desc, fpu_enabled, nbytes); __glue_ecb_crypt_128bit()
58 if (nbytes >= func_bytes) { __glue_ecb_crypt_128bit()
65 nbytes -= func_bytes; __glue_ecb_crypt_128bit()
66 } while (nbytes >= func_bytes); __glue_ecb_crypt_128bit()
68 if (nbytes < bsize) __glue_ecb_crypt_128bit()
74 err = blkcipher_walk_done(desc, walk, nbytes); __glue_ecb_crypt_128bit()
83 struct scatterlist *src, unsigned int nbytes) glue_ecb_crypt_128bit()
87 blkcipher_walk_init(&walk, dst, src, nbytes); glue_ecb_crypt_128bit()
98 unsigned int nbytes = walk->nbytes; __glue_cbc_encrypt_128bit() local
110 nbytes -= bsize; __glue_cbc_encrypt_128bit()
111 } while (nbytes >= bsize); __glue_cbc_encrypt_128bit()
114 return nbytes; __glue_cbc_encrypt_128bit()
120 struct scatterlist *src, unsigned int nbytes) glue_cbc_encrypt_128bit()
125 blkcipher_walk_init(&walk, dst, src, nbytes); glue_cbc_encrypt_128bit()
128 while ((nbytes = walk.nbytes)) { glue_cbc_encrypt_128bit()
129 nbytes = __glue_cbc_encrypt_128bit(fn, desc, &walk); glue_cbc_encrypt_128bit()
130 err = blkcipher_walk_done(desc, &walk, nbytes); glue_cbc_encrypt_128bit()
144 unsigned int nbytes = walk->nbytes; __glue_cbc_decrypt_128bit() local
152 src += nbytes / bsize - 1; __glue_cbc_decrypt_128bit()
153 dst += nbytes / bsize - 1; __glue_cbc_decrypt_128bit()
162 if (nbytes >= func_bytes) { __glue_cbc_decrypt_128bit()
164 nbytes -= func_bytes - bsize; __glue_cbc_decrypt_128bit()
170 nbytes -= bsize; __glue_cbc_decrypt_128bit()
171 if (nbytes < bsize) __glue_cbc_decrypt_128bit()
177 } while (nbytes >= func_bytes); __glue_cbc_decrypt_128bit()
179 if (nbytes < bsize) __glue_cbc_decrypt_128bit()
188 return nbytes; __glue_cbc_decrypt_128bit()
194 struct scatterlist *src, unsigned int nbytes) glue_cbc_decrypt_128bit()
201 blkcipher_walk_init(&walk, dst, src, nbytes); glue_cbc_decrypt_128bit()
204 while ((nbytes = walk.nbytes)) { glue_cbc_decrypt_128bit()
206 desc, fpu_enabled, nbytes); glue_cbc_decrypt_128bit()
207 nbytes = __glue_cbc_decrypt_128bit(gctx, desc, &walk); glue_cbc_decrypt_128bit()
208 err = blkcipher_walk_done(desc, &walk, nbytes); glue_cbc_decrypt_128bit()
223 unsigned int nbytes = walk->nbytes; glue_ctr_crypt_final_128bit() local
229 memcpy(&tmp, src, nbytes); glue_ctr_crypt_final_128bit()
231 memcpy(dst, &tmp, nbytes); glue_ctr_crypt_final_128bit()
242 unsigned int nbytes = walk->nbytes; __glue_ctr_crypt_128bit() local
256 if (nbytes >= func_bytes) { __glue_ctr_crypt_128bit()
262 nbytes -= func_bytes; __glue_ctr_crypt_128bit()
263 } while (nbytes >= func_bytes); __glue_ctr_crypt_128bit()
265 if (nbytes < bsize) __glue_ctr_crypt_128bit()
272 return nbytes; __glue_ctr_crypt_128bit()
277 struct scatterlist *src, unsigned int nbytes) glue_ctr_crypt_128bit()
284 blkcipher_walk_init(&walk, dst, src, nbytes); glue_ctr_crypt_128bit()
287 while ((nbytes = walk.nbytes) >= bsize) { glue_ctr_crypt_128bit()
289 desc, fpu_enabled, nbytes); glue_ctr_crypt_128bit()
290 nbytes = __glue_ctr_crypt_128bit(gctx, desc, &walk); glue_ctr_crypt_128bit()
291 err = blkcipher_walk_done(desc, &walk, nbytes); glue_ctr_crypt_128bit()
296 if (walk.nbytes) { glue_ctr_crypt_128bit()
312 unsigned int nbytes = walk->nbytes; __glue_xts_crypt_128bit() local
323 if (nbytes >= func_bytes) { __glue_xts_crypt_128bit()
330 nbytes -= func_bytes; __glue_xts_crypt_128bit()
331 } while (nbytes >= func_bytes); __glue_xts_crypt_128bit()
333 if (nbytes < bsize) __glue_xts_crypt_128bit()
339 return nbytes; __glue_xts_crypt_128bit()
345 struct scatterlist *src, unsigned int nbytes, glue_xts_crypt_128bit()
354 blkcipher_walk_init(&walk, dst, src, nbytes); glue_xts_crypt_128bit()
357 nbytes = walk.nbytes; glue_xts_crypt_128bit()
358 if (!nbytes) glue_xts_crypt_128bit()
364 nbytes < bsize ? bsize : nbytes); glue_xts_crypt_128bit()
369 while (nbytes) { glue_xts_crypt_128bit()
370 nbytes = __glue_xts_crypt_128bit(gctx, crypt_ctx, desc, &walk); glue_xts_crypt_128bit()
372 err = blkcipher_walk_done(desc, &walk, nbytes); glue_xts_crypt_128bit()
373 nbytes = walk.nbytes; glue_xts_crypt_128bit()
81 glue_ecb_crypt_128bit(const struct common_glue_ctx *gctx, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) glue_ecb_crypt_128bit() argument
117 glue_cbc_encrypt_128bit(const common_glue_func_t fn, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) glue_cbc_encrypt_128bit() argument
191 glue_cbc_decrypt_128bit(const struct common_glue_ctx *gctx, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) glue_cbc_decrypt_128bit() argument
275 glue_ctr_crypt_128bit(const struct common_glue_ctx *gctx, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) glue_ctr_crypt_128bit() argument
343 glue_xts_crypt_128bit(const struct common_glue_ctx *gctx, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, void (*tweak_fn)(void *ctx, u8 *dst, const u8 *src), void *tweak_ctx, void *crypt_ctx) glue_xts_crypt_128bit() argument
H A Dcast5_avx_glue.c49 static inline bool cast5_fpu_begin(bool fpu_enabled, unsigned int nbytes) cast5_fpu_begin() argument
52 NULL, fpu_enabled, nbytes); cast5_fpu_begin()
66 unsigned int nbytes; ecb_crypt() local
75 while ((nbytes = walk->nbytes)) { ecb_crypt()
79 fpu_enabled = cast5_fpu_begin(fpu_enabled, nbytes); ecb_crypt()
82 if (nbytes >= bsize * CAST5_PARALLEL_BLOCKS) { ecb_crypt()
88 nbytes -= bsize * CAST5_PARALLEL_BLOCKS; ecb_crypt()
89 } while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS); ecb_crypt()
91 if (nbytes < bsize) ecb_crypt()
103 nbytes -= bsize; ecb_crypt()
104 } while (nbytes >= bsize); ecb_crypt()
107 err = blkcipher_walk_done(desc, walk, nbytes); ecb_crypt()
115 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
119 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_encrypt()
124 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
128 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_decrypt()
137 unsigned int nbytes = walk->nbytes; __cbc_encrypt() local
149 nbytes -= bsize; __cbc_encrypt()
150 } while (nbytes >= bsize); __cbc_encrypt()
153 return nbytes; __cbc_encrypt()
157 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
162 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
165 while ((nbytes = walk.nbytes)) { cbc_encrypt()
166 nbytes = __cbc_encrypt(desc, &walk); cbc_encrypt()
167 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_encrypt()
178 unsigned int nbytes = walk->nbytes; __cbc_decrypt() local
184 src += nbytes / bsize - 1; __cbc_decrypt()
185 dst += nbytes / bsize - 1; __cbc_decrypt()
190 if (nbytes >= bsize * CAST5_PARALLEL_BLOCKS) { __cbc_decrypt()
192 nbytes -= bsize * (CAST5_PARALLEL_BLOCKS - 1); __cbc_decrypt()
198 nbytes -= bsize; __cbc_decrypt()
199 if (nbytes < bsize) __cbc_decrypt()
205 } while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS); __cbc_decrypt()
212 nbytes -= bsize; __cbc_decrypt()
213 if (nbytes < bsize) __cbc_decrypt()
225 return nbytes; __cbc_decrypt()
229 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
235 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
239 while ((nbytes = walk.nbytes)) { cbc_decrypt()
240 fpu_enabled = cast5_fpu_begin(fpu_enabled, nbytes); cbc_decrypt()
241 nbytes = __cbc_decrypt(desc, &walk); cbc_decrypt()
242 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_decrypt()
257 unsigned int nbytes = walk->nbytes; ctr_crypt_final() local
260 crypto_xor(keystream, src, nbytes); ctr_crypt_final()
261 memcpy(dst, keystream, nbytes); ctr_crypt_final()
271 unsigned int nbytes = walk->nbytes; __ctr_crypt() local
276 if (nbytes >= bsize * CAST5_PARALLEL_BLOCKS) { __ctr_crypt()
283 nbytes -= bsize * CAST5_PARALLEL_BLOCKS; __ctr_crypt()
284 } while (nbytes >= bsize * CAST5_PARALLEL_BLOCKS); __ctr_crypt()
286 if (nbytes < bsize) __ctr_crypt()
305 nbytes -= bsize; __ctr_crypt()
306 } while (nbytes >= bsize); __ctr_crypt()
309 return nbytes; __ctr_crypt()
313 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
319 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_crypt()
323 while ((nbytes = walk.nbytes) >= CAST5_BLOCK_SIZE) { ctr_crypt()
324 fpu_enabled = cast5_fpu_begin(fpu_enabled, nbytes); ctr_crypt()
325 nbytes = __ctr_crypt(desc, &walk); ctr_crypt()
326 err = blkcipher_walk_done(desc, &walk, nbytes); ctr_crypt()
331 if (walk.nbytes) { ctr_crypt()
114 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
123 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
156 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
228 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
312 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
H A Dblowfish_glue.c86 unsigned int nbytes; ecb_crypt() local
91 while ((nbytes = walk->nbytes)) { ecb_crypt()
96 if (nbytes >= bsize * 4) { ecb_crypt()
102 nbytes -= bsize * 4; ecb_crypt()
103 } while (nbytes >= bsize * 4); ecb_crypt()
105 if (nbytes < bsize) ecb_crypt()
115 nbytes -= bsize; ecb_crypt()
116 } while (nbytes >= bsize); ecb_crypt()
119 err = blkcipher_walk_done(desc, walk, nbytes); ecb_crypt()
126 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
130 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_encrypt()
135 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
139 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_decrypt()
148 unsigned int nbytes = walk->nbytes; __cbc_encrypt() local
160 nbytes -= bsize; __cbc_encrypt()
161 } while (nbytes >= bsize); __cbc_encrypt()
164 return nbytes; __cbc_encrypt()
168 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
173 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
176 while ((nbytes = walk.nbytes)) { cbc_encrypt()
177 nbytes = __cbc_encrypt(desc, &walk); cbc_encrypt()
178 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_encrypt()
189 unsigned int nbytes = walk->nbytes; __cbc_decrypt() local
196 src += nbytes / bsize - 1; __cbc_decrypt()
197 dst += nbytes / bsize - 1; __cbc_decrypt()
202 if (nbytes >= bsize * 4) { __cbc_decrypt()
204 nbytes -= bsize * 4 - bsize; __cbc_decrypt()
218 nbytes -= bsize; __cbc_decrypt()
219 if (nbytes < bsize) __cbc_decrypt()
225 } while (nbytes >= bsize * 4); __cbc_decrypt()
232 nbytes -= bsize; __cbc_decrypt()
233 if (nbytes < bsize) __cbc_decrypt()
245 return nbytes; __cbc_decrypt()
249 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
254 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
257 while ((nbytes = walk.nbytes)) { cbc_decrypt()
258 nbytes = __cbc_decrypt(desc, &walk); cbc_decrypt()
259 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_decrypt()
271 unsigned int nbytes = walk->nbytes; ctr_crypt_final() local
274 crypto_xor(keystream, src, nbytes); ctr_crypt_final()
275 memcpy(dst, keystream, nbytes); ctr_crypt_final()
285 unsigned int nbytes = walk->nbytes; __ctr_crypt() local
292 if (nbytes >= bsize * 4) { __ctr_crypt()
312 } while ((nbytes -= bsize * 4) >= bsize * 4); __ctr_crypt()
314 if (nbytes < bsize) __ctr_crypt()
329 } while ((nbytes -= bsize) >= bsize); __ctr_crypt()
333 return nbytes; __ctr_crypt()
337 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
342 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_crypt()
345 while ((nbytes = walk.nbytes) >= BF_BLOCK_SIZE) { ctr_crypt()
346 nbytes = __ctr_crypt(desc, &walk); ctr_crypt()
347 err = blkcipher_walk_done(desc, &walk, nbytes); ctr_crypt()
350 if (walk.nbytes) { ctr_crypt()
125 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
134 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
167 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
248 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
336 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
H A Ddes3_ede_glue.c90 unsigned int nbytes; ecb_crypt() local
95 while ((nbytes = walk->nbytes)) { ecb_crypt()
100 if (nbytes >= bsize * 3) { ecb_crypt()
107 nbytes -= bsize * 3; ecb_crypt()
108 } while (nbytes >= bsize * 3); ecb_crypt()
110 if (nbytes < bsize) ecb_crypt()
120 nbytes -= bsize; ecb_crypt()
121 } while (nbytes >= bsize); ecb_crypt()
124 err = blkcipher_walk_done(desc, walk, nbytes); ecb_crypt()
131 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
136 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_encrypt()
141 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
146 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_decrypt()
155 unsigned int nbytes = walk->nbytes; __cbc_encrypt() local
167 nbytes -= bsize; __cbc_encrypt()
168 } while (nbytes >= bsize); __cbc_encrypt()
171 return nbytes; __cbc_encrypt()
175 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
180 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
183 while ((nbytes = walk.nbytes)) { cbc_encrypt()
184 nbytes = __cbc_encrypt(desc, &walk); cbc_encrypt()
185 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_encrypt()
196 unsigned int nbytes = walk->nbytes; __cbc_decrypt() local
203 src += nbytes / bsize - 1; __cbc_decrypt()
204 dst += nbytes / bsize - 1; __cbc_decrypt()
209 if (nbytes >= bsize * 3) { __cbc_decrypt()
211 nbytes -= bsize * 3 - bsize; __cbc_decrypt()
223 nbytes -= bsize; __cbc_decrypt()
224 if (nbytes < bsize) __cbc_decrypt()
230 } while (nbytes >= bsize * 3); __cbc_decrypt()
237 nbytes -= bsize; __cbc_decrypt()
238 if (nbytes < bsize) __cbc_decrypt()
250 return nbytes; __cbc_decrypt()
254 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
259 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
262 while ((nbytes = walk.nbytes)) { cbc_decrypt()
263 nbytes = __cbc_decrypt(desc, &walk); cbc_decrypt()
264 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_decrypt()
277 unsigned int nbytes = walk->nbytes; ctr_crypt_final() local
280 crypto_xor(keystream, src, nbytes); ctr_crypt_final()
281 memcpy(dst, keystream, nbytes); ctr_crypt_final()
291 unsigned int nbytes = walk->nbytes; __ctr_crypt() local
298 if (nbytes >= bsize * 3) { __ctr_crypt()
314 } while ((nbytes -= bsize * 3) >= bsize * 3); __ctr_crypt()
316 if (nbytes < bsize) __ctr_crypt()
330 } while ((nbytes -= bsize) >= bsize); __ctr_crypt()
334 return nbytes; __ctr_crypt()
338 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
343 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_crypt()
346 while ((nbytes = walk.nbytes) >= DES3_EDE_BLOCK_SIZE) { ctr_crypt()
347 nbytes = __ctr_crypt(desc, &walk); ctr_crypt()
348 err = blkcipher_walk_done(desc, &walk, nbytes); ctr_crypt()
351 if (walk.nbytes) { ctr_crypt()
130 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
140 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
174 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
253 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
337 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
H A Dcamellia_aesni_avx_glue.c159 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
161 return glue_ecb_crypt_128bit(&camellia_enc, desc, dst, src, nbytes); ecb_encrypt()
165 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
167 return glue_ecb_crypt_128bit(&camellia_dec, desc, dst, src, nbytes); ecb_decrypt()
171 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
174 dst, src, nbytes); cbc_encrypt()
178 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
181 nbytes); cbc_decrypt()
185 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
187 return glue_ctr_crypt_128bit(&camellia_ctr, desc, dst, src, nbytes); ctr_crypt()
190 static inline bool camellia_fpu_begin(bool fpu_enabled, unsigned int nbytes) camellia_fpu_begin() argument
194 nbytes); camellia_fpu_begin()
214 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
220 ctx->fpu_enabled = camellia_fpu_begin(ctx->fpu_enabled, nbytes); encrypt_callback()
222 if (nbytes >= CAMELLIA_AESNI_PARALLEL_BLOCKS * bsize) { encrypt_callback()
225 nbytes -= bsize * CAMELLIA_AESNI_PARALLEL_BLOCKS; encrypt_callback()
228 while (nbytes >= CAMELLIA_PARALLEL_BLOCKS * bsize) { encrypt_callback()
231 nbytes -= bsize * CAMELLIA_PARALLEL_BLOCKS; encrypt_callback()
234 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
238 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
244 ctx->fpu_enabled = camellia_fpu_begin(ctx->fpu_enabled, nbytes); decrypt_callback()
246 if (nbytes >= CAMELLIA_AESNI_PARALLEL_BLOCKS * bsize) { decrypt_callback()
249 nbytes -= bsize * CAMELLIA_AESNI_PARALLEL_BLOCKS; decrypt_callback()
252 while (nbytes >= CAMELLIA_PARALLEL_BLOCKS * bsize) { decrypt_callback()
255 nbytes -= bsize * CAMELLIA_PARALLEL_BLOCKS; decrypt_callback()
258 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
263 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
282 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
289 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
308 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
315 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
319 return glue_xts_crypt_128bit(&camellia_enc_xts, desc, dst, src, nbytes, xts_encrypt()
325 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
329 return glue_xts_crypt_128bit(&camellia_dec_xts, desc, dst, src, nbytes, xts_decrypt()
158 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
164 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
170 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
177 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
184 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
262 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
288 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
314 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
324 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dserpent_avx2_glue.c141 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
143 return glue_ecb_crypt_128bit(&serpent_enc, desc, dst, src, nbytes); ecb_encrypt()
147 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
149 return glue_ecb_crypt_128bit(&serpent_dec, desc, dst, src, nbytes); ecb_decrypt()
153 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
156 dst, src, nbytes); cbc_encrypt()
160 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
163 nbytes); cbc_decrypt()
167 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
169 return glue_ctr_crypt_128bit(&serpent_ctr, desc, dst, src, nbytes); ctr_crypt()
172 static inline bool serpent_fpu_begin(bool fpu_enabled, unsigned int nbytes) serpent_fpu_begin() argument
175 return glue_fpu_begin(SERPENT_BLOCK_SIZE, 8, NULL, fpu_enabled, nbytes); serpent_fpu_begin()
188 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
194 ctx->fpu_enabled = serpent_fpu_begin(ctx->fpu_enabled, nbytes); encrypt_callback()
196 if (nbytes >= SERPENT_AVX2_PARALLEL_BLOCKS * bsize) { encrypt_callback()
199 nbytes -= bsize * SERPENT_AVX2_PARALLEL_BLOCKS; encrypt_callback()
202 while (nbytes >= SERPENT_PARALLEL_BLOCKS * bsize) { encrypt_callback()
205 nbytes -= bsize * SERPENT_PARALLEL_BLOCKS; encrypt_callback()
208 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
212 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
218 ctx->fpu_enabled = serpent_fpu_begin(ctx->fpu_enabled, nbytes); decrypt_callback()
220 if (nbytes >= SERPENT_AVX2_PARALLEL_BLOCKS * bsize) { decrypt_callback()
223 nbytes -= bsize * SERPENT_AVX2_PARALLEL_BLOCKS; decrypt_callback()
226 while (nbytes >= SERPENT_PARALLEL_BLOCKS * bsize) { decrypt_callback()
229 nbytes -= bsize * SERPENT_PARALLEL_BLOCKS; decrypt_callback()
232 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
237 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
256 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
263 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
282 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
289 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
293 return glue_xts_crypt_128bit(&serpent_enc_xts, desc, dst, src, nbytes, xts_encrypt()
299 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
303 return glue_xts_crypt_128bit(&serpent_dec_xts, desc, dst, src, nbytes, xts_decrypt()
140 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
146 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
152 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
159 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
166 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
236 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
262 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
288 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
298 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dsalsa20_glue.c50 unsigned int nbytes) encrypt()
57 blkcipher_walk_init(&walk, dst, src, nbytes); encrypt()
62 if (likely(walk.nbytes == nbytes)) encrypt()
65 walk.dst.virt.addr, nbytes); encrypt()
69 while (walk.nbytes >= 64) { encrypt()
72 walk.nbytes - (walk.nbytes % 64)); encrypt()
73 err = blkcipher_walk_done(desc, &walk, walk.nbytes % 64); encrypt()
76 if (walk.nbytes) { encrypt()
78 walk.dst.virt.addr, walk.nbytes); encrypt()
48 encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) encrypt() argument
H A Dcamellia_aesni_avx2_glue.c155 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
157 return glue_ecb_crypt_128bit(&camellia_enc, desc, dst, src, nbytes); ecb_encrypt()
161 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
163 return glue_ecb_crypt_128bit(&camellia_dec, desc, dst, src, nbytes); ecb_decrypt()
167 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
170 dst, src, nbytes); cbc_encrypt()
174 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
177 nbytes); cbc_decrypt()
181 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
183 return glue_ctr_crypt_128bit(&camellia_ctr, desc, dst, src, nbytes); ctr_crypt()
186 static inline bool camellia_fpu_begin(bool fpu_enabled, unsigned int nbytes) camellia_fpu_begin() argument
190 nbytes); camellia_fpu_begin()
210 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
216 ctx->fpu_enabled = camellia_fpu_begin(ctx->fpu_enabled, nbytes); encrypt_callback()
218 if (nbytes >= CAMELLIA_AESNI_AVX2_PARALLEL_BLOCKS * bsize) { encrypt_callback()
221 nbytes -= bsize * CAMELLIA_AESNI_AVX2_PARALLEL_BLOCKS; encrypt_callback()
224 if (nbytes >= CAMELLIA_AESNI_PARALLEL_BLOCKS * bsize) { encrypt_callback()
227 nbytes -= bsize * CAMELLIA_AESNI_PARALLEL_BLOCKS; encrypt_callback()
230 while (nbytes >= CAMELLIA_PARALLEL_BLOCKS * bsize) { encrypt_callback()
233 nbytes -= bsize * CAMELLIA_PARALLEL_BLOCKS; encrypt_callback()
236 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
240 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
246 ctx->fpu_enabled = camellia_fpu_begin(ctx->fpu_enabled, nbytes); decrypt_callback()
248 if (nbytes >= CAMELLIA_AESNI_AVX2_PARALLEL_BLOCKS * bsize) { decrypt_callback()
251 nbytes -= bsize * CAMELLIA_AESNI_AVX2_PARALLEL_BLOCKS; decrypt_callback()
254 if (nbytes >= CAMELLIA_AESNI_PARALLEL_BLOCKS * bsize) { decrypt_callback()
257 nbytes -= bsize * CAMELLIA_AESNI_PARALLEL_BLOCKS; decrypt_callback()
260 while (nbytes >= CAMELLIA_PARALLEL_BLOCKS * bsize) { decrypt_callback()
263 nbytes -= bsize * CAMELLIA_PARALLEL_BLOCKS; decrypt_callback()
266 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
271 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
290 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
297 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
316 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
323 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
327 return glue_xts_crypt_128bit(&camellia_enc_xts, desc, dst, src, nbytes, xts_encrypt()
333 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
337 return glue_xts_crypt_128bit(&camellia_dec_xts, desc, dst, src, nbytes, xts_decrypt()
154 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
160 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
166 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
173 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
180 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
270 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
296 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
322 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
332 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dtwofish_glue_3way.c155 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
157 return glue_ecb_crypt_128bit(&twofish_enc, desc, dst, src, nbytes); ecb_encrypt()
161 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
163 return glue_ecb_crypt_128bit(&twofish_dec, desc, dst, src, nbytes); ecb_decrypt()
167 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
170 dst, src, nbytes); cbc_encrypt()
174 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
177 nbytes); cbc_decrypt()
181 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
183 return glue_ctr_crypt_128bit(&twofish_ctr, desc, dst, src, nbytes); ctr_crypt()
186 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
192 if (nbytes == 3 * bsize) { encrypt_callback()
197 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
201 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
207 if (nbytes == 3 * bsize) { decrypt_callback()
212 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
232 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
245 return lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
249 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
262 return lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
300 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
314 return xts_crypt(desc, dst, src, nbytes, &req); xts_encrypt()
318 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
332 return xts_crypt(desc, dst, src, nbytes, &req); xts_decrypt()
154 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
160 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
166 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
173 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
180 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
231 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
248 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
299 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
317 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dtwofish_avx_glue.c176 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
178 return glue_ecb_crypt_128bit(&twofish_enc, desc, dst, src, nbytes); ecb_encrypt()
182 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
184 return glue_ecb_crypt_128bit(&twofish_dec, desc, dst, src, nbytes); ecb_decrypt()
188 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
191 dst, src, nbytes); cbc_encrypt()
195 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
198 nbytes); cbc_decrypt()
202 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
204 return glue_ctr_crypt_128bit(&twofish_ctr, desc, dst, src, nbytes); ctr_crypt()
207 static inline bool twofish_fpu_begin(bool fpu_enabled, unsigned int nbytes) twofish_fpu_begin() argument
210 fpu_enabled, nbytes); twofish_fpu_begin()
223 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
229 ctx->fpu_enabled = twofish_fpu_begin(ctx->fpu_enabled, nbytes); encrypt_callback()
231 if (nbytes == bsize * TWOFISH_PARALLEL_BLOCKS) { encrypt_callback()
236 for (i = 0; i < nbytes / (bsize * 3); i++, srcdst += bsize * 3) encrypt_callback()
239 nbytes %= bsize * 3; encrypt_callback()
241 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
245 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
251 ctx->fpu_enabled = twofish_fpu_begin(ctx->fpu_enabled, nbytes); decrypt_callback()
253 if (nbytes == bsize * TWOFISH_PARALLEL_BLOCKS) { decrypt_callback()
258 for (i = 0; i < nbytes / (bsize * 3); i++, srcdst += bsize * 3) decrypt_callback()
261 nbytes %= bsize * 3; decrypt_callback()
263 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
268 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
287 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
294 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
313 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
320 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
324 return glue_xts_crypt_128bit(&twofish_enc_xts, desc, dst, src, nbytes, xts_encrypt()
330 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
334 return glue_xts_crypt_128bit(&twofish_dec_xts, desc, dst, src, nbytes, xts_decrypt()
175 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
181 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
187 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
194 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
201 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
267 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
293 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
319 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
329 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dcast6_avx_glue.c162 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
164 return glue_ecb_crypt_128bit(&cast6_enc, desc, dst, src, nbytes); ecb_encrypt()
168 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
170 return glue_ecb_crypt_128bit(&cast6_dec, desc, dst, src, nbytes); ecb_decrypt()
174 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
177 dst, src, nbytes); cbc_encrypt()
181 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
184 nbytes); cbc_decrypt()
188 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
190 return glue_ctr_crypt_128bit(&cast6_ctr, desc, dst, src, nbytes); ctr_crypt()
193 static inline bool cast6_fpu_begin(bool fpu_enabled, unsigned int nbytes) cast6_fpu_begin() argument
196 NULL, fpu_enabled, nbytes); cast6_fpu_begin()
209 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
215 ctx->fpu_enabled = cast6_fpu_begin(ctx->fpu_enabled, nbytes); encrypt_callback()
217 if (nbytes == bsize * CAST6_PARALLEL_BLOCKS) { encrypt_callback()
222 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
226 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
232 ctx->fpu_enabled = cast6_fpu_begin(ctx->fpu_enabled, nbytes); decrypt_callback()
234 if (nbytes == bsize * CAST6_PARALLEL_BLOCKS) { decrypt_callback()
239 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
263 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
282 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
289 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
308 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
352 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
356 return glue_xts_crypt_128bit(&cast6_enc_xts, desc, dst, src, nbytes, xts_encrypt()
362 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
366 return glue_xts_crypt_128bit(&cast6_dec_xts, desc, dst, src, nbytes, xts_decrypt()
161 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
167 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
173 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
180 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
187 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
262 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
288 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
351 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
361 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dserpent_avx_glue.c175 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
177 return glue_ecb_crypt_128bit(&serpent_enc, desc, dst, src, nbytes); ecb_encrypt()
181 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
183 return glue_ecb_crypt_128bit(&serpent_dec, desc, dst, src, nbytes); ecb_decrypt()
187 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
190 dst, src, nbytes); cbc_encrypt()
194 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
197 nbytes); cbc_decrypt()
201 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
203 return glue_ctr_crypt_128bit(&serpent_ctr, desc, dst, src, nbytes); ctr_crypt()
206 static inline bool serpent_fpu_begin(bool fpu_enabled, unsigned int nbytes) serpent_fpu_begin() argument
209 NULL, fpu_enabled, nbytes); serpent_fpu_begin()
222 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
228 ctx->fpu_enabled = serpent_fpu_begin(ctx->fpu_enabled, nbytes); encrypt_callback()
230 if (nbytes == bsize * SERPENT_PARALLEL_BLOCKS) { encrypt_callback()
235 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
239 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
245 ctx->fpu_enabled = serpent_fpu_begin(ctx->fpu_enabled, nbytes); decrypt_callback()
247 if (nbytes == bsize * SERPENT_PARALLEL_BLOCKS) { decrypt_callback()
252 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
273 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
292 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
299 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
318 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
358 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
362 return glue_xts_crypt_128bit(&serpent_enc_xts, desc, dst, src, nbytes, xts_encrypt()
368 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
372 return glue_xts_crypt_128bit(&serpent_dec_xts, desc, dst, src, nbytes, xts_decrypt()
174 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
180 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
186 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
193 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
200 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
272 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
298 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
357 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
367 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dserpent_sse2_glue.c143 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
145 return glue_ecb_crypt_128bit(&serpent_enc, desc, dst, src, nbytes); ecb_encrypt()
149 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
151 return glue_ecb_crypt_128bit(&serpent_dec, desc, dst, src, nbytes); ecb_decrypt()
155 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
158 dst, src, nbytes); cbc_encrypt()
162 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
165 nbytes); cbc_decrypt()
169 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
171 return glue_ctr_crypt_128bit(&serpent_ctr, desc, dst, src, nbytes); ctr_crypt()
174 static inline bool serpent_fpu_begin(bool fpu_enabled, unsigned int nbytes) serpent_fpu_begin() argument
177 NULL, fpu_enabled, nbytes); serpent_fpu_begin()
190 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
196 ctx->fpu_enabled = serpent_fpu_begin(ctx->fpu_enabled, nbytes); encrypt_callback()
198 if (nbytes == bsize * SERPENT_PARALLEL_BLOCKS) { encrypt_callback()
203 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
207 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
213 ctx->fpu_enabled = serpent_fpu_begin(ctx->fpu_enabled, nbytes); decrypt_callback()
215 if (nbytes == bsize * SERPENT_PARALLEL_BLOCKS) { decrypt_callback()
220 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
245 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
264 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
271 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
290 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
333 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
353 ret = xts_crypt(desc, dst, src, nbytes, &req); xts_encrypt()
360 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
380 ret = xts_crypt(desc, dst, src, nbytes, &req); xts_decrypt()
142 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
148 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
154 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
161 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
168 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
244 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
270 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
332 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
359 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Daesni-intel_glue.c375 unsigned int nbytes) ecb_encrypt()
381 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_encrypt()
386 while ((nbytes = walk.nbytes)) { ecb_encrypt()
388 nbytes & AES_BLOCK_MASK); ecb_encrypt()
389 nbytes &= AES_BLOCK_SIZE - 1; ecb_encrypt()
390 err = blkcipher_walk_done(desc, &walk, nbytes); ecb_encrypt()
399 unsigned int nbytes) ecb_decrypt()
405 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_decrypt()
410 while ((nbytes = walk.nbytes)) { ecb_decrypt()
412 nbytes & AES_BLOCK_MASK); ecb_decrypt()
413 nbytes &= AES_BLOCK_SIZE - 1; ecb_decrypt()
414 err = blkcipher_walk_done(desc, &walk, nbytes); ecb_decrypt()
423 unsigned int nbytes) cbc_encrypt()
429 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
434 while ((nbytes = walk.nbytes)) { cbc_encrypt()
436 nbytes & AES_BLOCK_MASK, walk.iv); cbc_encrypt()
437 nbytes &= AES_BLOCK_SIZE - 1; cbc_encrypt()
438 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_encrypt()
447 unsigned int nbytes) cbc_decrypt()
453 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
458 while ((nbytes = walk.nbytes)) { cbc_decrypt()
460 nbytes & AES_BLOCK_MASK, walk.iv); cbc_decrypt()
461 nbytes &= AES_BLOCK_SIZE - 1; cbc_decrypt()
462 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_decrypt()
477 unsigned int nbytes = walk->nbytes; ctr_crypt_final() local
480 crypto_xor(keystream, src, nbytes); ctr_crypt_final()
481 memcpy(dst, keystream, nbytes); ctr_crypt_final()
506 unsigned int nbytes) ctr_crypt()
512 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_crypt()
517 while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) { ctr_crypt()
519 nbytes & AES_BLOCK_MASK, walk.iv); ctr_crypt()
520 nbytes &= AES_BLOCK_SIZE - 1; ctr_crypt()
521 err = blkcipher_walk_done(desc, &walk, nbytes); ctr_crypt()
523 if (walk.nbytes) { ctr_crypt()
558 static void lrw_xts_encrypt_callback(void *ctx, u8 *blks, unsigned int nbytes) lrw_xts_encrypt_callback() argument
560 aesni_ecb_enc(ctx, blks, blks, nbytes); lrw_xts_encrypt_callback()
563 static void lrw_xts_decrypt_callback(void *ctx, u8 *blks, unsigned int nbytes) lrw_xts_decrypt_callback() argument
565 aesni_ecb_dec(ctx, blks, blks, nbytes); lrw_xts_decrypt_callback()
590 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
607 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
614 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
631 ret = lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
717 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
721 return glue_xts_crypt_128bit(&aesni_enc_xts, desc, dst, src, nbytes, xts_encrypt()
728 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
732 return glue_xts_crypt_128bit(&aesni_dec_xts, desc, dst, src, nbytes, xts_decrypt()
741 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
759 ret = xts_crypt(desc, dst, src, nbytes, &req); xts_encrypt()
766 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
784 ret = xts_crypt(desc, dst, src, nbytes, &req); xts_decrypt()
373 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
397 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
421 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
445 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
504 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
589 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
613 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
716 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
727 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
740 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
765 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Dfpu.c45 unsigned int nbytes) crypto_fpu_encrypt()
57 err = crypto_blkcipher_crt(desc.tfm)->encrypt(&desc, dst, src, nbytes); crypto_fpu_encrypt()
64 unsigned int nbytes) crypto_fpu_decrypt()
76 err = crypto_blkcipher_crt(desc.tfm)->decrypt(&desc, dst, src, nbytes); crypto_fpu_decrypt()
43 crypto_fpu_encrypt(struct blkcipher_desc *desc_in, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_fpu_encrypt() argument
62 crypto_fpu_decrypt(struct blkcipher_desc *desc_in, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_fpu_decrypt() argument
H A Dcamellia_glue.c1377 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
1379 return glue_ecb_crypt_128bit(&camellia_enc, desc, dst, src, nbytes); ecb_encrypt()
1383 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
1385 return glue_ecb_crypt_128bit(&camellia_dec, desc, dst, src, nbytes); ecb_decrypt()
1389 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
1392 dst, src, nbytes); cbc_encrypt()
1396 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
1399 nbytes); cbc_decrypt()
1403 struct scatterlist *src, unsigned int nbytes) ctr_crypt()
1405 return glue_ctr_crypt_128bit(&camellia_ctr, desc, dst, src, nbytes); ctr_crypt()
1408 static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) encrypt_callback() argument
1414 while (nbytes >= 2 * bsize) { encrypt_callback()
1417 nbytes -= bsize * 2; encrypt_callback()
1420 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) encrypt_callback()
1424 static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes) decrypt_callback() argument
1430 while (nbytes >= 2 * bsize) { decrypt_callback()
1433 nbytes -= bsize * 2; decrypt_callback()
1436 for (i = 0; i < nbytes / bsize; i++, srcdst += bsize) decrypt_callback()
1458 struct scatterlist *src, unsigned int nbytes) lrw_encrypt()
1471 return lrw_crypt(desc, dst, src, nbytes, &req); lrw_encrypt()
1475 struct scatterlist *src, unsigned int nbytes) lrw_decrypt()
1488 return lrw_crypt(desc, dst, src, nbytes, &req); lrw_decrypt()
1526 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
1540 return xts_crypt(desc, dst, src, nbytes, &req); xts_encrypt()
1544 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
1558 return xts_crypt(desc, dst, src, nbytes, &req); xts_decrypt()
1376 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
1382 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
1388 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
1395 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
1402 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
1457 lrw_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_encrypt() argument
1474 lrw_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) lrw_decrypt() argument
1525 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
1543 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
/linux-4.1.27/drivers/staging/unisys/visorutil/
H A Dmemregion_direct.c30 ulong nbytes; member in struct:memregion
40 visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) visor_memregion_create() argument
50 memregion->nbytes = nbytes; visor_memregion_create()
68 ulong nbytes) visor_memregion_create_overlapped()
78 if ((offset >= parent->nbytes) || visor_memregion_create_overlapped()
79 ((offset + nbytes) >= parent->nbytes)) visor_memregion_create_overlapped()
87 memregion->nbytes = nbytes; visor_memregion_create_overlapped()
99 ulong nbytes = memregion->nbytes; mapit() local
102 if (request_mem_region(physaddr, nbytes, MYDRVNAME)) mapit()
104 memregion->mapped = ioremap_cache(physaddr, nbytes); mapit()
119 memregion->nbytes); unmapit()
134 return memregion->nbytes; visor_memregion_get_nbytes()
148 if (newsize == memregion->nbytes) visor_memregion_resize()
154 memregion->nbytes = newsize; visor_memregion_resize()
157 memregion->nbytes = newsize; visor_memregion_resize()
168 void *local, ulong nbytes) memregion_readwrite()
170 if (offset + nbytes > memregion->nbytes) memregion_readwrite()
174 memcpy_toio(memregion->mapped + offset, local, nbytes); memregion_readwrite()
176 memcpy_fromio(local, memregion->mapped + offset, nbytes); memregion_readwrite()
183 ulong nbytes) visor_memregion_read()
185 return memregion_readwrite(FALSE, memregion, offset, dest, nbytes); visor_memregion_read()
191 ulong nbytes) visor_memregion_write()
193 return memregion_readwrite(TRUE, memregion, offset, src, nbytes); visor_memregion_write()
67 visor_memregion_create_overlapped(struct memregion *parent, ulong offset, ulong nbytes) visor_memregion_create_overlapped() argument
166 memregion_readwrite(BOOL is_write, struct memregion *memregion, ulong offset, void *local, ulong nbytes) memregion_readwrite() argument
182 visor_memregion_read(struct memregion *memregion, ulong offset, void *dest, ulong nbytes) visor_memregion_read() argument
190 visor_memregion_write(struct memregion *memregion, ulong offset, void *src, ulong nbytes) visor_memregion_write() argument
H A Dmemregion.h28 struct memregion *visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes);
30 ulong offset, ulong nbytes);
33 ulong offset, void *dest, ulong nbytes);
35 ulong offset, void *src, ulong nbytes);
/linux-4.1.27/arch/powerpc/crypto/
H A Daes-spe-glue.c180 struct scatterlist *src, unsigned int nbytes) ppc_ecb_encrypt()
188 blkcipher_walk_init(&walk, dst, src, nbytes); ppc_ecb_encrypt()
191 while ((nbytes = walk.nbytes)) { ppc_ecb_encrypt()
192 ubytes = nbytes > MAX_BYTES ? ppc_ecb_encrypt()
193 nbytes - MAX_BYTES : nbytes & (AES_BLOCK_SIZE - 1); ppc_ecb_encrypt()
194 nbytes -= ubytes; ppc_ecb_encrypt()
198 ctx->key_enc, ctx->rounds, nbytes); ppc_ecb_encrypt()
208 struct scatterlist *src, unsigned int nbytes) ppc_ecb_decrypt()
216 blkcipher_walk_init(&walk, dst, src, nbytes); ppc_ecb_decrypt()
219 while ((nbytes = walk.nbytes)) { ppc_ecb_decrypt()
220 ubytes = nbytes > MAX_BYTES ? ppc_ecb_decrypt()
221 nbytes - MAX_BYTES : nbytes & (AES_BLOCK_SIZE - 1); ppc_ecb_decrypt()
222 nbytes -= ubytes; ppc_ecb_decrypt()
226 ctx->key_dec, ctx->rounds, nbytes); ppc_ecb_decrypt()
236 struct scatterlist *src, unsigned int nbytes) ppc_cbc_encrypt()
244 blkcipher_walk_init(&walk, dst, src, nbytes); ppc_cbc_encrypt()
247 while ((nbytes = walk.nbytes)) { ppc_cbc_encrypt()
248 ubytes = nbytes > MAX_BYTES ? ppc_cbc_encrypt()
249 nbytes - MAX_BYTES : nbytes & (AES_BLOCK_SIZE - 1); ppc_cbc_encrypt()
250 nbytes -= ubytes; ppc_cbc_encrypt()
254 ctx->key_enc, ctx->rounds, nbytes, walk.iv); ppc_cbc_encrypt()
264 struct scatterlist *src, unsigned int nbytes) ppc_cbc_decrypt()
272 blkcipher_walk_init(&walk, dst, src, nbytes); ppc_cbc_decrypt()
275 while ((nbytes = walk.nbytes)) { ppc_cbc_decrypt()
276 ubytes = nbytes > MAX_BYTES ? ppc_cbc_decrypt()
277 nbytes - MAX_BYTES : nbytes & (AES_BLOCK_SIZE - 1); ppc_cbc_decrypt()
278 nbytes -= ubytes; ppc_cbc_decrypt()
282 ctx->key_dec, ctx->rounds, nbytes, walk.iv); ppc_cbc_decrypt()
292 struct scatterlist *src, unsigned int nbytes) ppc_ctr_crypt()
300 blkcipher_walk_init(&walk, dst, src, nbytes); ppc_ctr_crypt()
303 while ((pbytes = walk.nbytes)) { ppc_ctr_crypt()
305 pbytes = pbytes == nbytes ? ppc_ctr_crypt()
306 nbytes : pbytes & ~(AES_BLOCK_SIZE - 1); ppc_ctr_crypt()
307 ubytes = walk.nbytes - pbytes; ppc_ctr_crypt()
314 nbytes -= pbytes; ppc_ctr_crypt()
322 struct scatterlist *src, unsigned int nbytes) ppc_xts_encrypt()
331 blkcipher_walk_init(&walk, dst, src, nbytes); ppc_xts_encrypt()
335 while ((nbytes = walk.nbytes)) { ppc_xts_encrypt()
336 ubytes = nbytes > MAX_BYTES ? ppc_xts_encrypt()
337 nbytes - MAX_BYTES : nbytes & (AES_BLOCK_SIZE - 1); ppc_xts_encrypt()
338 nbytes -= ubytes; ppc_xts_encrypt()
342 ctx->key_enc, ctx->rounds, nbytes, walk.iv, twk); ppc_xts_encrypt()
353 struct scatterlist *src, unsigned int nbytes) ppc_xts_decrypt()
362 blkcipher_walk_init(&walk, dst, src, nbytes); ppc_xts_decrypt()
366 while ((nbytes = walk.nbytes)) { ppc_xts_decrypt()
367 ubytes = nbytes > MAX_BYTES ? ppc_xts_decrypt()
368 nbytes - MAX_BYTES : nbytes & (AES_BLOCK_SIZE - 1); ppc_xts_decrypt()
369 nbytes -= ubytes; ppc_xts_decrypt()
373 ctx->key_dec, ctx->rounds, nbytes, walk.iv, twk); ppc_xts_decrypt()
179 ppc_ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ppc_ecb_encrypt() argument
207 ppc_ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ppc_ecb_decrypt() argument
235 ppc_cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ppc_cbc_encrypt() argument
263 ppc_cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ppc_cbc_decrypt() argument
291 ppc_ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ppc_ctr_crypt() argument
321 ppc_xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ppc_xts_encrypt() argument
352 ppc_xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ppc_xts_decrypt() argument
/linux-4.1.27/lib/mpi/
H A Dmpicoder.c30 * @nbytes: The amount of data to read
32 MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes) mpi_read_raw_data() argument
40 while (nbytes > 0 && buffer[0] == 0) { mpi_read_raw_data()
42 nbytes--; mpi_read_raw_data()
45 nbits = nbytes * 8; mpi_read_raw_data()
50 if (nbytes > 0) mpi_read_raw_data()
55 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); mpi_read_raw_data()
63 if (nbytes > 0) { mpi_read_raw_data()
64 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; mpi_read_raw_data()
84 unsigned nbits, nbytes, nlimbs, nread = 0; mpi_read_from_buffer() local
99 nbytes = DIV_ROUND_UP(nbits, 8); mpi_read_from_buffer()
100 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); mpi_read_from_buffer()
104 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; mpi_read_from_buffer()
138 void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign) mpi_get_buffer() argument
147 *nbytes = n = a->nlimbs * BYTES_PER_MPI_LIMB; mpi_get_buffer()
177 for (p = buffer; !*p && *nbytes; p++, --*nbytes) mpi_get_buffer()
180 memmove(buffer, p, *nbytes); mpi_get_buffer()
189 int mpi_set_buffer(MPI a, const void *xbuffer, unsigned nbytes, int sign) mpi_set_buffer() argument
196 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); mpi_set_buffer()
201 for (i = 0, p = buffer + nbytes - 1; p >= buffer + BYTES_PER_MPI_LIMB;) { mpi_set_buffer()
/linux-4.1.27/crypto/
H A Dcbc.c49 unsigned int nbytes = walk->nbytes; crypto_cbc_encrypt_segment() local
61 } while ((nbytes -= bsize) >= bsize); crypto_cbc_encrypt_segment()
63 return nbytes; crypto_cbc_encrypt_segment()
73 unsigned int nbytes = walk->nbytes; crypto_cbc_encrypt_inplace() local
83 } while ((nbytes -= bsize) >= bsize); crypto_cbc_encrypt_inplace()
87 return nbytes; crypto_cbc_encrypt_inplace()
92 unsigned int nbytes) crypto_cbc_encrypt()
100 blkcipher_walk_init(&walk, dst, src, nbytes); crypto_cbc_encrypt()
103 while ((nbytes = walk.nbytes)) { crypto_cbc_encrypt()
105 nbytes = crypto_cbc_encrypt_inplace(desc, &walk, child); crypto_cbc_encrypt()
107 nbytes = crypto_cbc_encrypt_segment(desc, &walk, child); crypto_cbc_encrypt()
108 err = blkcipher_walk_done(desc, &walk, nbytes); crypto_cbc_encrypt()
121 unsigned int nbytes = walk->nbytes; crypto_cbc_decrypt_segment() local
133 } while ((nbytes -= bsize) >= bsize); crypto_cbc_decrypt_segment()
137 return nbytes; crypto_cbc_decrypt_segment()
147 unsigned int nbytes = walk->nbytes; crypto_cbc_decrypt_inplace() local
152 src += nbytes - (nbytes & (bsize - 1)) - bsize; crypto_cbc_decrypt_inplace()
157 if ((nbytes -= bsize) < bsize) crypto_cbc_decrypt_inplace()
166 return nbytes; crypto_cbc_decrypt_inplace()
171 unsigned int nbytes) crypto_cbc_decrypt()
179 blkcipher_walk_init(&walk, dst, src, nbytes); crypto_cbc_decrypt()
182 while ((nbytes = walk.nbytes)) { crypto_cbc_decrypt()
184 nbytes = crypto_cbc_decrypt_inplace(desc, &walk, child); crypto_cbc_decrypt()
186 nbytes = crypto_cbc_decrypt_segment(desc, &walk, child); crypto_cbc_decrypt()
187 err = blkcipher_walk_done(desc, &walk, nbytes); crypto_cbc_decrypt()
90 crypto_cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_cbc_encrypt() argument
169 crypto_cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_cbc_decrypt() argument
H A Dpcbc.c52 unsigned int nbytes = walk->nbytes; crypto_pcbc_encrypt_segment() local
65 } while ((nbytes -= bsize) >= bsize); crypto_pcbc_encrypt_segment()
67 return nbytes; crypto_pcbc_encrypt_segment()
77 unsigned int nbytes = walk->nbytes; crypto_pcbc_encrypt_inplace() local
90 } while ((nbytes -= bsize) >= bsize); crypto_pcbc_encrypt_inplace()
94 return nbytes; crypto_pcbc_encrypt_inplace()
99 unsigned int nbytes) crypto_pcbc_encrypt()
107 blkcipher_walk_init(&walk, dst, src, nbytes); crypto_pcbc_encrypt()
110 while ((nbytes = walk.nbytes)) { crypto_pcbc_encrypt()
112 nbytes = crypto_pcbc_encrypt_inplace(desc, &walk, crypto_pcbc_encrypt()
115 nbytes = crypto_pcbc_encrypt_segment(desc, &walk, crypto_pcbc_encrypt()
117 err = blkcipher_walk_done(desc, &walk, nbytes); crypto_pcbc_encrypt()
130 unsigned int nbytes = walk->nbytes; crypto_pcbc_decrypt_segment() local
143 } while ((nbytes -= bsize) >= bsize); crypto_pcbc_decrypt_segment()
147 return nbytes; crypto_pcbc_decrypt_segment()
157 unsigned int nbytes = walk->nbytes; crypto_pcbc_decrypt_inplace() local
170 } while ((nbytes -= bsize) >= bsize); crypto_pcbc_decrypt_inplace()
174 return nbytes; crypto_pcbc_decrypt_inplace()
179 unsigned int nbytes) crypto_pcbc_decrypt()
187 blkcipher_walk_init(&walk, dst, src, nbytes); crypto_pcbc_decrypt()
190 while ((nbytes = walk.nbytes)) { crypto_pcbc_decrypt()
192 nbytes = crypto_pcbc_decrypt_inplace(desc, &walk, crypto_pcbc_decrypt()
195 nbytes = crypto_pcbc_decrypt_segment(desc, &walk, crypto_pcbc_decrypt()
197 err = blkcipher_walk_done(desc, &walk, nbytes); crypto_pcbc_decrypt()
97 crypto_pcbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_pcbc_encrypt() argument
177 crypto_pcbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_pcbc_decrypt() argument
H A Dscatterwalk.c25 static inline void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) memcpy_dir() argument
30 memcpy(dst, src, nbytes); memcpy_dir()
77 size_t nbytes, int out) scatterwalk_copychunks()
83 if (len_this_page > nbytes) scatterwalk_copychunks()
84 len_this_page = nbytes; scatterwalk_copychunks()
92 if (nbytes == len_this_page) scatterwalk_copychunks()
96 nbytes -= len_this_page; scatterwalk_copychunks()
104 unsigned int start, unsigned int nbytes, int out) scatterwalk_map_and_copy()
109 if (!nbytes) scatterwalk_map_and_copy()
123 scatterwalk_copychunks(buf, &walk, nbytes, out); scatterwalk_map_and_copy()
76 scatterwalk_copychunks(void *buf, struct scatter_walk *walk, size_t nbytes, int out) scatterwalk_copychunks() argument
103 scatterwalk_map_and_copy(void *buf, struct scatterlist *sg, unsigned int start, unsigned int nbytes, int out) scatterwalk_map_and_copy() argument
H A Dxts.c109 if (!w->nbytes) crypt()
113 avail = w->nbytes; crypt()
135 if (!w->nbytes) crypt()
138 avail = w->nbytes; crypt()
148 struct scatterlist *src, unsigned int nbytes) encrypt()
153 blkcipher_walk_init(&w, dst, src, nbytes); encrypt()
159 struct scatterlist *src, unsigned int nbytes) decrypt()
164 blkcipher_walk_init(&w, dst, src, nbytes); decrypt()
170 struct scatterlist *ssrc, unsigned int nbytes, xts_crypt()
183 blkcipher_walk_init(&walk, sdst, ssrc, nbytes); xts_crypt()
186 nbytes = walk.nbytes; xts_crypt()
187 if (!nbytes) xts_crypt()
190 nblocks = min(nbytes / bsize, max_blks); xts_crypt()
221 nbytes -= nblocks * bsize; xts_crypt()
222 nblocks = min(nbytes / bsize, max_blks); xts_crypt()
227 err = blkcipher_walk_done(desc, &walk, nbytes); xts_crypt()
228 nbytes = walk.nbytes; xts_crypt()
229 if (!nbytes) xts_crypt()
232 nblocks = min(nbytes / bsize, max_blks); xts_crypt()
147 encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) encrypt() argument
158 decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) decrypt() argument
169 xts_crypt(struct blkcipher_desc *desc, struct scatterlist *sdst, struct scatterlist *ssrc, unsigned int nbytes, struct xts_crypt_req *req) xts_crypt() argument
H A Dlrw.c154 if (!(avail = w->nbytes)) crypt()
185 if (!(avail = w->nbytes)) crypt()
196 struct scatterlist *src, unsigned int nbytes) encrypt()
201 blkcipher_walk_init(&w, dst, src, nbytes); encrypt()
207 struct scatterlist *src, unsigned int nbytes) decrypt()
212 blkcipher_walk_init(&w, dst, src, nbytes); decrypt()
218 struct scatterlist *ssrc, unsigned int nbytes, lrw_crypt()
232 blkcipher_walk_init(&walk, sdst, ssrc, nbytes); lrw_crypt()
235 nbytes = walk.nbytes; lrw_crypt()
236 if (!nbytes) lrw_crypt()
239 nblocks = min(walk.nbytes / bsize, max_blks); lrw_crypt()
278 nbytes -= nblocks * bsize; lrw_crypt()
279 nblocks = min(nbytes / bsize, max_blks); lrw_crypt()
282 err = blkcipher_walk_done(desc, &walk, nbytes); lrw_crypt()
283 nbytes = walk.nbytes; lrw_crypt()
284 if (!nbytes) lrw_crypt()
287 nblocks = min(nbytes / bsize, max_blks); lrw_crypt()
195 encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) encrypt() argument
206 decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) decrypt() argument
217 lrw_crypt(struct blkcipher_desc *desc, struct scatterlist *sdst, struct scatterlist *ssrc, unsigned int nbytes, struct lrw_crypt_req *req) lrw_crypt() argument
H A Dsalsa20_generic.c179 unsigned int nbytes) encrypt()
186 blkcipher_walk_init(&walk, dst, src, nbytes); encrypt()
191 if (likely(walk.nbytes == nbytes)) encrypt()
194 walk.src.virt.addr, nbytes); encrypt()
198 while (walk.nbytes >= 64) { encrypt()
201 walk.nbytes - (walk.nbytes % 64)); encrypt()
202 err = blkcipher_walk_done(desc, &walk, walk.nbytes % 64); encrypt()
205 if (walk.nbytes) { encrypt()
207 walk.src.virt.addr, walk.nbytes); encrypt()
177 encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) encrypt() argument
H A Dctr.c65 unsigned int nbytes = walk->nbytes; crypto_ctr_crypt_final() local
68 crypto_xor(keystream, src, nbytes); crypto_ctr_crypt_final()
69 memcpy(dst, keystream, nbytes); crypto_ctr_crypt_final()
83 unsigned int nbytes = walk->nbytes; crypto_ctr_crypt_segment() local
95 } while ((nbytes -= bsize) >= bsize); crypto_ctr_crypt_segment()
97 return nbytes; crypto_ctr_crypt_segment()
107 unsigned int nbytes = walk->nbytes; crypto_ctr_crypt_inplace() local
122 } while ((nbytes -= bsize) >= bsize); crypto_ctr_crypt_inplace()
124 return nbytes; crypto_ctr_crypt_inplace()
129 unsigned int nbytes) crypto_ctr_crypt()
138 blkcipher_walk_init(&walk, dst, src, nbytes); crypto_ctr_crypt()
141 while (walk.nbytes >= bsize) { crypto_ctr_crypt()
143 nbytes = crypto_ctr_crypt_inplace(&walk, child); crypto_ctr_crypt()
145 nbytes = crypto_ctr_crypt_segment(&walk, child); crypto_ctr_crypt()
147 err = blkcipher_walk_done(desc, &walk, nbytes); crypto_ctr_crypt()
150 if (walk.nbytes) { crypto_ctr_crypt()
300 ablkcipher_request_set_crypt(subreq, req->src, req->dst, req->nbytes, crypto_rfc3686_crypt()
127 crypto_ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_ctr_crypt() argument
H A Decb.c47 unsigned int nbytes; crypto_ecb_crypt() local
52 while ((nbytes = walk->nbytes)) { crypto_ecb_crypt()
61 } while ((nbytes -= bsize) >= bsize); crypto_ecb_crypt()
63 err = blkcipher_walk_done(desc, walk, nbytes); crypto_ecb_crypt()
71 unsigned int nbytes) crypto_ecb_encrypt()
78 blkcipher_walk_init(&walk, dst, src, nbytes); crypto_ecb_encrypt()
85 unsigned int nbytes) crypto_ecb_decrypt()
92 blkcipher_walk_init(&walk, dst, src, nbytes); crypto_ecb_decrypt()
69 crypto_ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_ecb_encrypt() argument
83 crypto_ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_ecb_decrypt() argument
H A Dcts.c78 unsigned int nbytes) cts_cbc_encrypt()
84 int lastn = nbytes - bsize; cts_cbc_encrypt()
96 scatterwalk_map_and_copy(s, src, offset, nbytes, 0); cts_cbc_encrypt()
118 scatterwalk_map_and_copy(d, dst, offset, nbytes, 1); cts_cbc_encrypt()
127 unsigned int nbytes) crypto_cts_encrypt()
131 int tot_blocks = (nbytes + bsize - 1) / bsize; crypto_cts_encrypt()
142 } else if (nbytes <= bsize * 2) { crypto_cts_encrypt()
143 err = cts_cbc_encrypt(ctx, desc, dst, src, 0, nbytes); crypto_cts_encrypt()
152 nbytes - (cbc_blocks * bsize)); crypto_cts_encrypt()
164 unsigned int nbytes) cts_cbc_decrypt()
170 int lastn = nbytes - bsize; cts_cbc_decrypt()
181 scatterwalk_map_and_copy(s, src, offset, nbytes, 0); cts_cbc_decrypt()
214 scatterwalk_map_and_copy(d, dst, offset, nbytes, 1); cts_cbc_decrypt()
222 unsigned int nbytes) crypto_cts_decrypt()
226 int tot_blocks = (nbytes + bsize - 1) / bsize; crypto_cts_decrypt()
237 } else if (nbytes <= bsize * 2) { crypto_cts_decrypt()
238 err = cts_cbc_decrypt(ctx, desc, dst, src, 0, nbytes); crypto_cts_decrypt()
247 nbytes - (cbc_blocks * bsize)); crypto_cts_decrypt()
73 cts_cbc_encrypt(struct crypto_cts_ctx *ctx, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int offset, unsigned int nbytes) cts_cbc_encrypt() argument
125 crypto_cts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_cts_encrypt() argument
159 cts_cbc_decrypt(struct crypto_cts_ctx *ctx, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int offset, unsigned int nbytes) cts_cbc_decrypt() argument
220 crypto_cts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_cts_decrypt() argument
H A Dshash.c223 int nbytes; shash_ahash_update() local
225 for (nbytes = crypto_hash_walk_first(req, &walk); nbytes > 0; shash_ahash_update()
226 nbytes = crypto_hash_walk_done(&walk, nbytes)) shash_ahash_update()
227 nbytes = crypto_shash_update(desc, walk.data, nbytes); shash_ahash_update()
229 return nbytes; shash_ahash_update()
246 int nbytes; shash_ahash_finup() local
248 nbytes = crypto_hash_walk_first(req, &walk); shash_ahash_finup()
249 if (!nbytes) shash_ahash_finup()
253 nbytes = crypto_hash_walk_last(&walk) ? shash_ahash_finup()
254 crypto_shash_finup(desc, walk.data, nbytes, shash_ahash_finup()
256 crypto_shash_update(desc, walk.data, nbytes); shash_ahash_finup()
257 nbytes = crypto_hash_walk_done(&walk, nbytes); shash_ahash_finup()
258 } while (nbytes > 0); shash_ahash_finup()
260 return nbytes; shash_ahash_finup()
279 unsigned int nbytes = req->nbytes; shash_ahash_digest() local
282 if (nbytes < min(sg->length, ((unsigned int)(PAGE_SIZE)) - offset)) { shash_ahash_digest()
286 err = crypto_shash_digest(desc, data + offset, nbytes, shash_ahash_digest()
396 int nbytes; shash_compat_update() local
398 for (nbytes = crypto_hash_walk_first_compat(hdesc, &walk, sg, len); shash_compat_update()
399 nbytes > 0; nbytes = crypto_hash_walk_done(&walk, nbytes)) shash_compat_update()
400 nbytes = crypto_shash_update(desc, walk.data, nbytes); shash_compat_update()
402 return nbytes; shash_compat_update()
413 unsigned int nbytes, u8 *out) shash_compat_digest()
418 if (nbytes < min(sg->length, ((unsigned int)(PAGE_SIZE)) - offset)) { shash_compat_digest()
426 err = crypto_shash_digest(desc, data + offset, nbytes, out); shash_compat_digest()
436 err = shash_compat_update(hdesc, sg, nbytes); shash_compat_digest()
412 shash_compat_digest(struct hash_desc *hdesc, struct scatterlist *sg, unsigned int nbytes, u8 *out) shash_compat_digest() argument
H A Darc4.c96 struct scatterlist *src, unsigned int nbytes) ecb_arc4_crypt()
102 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_arc4_crypt()
106 while (walk.nbytes > 0) { ecb_arc4_crypt()
110 arc4_crypt(ctx, wdst, wsrc, walk.nbytes); ecb_arc4_crypt()
95 ecb_arc4_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_arc4_crypt() argument
H A Dcrypto_null.c75 struct scatterlist *src, unsigned int nbytes) skcipher_null_crypt()
80 blkcipher_walk_init(&walk, dst, src, nbytes); skcipher_null_crypt()
83 while (walk.nbytes) { skcipher_null_crypt()
86 walk.nbytes); skcipher_null_crypt()
73 skcipher_null_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) skcipher_null_crypt() argument
H A Dahash.c47 unsigned int nbytes = min(walk->entrylen, hash_walk_next() local
59 if (nbytes > unaligned) hash_walk_next()
60 nbytes = unaligned; hash_walk_next()
63 walk->entrylen -= nbytes; hash_walk_next()
64 return nbytes; hash_walk_next()
87 unsigned int nbytes = walk->entrylen; crypto_hash_walk_done() local
91 if (nbytes && walk->offset & alignmask && !err) { crypto_hash_walk_done()
95 nbytes = min(nbytes, crypto_hash_walk_done()
97 walk->entrylen -= nbytes; crypto_hash_walk_done()
99 return nbytes; crypto_hash_walk_done()
116 if (nbytes) { crypto_hash_walk_done()
134 walk->total = req->nbytes; crypto_hash_walk_first()
152 walk->total = req->nbytes; crypto_ahash_walk_first()
H A Dablkcipher.c112 unsigned int nbytes = 0; ablkcipher_walk_done() local
115 unsigned int n = walk->nbytes - err; ablkcipher_walk_done()
125 nbytes = walk->total - n; ablkcipher_walk_done()
129 scatterwalk_done(&walk->in, 0, nbytes); ablkcipher_walk_done()
130 scatterwalk_done(&walk->out, 1, nbytes); ablkcipher_walk_done()
133 walk->total = nbytes; ablkcipher_walk_done()
134 walk->nbytes = nbytes; ablkcipher_walk_done()
136 if (nbytes) { ablkcipher_walk_done()
180 walk->nbytes = bsize; ablkcipher_next_slow()
255 walk->nbytes = n; ablkcipher_walk_next()
280 walk->nbytes = walk->total; ablkcipher_walk_first()
H A Dblkcipher.c106 unsigned int nbytes = 0; blkcipher_walk_done() local
109 unsigned int n = walk->nbytes - err; blkcipher_walk_done()
119 nbytes = walk->total - n; blkcipher_walk_done()
123 scatterwalk_done(&walk->in, 0, nbytes); blkcipher_walk_done()
124 scatterwalk_done(&walk->out, 1, nbytes); blkcipher_walk_done()
127 walk->total = nbytes; blkcipher_walk_done()
128 walk->nbytes = nbytes; blkcipher_walk_done()
130 if (nbytes) { blkcipher_walk_done()
176 walk->nbytes = bsize; blkcipher_next_slow()
187 memcpy(tmp, walk->src.virt.addr, walk->nbytes); blkcipher_next_copy()
257 walk->nbytes = n; blkcipher_walk_next()
328 walk->nbytes = walk->total; blkcipher_walk_first()
429 return alg->encrypt(&desc, req->dst, req->src, req->nbytes); async_encrypt()
442 return alg->decrypt(&desc, req->dst, req->src, req->nbytes); async_decrypt()
H A Dablk_helper.c65 &desc, req->dst, req->src, req->nbytes); __ablk_encrypt()
109 &desc, req->dst, req->src, req->nbytes); ablk_decrypt()
H A Dhmac.c115 const u8 *data, unsigned int nbytes) hmac_update()
121 return crypto_shash_update(desc, data, nbytes); hmac_update()
140 unsigned int nbytes, u8 *out) hmac_finup()
151 return crypto_shash_finup(desc, data, nbytes, out) ?: hmac_finup()
114 hmac_update(struct shash_desc *pdesc, const u8 *data, unsigned int nbytes) hmac_update() argument
139 hmac_finup(struct shash_desc *pdesc, const u8 *data, unsigned int nbytes, u8 *out) hmac_finup() argument
H A Dansi_cprng.c188 static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx, get_prng_bytes() argument
192 unsigned int byte_count = (unsigned int)nbytes; get_prng_bytes()
208 if (nbytes < DEFAULT_BLK_SZ) get_prng_bytes()
226 memset(buf, 0, nbytes); get_prng_bytes()
253 memset(buf, 0, nbytes); get_prng_bytes()
H A Dchainiv.c62 req->creq.nbytes, req->creq.info); chainiv_givencrypt()
192 req->creq.nbytes, req->creq.info); async_chainiv_givencrypt()
/linux-4.1.27/drivers/pci/hotplug/
H A Drpadlpar_sysfs.c33 const char *buf, size_t nbytes) add_slot_store()
39 if (nbytes >= MAX_DRC_NAME_LEN) add_slot_store()
42 memcpy(drc_name, buf, nbytes); add_slot_store()
46 end = &drc_name[nbytes]; add_slot_store()
53 return nbytes; add_slot_store()
64 const char *buf, size_t nbytes) remove_slot_store()
70 if (nbytes >= MAX_DRC_NAME_LEN) remove_slot_store()
73 memcpy(drc_name, buf, nbytes); remove_slot_store()
77 end = &drc_name[nbytes]; remove_slot_store()
84 return nbytes; remove_slot_store()
32 add_slot_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t nbytes) add_slot_store() argument
62 remove_slot_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t nbytes) remove_slot_store() argument
H A Dcpqphp_sysfs.c175 size_t nbytes, loff_t *ppos) read()
178 return simple_read_from_buffer(buf, nbytes, ppos, dbg->data, dbg->size); read()
174 read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) read() argument
/linux-4.1.27/arch/s390/crypto/
H A Ddes_s390.c89 unsigned int nbytes; ecb_desall_crypt() local
91 while ((nbytes = walk->nbytes)) { ecb_desall_crypt()
93 unsigned int n = nbytes & ~(DES_BLOCK_SIZE - 1); ecb_desall_crypt()
101 nbytes &= DES_BLOCK_SIZE - 1; ecb_desall_crypt()
102 ret = blkcipher_walk_done(desc, walk, nbytes); ecb_desall_crypt()
113 unsigned int nbytes = walk->nbytes; cbc_desall_crypt() local
119 if (!nbytes) cbc_desall_crypt()
126 unsigned int n = nbytes & ~(DES_BLOCK_SIZE - 1); cbc_desall_crypt()
134 nbytes &= DES_BLOCK_SIZE - 1; cbc_desall_crypt()
135 ret = blkcipher_walk_done(desc, walk, nbytes); cbc_desall_crypt()
136 } while ((nbytes = walk->nbytes)); cbc_desall_crypt()
145 unsigned int nbytes) ecb_des_encrypt()
150 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_des_encrypt()
156 unsigned int nbytes) ecb_des_decrypt()
161 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_des_decrypt()
187 unsigned int nbytes) cbc_des_encrypt()
191 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_des_encrypt()
197 unsigned int nbytes) cbc_des_decrypt()
201 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_des_decrypt()
291 unsigned int nbytes) ecb_des3_encrypt()
296 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_des3_encrypt()
302 unsigned int nbytes) ecb_des3_decrypt()
307 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_des3_decrypt()
333 unsigned int nbytes) cbc_des3_encrypt()
337 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_des3_encrypt()
343 unsigned int nbytes) cbc_des3_decrypt()
347 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_des3_decrypt()
372 static unsigned int __ctrblk_init(u8 *ctrptr, unsigned int nbytes) __ctrblk_init() argument
377 n = (nbytes > PAGE_SIZE) ? PAGE_SIZE : nbytes & ~(DES_BLOCK_SIZE - 1); __ctrblk_init()
390 unsigned int n, nbytes; ctr_desall_crypt() local
394 if (!walk->nbytes) ctr_desall_crypt()
401 while ((nbytes = walk->nbytes) >= DES_BLOCK_SIZE) { ctr_desall_crypt()
404 while (nbytes >= DES_BLOCK_SIZE) { ctr_desall_crypt()
406 n = __ctrblk_init(ctrptr, nbytes); ctr_desall_crypt()
422 nbytes -= n; ctr_desall_crypt()
424 ret = blkcipher_walk_done(desc, walk, nbytes); ctr_desall_crypt()
427 if (nbytes) ctr_desall_crypt()
433 if (!nbytes) ctr_desall_crypt()
436 /* final block may be < DES_BLOCK_SIZE, copy only nbytes */ ctr_desall_crypt()
437 if (nbytes) { ctr_desall_crypt()
444 memcpy(out, buf, nbytes); ctr_desall_crypt()
454 unsigned int nbytes) ctr_des_encrypt()
459 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_des_encrypt()
465 unsigned int nbytes) ctr_des_decrypt()
470 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_des_decrypt()
497 unsigned int nbytes) ctr_des3_encrypt()
502 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_des3_encrypt()
508 unsigned int nbytes) ctr_des3_decrypt()
513 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_des3_decrypt()
143 ecb_des_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_des_encrypt() argument
154 ecb_des_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_des_decrypt() argument
185 cbc_des_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_des_encrypt() argument
195 cbc_des_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_des_decrypt() argument
289 ecb_des3_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_des3_encrypt() argument
300 ecb_des3_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_des3_decrypt() argument
331 cbc_des3_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_des3_encrypt() argument
341 cbc_des3_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_des3_decrypt() argument
452 ctr_des_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_des_encrypt() argument
463 ctr_des_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_des_decrypt() argument
495 ctr_des3_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_des3_encrypt() argument
506 ctr_des3_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_des3_decrypt() argument
H A Daes_s390.c253 unsigned int nbytes) fallback_blk_dec()
262 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); fallback_blk_dec()
270 unsigned int nbytes) fallback_blk_enc()
279 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); fallback_blk_enc()
319 unsigned int nbytes; ecb_aes_crypt() local
321 while ((nbytes = walk->nbytes)) { ecb_aes_crypt()
323 unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); ecb_aes_crypt()
331 nbytes &= AES_BLOCK_SIZE - 1; ecb_aes_crypt()
332 ret = blkcipher_walk_done(desc, walk, nbytes); ecb_aes_crypt()
340 unsigned int nbytes) ecb_aes_encrypt()
346 return fallback_blk_enc(desc, dst, src, nbytes); ecb_aes_encrypt()
348 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_aes_encrypt()
354 unsigned int nbytes) ecb_aes_decrypt()
360 return fallback_blk_dec(desc, dst, src, nbytes); ecb_aes_decrypt()
362 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_aes_decrypt()
449 unsigned int nbytes = walk->nbytes; cbc_aes_crypt() local
455 if (!nbytes) cbc_aes_crypt()
462 unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); cbc_aes_crypt()
470 nbytes &= AES_BLOCK_SIZE - 1; cbc_aes_crypt()
471 ret = blkcipher_walk_done(desc, walk, nbytes); cbc_aes_crypt()
472 } while ((nbytes = walk->nbytes)); cbc_aes_crypt()
481 unsigned int nbytes) cbc_aes_encrypt()
487 return fallback_blk_enc(desc, dst, src, nbytes); cbc_aes_encrypt()
489 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_aes_encrypt()
495 unsigned int nbytes) cbc_aes_decrypt()
501 return fallback_blk_dec(desc, dst, src, nbytes); cbc_aes_decrypt()
503 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_aes_decrypt()
552 unsigned int nbytes) xts_fallback_decrypt()
561 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); xts_fallback_decrypt()
569 unsigned int nbytes) xts_fallback_encrypt()
578 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); xts_fallback_encrypt()
622 unsigned int nbytes = walk->nbytes; xts_aes_crypt() local
631 if (!nbytes) xts_aes_crypt()
647 n = nbytes & ~(AES_BLOCK_SIZE - 1); xts_aes_crypt()
655 nbytes &= AES_BLOCK_SIZE - 1; xts_aes_crypt()
656 ret = blkcipher_walk_done(desc, walk, nbytes); xts_aes_crypt()
657 } while ((nbytes = walk->nbytes)); xts_aes_crypt()
664 unsigned int nbytes) xts_aes_encrypt()
670 return xts_fallback_encrypt(desc, dst, src, nbytes); xts_aes_encrypt()
672 blkcipher_walk_init(&walk, dst, src, nbytes); xts_aes_encrypt()
678 unsigned int nbytes) xts_aes_decrypt()
684 return xts_fallback_decrypt(desc, dst, src, nbytes); xts_aes_decrypt()
686 blkcipher_walk_init(&walk, dst, src, nbytes); xts_aes_decrypt()
763 static unsigned int __ctrblk_init(u8 *ctrptr, unsigned int nbytes) __ctrblk_init() argument
768 n = (nbytes > PAGE_SIZE) ? PAGE_SIZE : nbytes & ~(AES_BLOCK_SIZE - 1); __ctrblk_init()
781 unsigned int n, nbytes; ctr_aes_crypt() local
785 if (!walk->nbytes) ctr_aes_crypt()
792 while ((nbytes = walk->nbytes) >= AES_BLOCK_SIZE) { ctr_aes_crypt()
795 while (nbytes >= AES_BLOCK_SIZE) { ctr_aes_crypt()
797 n = __ctrblk_init(ctrptr, nbytes); ctr_aes_crypt()
813 nbytes -= n; ctr_aes_crypt()
815 ret = blkcipher_walk_done(desc, walk, nbytes); ctr_aes_crypt()
818 if (nbytes) ctr_aes_crypt()
824 if (!nbytes) ctr_aes_crypt()
828 * final block may be < AES_BLOCK_SIZE, copy only nbytes ctr_aes_crypt()
830 if (nbytes) { ctr_aes_crypt()
837 memcpy(out, buf, nbytes); ctr_aes_crypt()
848 unsigned int nbytes) ctr_aes_encrypt()
853 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_aes_encrypt()
859 unsigned int nbytes) ctr_aes_decrypt()
864 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_aes_decrypt()
251 fallback_blk_dec(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) fallback_blk_dec() argument
268 fallback_blk_enc(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) fallback_blk_enc() argument
338 ecb_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_aes_encrypt() argument
352 ecb_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_aes_decrypt() argument
479 cbc_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_aes_encrypt() argument
493 cbc_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_aes_decrypt() argument
550 xts_fallback_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_fallback_decrypt() argument
567 xts_fallback_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_fallback_encrypt() argument
662 xts_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_aes_encrypt() argument
676 xts_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_aes_decrypt() argument
846 ctr_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_aes_encrypt() argument
857 ctr_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_aes_decrypt() argument
H A Dprng.c113 static int generate_entropy(u8 *ebuf, size_t nbytes) generate_entropy() argument
124 while (nbytes) { generate_entropy()
132 n = (nbytes < sizeof(hash)) ? nbytes : sizeof(hash); generate_entropy()
148 nbytes -= n; generate_entropy()
175 static void prng_tdes_seed(int nbytes) prng_tdes_seed() argument
180 BUG_ON(nbytes > sizeof(buf)); prng_tdes_seed()
182 get_random_bytes(buf, nbytes); prng_tdes_seed()
185 while (nbytes >= 8) { prng_tdes_seed()
189 nbytes -= 8; prng_tdes_seed()
461 static int prng_sha512_generate(u8 *buf, size_t nbytes) prng_sha512_generate() argument
474 &prng_data->ppnows, buf, nbytes, prng_sha512_generate()
476 if (ret < 0 || ret != nbytes) { prng_sha512_generate()
483 if (!memcmp(prng_data->prev, buf, nbytes)) { prng_sha512_generate()
487 memcpy(prng_data->prev, buf, nbytes); prng_sha512_generate()
503 size_t nbytes, loff_t *ppos) prng_tdes_read()
511 while (nbytes) { prng_tdes_read()
533 chunk = min_t(int, nbytes, prng_chunk_size); prng_tdes_read()
570 nbytes -= chunk; prng_tdes_read()
583 size_t nbytes, loff_t *ppos) prng_sha512_read()
596 while (nbytes) { prng_sha512_read()
616 n = (nbytes < prng_data->rest) ? prng_sha512_read()
617 nbytes : prng_data->rest; prng_sha512_read()
627 if (nbytes < prng_chunk_size) { prng_sha512_read()
628 n = nbytes; prng_sha512_read()
640 nbytes -= n; prng_sha512_read()
502 prng_tdes_read(struct file *file, char __user *ubuf, size_t nbytes, loff_t *ppos) prng_tdes_read() argument
582 prng_sha512_read(struct file *file, char __user *ubuf, size_t nbytes, loff_t *ppos) prng_sha512_read() argument
/linux-4.1.27/arch/sparc/crypto/
H A Ddes_glue.c95 unsigned int nbytes, bool encrypt) __ecb_crypt()
101 blkcipher_walk_init(&walk, dst, src, nbytes); __ecb_crypt()
109 while ((nbytes = walk.nbytes)) { __ecb_crypt()
110 unsigned int block_len = nbytes & DES_BLOCK_MASK; __ecb_crypt()
117 nbytes &= DES_BLOCK_SIZE - 1; __ecb_crypt()
118 err = blkcipher_walk_done(desc, &walk, nbytes); __ecb_crypt()
126 unsigned int nbytes) ecb_encrypt()
128 return __ecb_crypt(desc, dst, src, nbytes, true); ecb_encrypt()
133 unsigned int nbytes) ecb_decrypt()
135 return __ecb_crypt(desc, dst, src, nbytes, false); ecb_decrypt()
143 unsigned int nbytes) cbc_encrypt()
149 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
154 while ((nbytes = walk.nbytes)) { cbc_encrypt()
155 unsigned int block_len = nbytes & DES_BLOCK_MASK; cbc_encrypt()
162 nbytes &= DES_BLOCK_SIZE - 1; cbc_encrypt()
163 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_encrypt()
174 unsigned int nbytes) cbc_decrypt()
180 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
185 while ((nbytes = walk.nbytes)) { cbc_decrypt()
186 unsigned int block_len = nbytes & DES_BLOCK_MASK; cbc_decrypt()
193 nbytes &= DES_BLOCK_SIZE - 1; cbc_decrypt()
194 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_decrypt()
263 unsigned int nbytes, bool encrypt) __ecb3_crypt()
270 blkcipher_walk_init(&walk, dst, src, nbytes); __ecb3_crypt()
279 while ((nbytes = walk.nbytes)) { __ecb3_crypt()
280 unsigned int block_len = nbytes & DES_BLOCK_MASK; __ecb3_crypt()
288 nbytes &= DES_BLOCK_SIZE - 1; __ecb3_crypt()
289 err = blkcipher_walk_done(desc, &walk, nbytes); __ecb3_crypt()
297 unsigned int nbytes) ecb3_encrypt()
299 return __ecb3_crypt(desc, dst, src, nbytes, true); ecb3_encrypt()
304 unsigned int nbytes) ecb3_decrypt()
306 return __ecb3_crypt(desc, dst, src, nbytes, false); ecb3_decrypt()
315 unsigned int nbytes) cbc3_encrypt()
322 blkcipher_walk_init(&walk, dst, src, nbytes); cbc3_encrypt()
328 while ((nbytes = walk.nbytes)) { cbc3_encrypt()
329 unsigned int block_len = nbytes & DES_BLOCK_MASK; cbc3_encrypt()
338 nbytes &= DES_BLOCK_SIZE - 1; cbc3_encrypt()
339 err = blkcipher_walk_done(desc, &walk, nbytes); cbc3_encrypt()
351 unsigned int nbytes) cbc3_decrypt()
358 blkcipher_walk_init(&walk, dst, src, nbytes); cbc3_decrypt()
364 while ((nbytes = walk.nbytes)) { cbc3_decrypt()
365 unsigned int block_len = nbytes & DES_BLOCK_MASK; cbc3_decrypt()
374 nbytes &= DES_BLOCK_SIZE - 1; cbc3_decrypt()
375 err = blkcipher_walk_done(desc, &walk, nbytes); cbc3_decrypt()
93 __ecb_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, bool encrypt) __ecb_crypt() argument
124 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
131 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
141 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
172 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
261 __ecb3_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, bool encrypt) __ecb3_crypt() argument
295 ecb3_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb3_encrypt() argument
302 ecb3_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb3_decrypt() argument
313 cbc3_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc3_encrypt() argument
349 cbc3_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc3_decrypt() argument
H A Dcamellia_glue.c87 unsigned int nbytes, bool encrypt) __ecb_crypt()
99 blkcipher_walk_init(&walk, dst, src, nbytes); __ecb_crypt()
108 while ((nbytes = walk.nbytes)) { __ecb_crypt()
109 unsigned int block_len = nbytes & CAMELLIA_BLOCK_MASK; __ecb_crypt()
119 nbytes &= CAMELLIA_BLOCK_SIZE - 1; __ecb_crypt()
120 err = blkcipher_walk_done(desc, &walk, nbytes); __ecb_crypt()
128 unsigned int nbytes) ecb_encrypt()
130 return __ecb_crypt(desc, dst, src, nbytes, true); ecb_encrypt()
135 unsigned int nbytes) ecb_decrypt()
137 return __ecb_crypt(desc, dst, src, nbytes, false); ecb_decrypt()
150 unsigned int nbytes) cbc_encrypt()
162 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
168 while ((nbytes = walk.nbytes)) { cbc_encrypt()
169 unsigned int block_len = nbytes & CAMELLIA_BLOCK_MASK; cbc_encrypt()
180 nbytes &= CAMELLIA_BLOCK_SIZE - 1; cbc_encrypt()
181 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_encrypt()
189 unsigned int nbytes) cbc_decrypt()
201 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
207 while ((nbytes = walk.nbytes)) { cbc_decrypt()
208 unsigned int block_len = nbytes & CAMELLIA_BLOCK_MASK; cbc_decrypt()
219 nbytes &= CAMELLIA_BLOCK_SIZE - 1; cbc_decrypt()
220 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_decrypt()
85 __ecb_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, bool encrypt) __ecb_crypt() argument
126 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
133 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
148 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
187 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
H A Daes_glue.c217 unsigned int nbytes) ecb_encrypt()
223 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_encrypt()
228 while ((nbytes = walk.nbytes)) { ecb_encrypt()
229 unsigned int block_len = nbytes & AES_BLOCK_MASK; ecb_encrypt()
237 nbytes &= AES_BLOCK_SIZE - 1; ecb_encrypt()
238 err = blkcipher_walk_done(desc, &walk, nbytes); ecb_encrypt()
246 unsigned int nbytes) ecb_decrypt()
253 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_decrypt()
259 while ((nbytes = walk.nbytes)) { ecb_decrypt()
260 unsigned int block_len = nbytes & AES_BLOCK_MASK; ecb_decrypt()
267 nbytes &= AES_BLOCK_SIZE - 1; ecb_decrypt()
268 err = blkcipher_walk_done(desc, &walk, nbytes); ecb_decrypt()
277 unsigned int nbytes) cbc_encrypt()
283 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
288 while ((nbytes = walk.nbytes)) { cbc_encrypt()
289 unsigned int block_len = nbytes & AES_BLOCK_MASK; cbc_encrypt()
297 nbytes &= AES_BLOCK_SIZE - 1; cbc_encrypt()
298 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_encrypt()
306 unsigned int nbytes) cbc_decrypt()
313 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
319 while ((nbytes = walk.nbytes)) { cbc_decrypt()
320 unsigned int block_len = nbytes & AES_BLOCK_MASK; cbc_decrypt()
328 nbytes &= AES_BLOCK_SIZE - 1; cbc_decrypt()
329 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_decrypt()
343 unsigned int nbytes = walk->nbytes; ctr_crypt_final() local
347 crypto_xor((u8 *) keystream, src, nbytes); ctr_crypt_final()
348 memcpy(dst, keystream, nbytes); ctr_crypt_final()
354 unsigned int nbytes) ctr_crypt()
360 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_crypt()
365 while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) { ctr_crypt()
366 unsigned int block_len = nbytes & AES_BLOCK_MASK; ctr_crypt()
374 nbytes &= AES_BLOCK_SIZE - 1; ctr_crypt()
375 err = blkcipher_walk_done(desc, &walk, nbytes); ctr_crypt()
377 if (walk.nbytes) { ctr_crypt()
215 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
244 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
275 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
304 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
352 ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_crypt() argument
/linux-4.1.27/arch/arm/crypto/
H A Daesbs-glue.c106 struct scatterlist *src, unsigned int nbytes) aesbs_cbc_encrypt()
112 blkcipher_walk_init(&walk, dst, src, nbytes); aesbs_cbc_encrypt()
115 while (walk.nbytes) { aesbs_cbc_encrypt()
116 u32 blocks = walk.nbytes / AES_BLOCK_SIZE; aesbs_cbc_encrypt()
140 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); aesbs_cbc_encrypt()
147 struct scatterlist *src, unsigned int nbytes) aesbs_cbc_decrypt()
153 blkcipher_walk_init(&walk, dst, src, nbytes); aesbs_cbc_decrypt()
156 while ((walk.nbytes / AES_BLOCK_SIZE) >= 8) { aesbs_cbc_decrypt()
159 walk.nbytes, &ctx->dec, walk.iv); aesbs_cbc_decrypt()
161 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); aesbs_cbc_decrypt()
163 while (walk.nbytes) { aesbs_cbc_decrypt()
164 u32 blocks = walk.nbytes / AES_BLOCK_SIZE; aesbs_cbc_decrypt()
185 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); aesbs_cbc_decrypt()
205 unsigned int nbytes) aesbs_ctr_encrypt()
212 blkcipher_walk_init(&walk, dst, src, nbytes); aesbs_ctr_encrypt()
215 while ((blocks = walk.nbytes / AES_BLOCK_SIZE)) { aesbs_ctr_encrypt()
216 u32 tail = walk.nbytes % AES_BLOCK_SIZE; aesbs_ctr_encrypt()
223 tail = walk.nbytes - blocks * AES_BLOCK_SIZE; aesbs_ctr_encrypt()
232 nbytes -= blocks * AES_BLOCK_SIZE; aesbs_ctr_encrypt()
233 if (nbytes && nbytes == tail && nbytes <= AES_BLOCK_SIZE) aesbs_ctr_encrypt()
238 if (walk.nbytes) { aesbs_ctr_encrypt()
245 memcpy(tdst, tsrc, nbytes); aesbs_ctr_encrypt()
246 crypto_xor(tdst, ks, nbytes); aesbs_ctr_encrypt()
254 struct scatterlist *src, unsigned int nbytes) aesbs_xts_encrypt()
260 blkcipher_walk_init(&walk, dst, src, nbytes); aesbs_xts_encrypt()
266 while (walk.nbytes) { aesbs_xts_encrypt()
269 walk.nbytes, &ctx->enc, walk.iv); aesbs_xts_encrypt()
271 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); aesbs_xts_encrypt()
278 struct scatterlist *src, unsigned int nbytes) aesbs_xts_decrypt()
284 blkcipher_walk_init(&walk, dst, src, nbytes); aesbs_xts_decrypt()
290 while (walk.nbytes) { aesbs_xts_decrypt()
293 walk.nbytes, &ctx->dec, walk.iv); aesbs_xts_decrypt()
295 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); aesbs_xts_decrypt()
104 aesbs_cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) aesbs_cbc_encrypt() argument
145 aesbs_cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) aesbs_cbc_decrypt() argument
203 aesbs_ctr_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) aesbs_ctr_encrypt() argument
252 aesbs_xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) aesbs_xts_encrypt() argument
276 aesbs_xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) aesbs_xts_decrypt() argument
H A Daes-ce-glue.c167 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
175 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_encrypt()
179 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { ecb_encrypt()
183 walk.nbytes % AES_BLOCK_SIZE); ecb_encrypt()
190 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
198 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_decrypt()
202 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { ecb_decrypt()
206 walk.nbytes % AES_BLOCK_SIZE); ecb_decrypt()
213 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
221 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
225 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { cbc_encrypt()
230 walk.nbytes % AES_BLOCK_SIZE); cbc_encrypt()
237 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
245 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
249 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { cbc_decrypt()
254 walk.nbytes % AES_BLOCK_SIZE); cbc_decrypt()
261 struct scatterlist *src, unsigned int nbytes) ctr_encrypt()
268 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_encrypt()
272 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { ctr_encrypt()
276 nbytes -= blocks * AES_BLOCK_SIZE; ctr_encrypt()
277 if (nbytes && nbytes == walk.nbytes % AES_BLOCK_SIZE) ctr_encrypt()
280 walk.nbytes % AES_BLOCK_SIZE); ctr_encrypt()
282 if (nbytes) { ctr_encrypt()
288 * Minimum alignment is 8 bytes, so if nbytes is <= 8, we need ctr_encrypt()
291 blocks = (nbytes <= 8) ? -1 : 1; ctr_encrypt()
295 memcpy(tdst, tail, nbytes); ctr_encrypt()
304 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
312 blkcipher_walk_init(&walk, dst, src, nbytes); xts_encrypt()
316 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { xts_encrypt()
321 walk.nbytes % AES_BLOCK_SIZE); xts_encrypt()
329 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
337 blkcipher_walk_init(&walk, dst, src, nbytes); xts_decrypt()
341 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { xts_decrypt()
346 walk.nbytes % AES_BLOCK_SIZE); xts_decrypt()
166 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
189 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
212 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
236 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
260 ctr_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_encrypt() argument
303 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
328 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
/linux-4.1.27/drivers/crypto/vmx/
H A Daes_cbc.c95 unsigned int nbytes) p8_aes_cbc_encrypt()
108 ret = crypto_blkcipher_encrypt(&fallback_desc, dst, src, nbytes); p8_aes_cbc_encrypt()
114 blkcipher_walk_init(&walk, dst, src, nbytes); p8_aes_cbc_encrypt()
116 while ((nbytes = walk.nbytes)) { p8_aes_cbc_encrypt()
118 nbytes & AES_BLOCK_MASK, &ctx->enc_key, walk.iv, 1); p8_aes_cbc_encrypt()
119 nbytes &= AES_BLOCK_SIZE - 1; p8_aes_cbc_encrypt()
120 ret = blkcipher_walk_done(desc, &walk, nbytes); p8_aes_cbc_encrypt()
131 unsigned int nbytes) p8_aes_cbc_decrypt()
144 ret = crypto_blkcipher_decrypt(&fallback_desc, dst, src, nbytes); p8_aes_cbc_decrypt()
150 blkcipher_walk_init(&walk, dst, src, nbytes); p8_aes_cbc_decrypt()
152 while ((nbytes = walk.nbytes)) { p8_aes_cbc_decrypt()
154 nbytes & AES_BLOCK_MASK, &ctx->dec_key, walk.iv, 0); p8_aes_cbc_decrypt()
155 nbytes &= AES_BLOCK_SIZE - 1; p8_aes_cbc_decrypt()
156 ret = blkcipher_walk_done(desc, &walk, nbytes); p8_aes_cbc_decrypt()
93 p8_aes_cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) p8_aes_cbc_encrypt() argument
129 p8_aes_cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) p8_aes_cbc_decrypt() argument
H A Daes_ctr.c97 unsigned int nbytes = walk->nbytes; p8_aes_ctr_final() local
105 crypto_xor(keystream, src, nbytes); p8_aes_ctr_final()
106 memcpy(dst, keystream, nbytes); p8_aes_ctr_final()
112 unsigned int nbytes) p8_aes_ctr_crypt()
125 ret = crypto_blkcipher_encrypt(&fallback_desc, dst, src, nbytes); p8_aes_ctr_crypt()
127 blkcipher_walk_init(&walk, dst, src, nbytes); p8_aes_ctr_crypt()
129 while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) { p8_aes_ctr_crypt()
134 (nbytes & AES_BLOCK_MASK)/AES_BLOCK_SIZE, &ctx->enc_key, walk.iv); p8_aes_ctr_crypt()
138 nbytes &= AES_BLOCK_SIZE - 1; p8_aes_ctr_crypt()
139 ret = blkcipher_walk_done(desc, &walk, nbytes); p8_aes_ctr_crypt()
141 if (walk.nbytes) { p8_aes_ctr_crypt()
110 p8_aes_ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) p8_aes_ctr_crypt() argument
/linux-4.1.27/include/crypto/
H A Dxts.h18 void (*crypt_fn)(void *ctx, u8 *blks, unsigned int nbytes);
24 struct scatterlist *src, unsigned int nbytes,
H A Dscatterwalk.h66 unsigned int nbytes) scatterwalk_clamp()
69 return nbytes > len_this_page ? len_this_page : nbytes; scatterwalk_clamp()
73 unsigned int nbytes) scatterwalk_advance()
75 walk->offset += nbytes; scatterwalk_advance()
96 size_t nbytes, int out);
101 unsigned int start, unsigned int nbytes, int out);
65 scatterwalk_clamp(struct scatter_walk *walk, unsigned int nbytes) scatterwalk_clamp() argument
72 scatterwalk_advance(struct scatter_walk *walk, unsigned int nbytes) scatterwalk_advance() argument
H A Dlrw.h36 void (*crypt_fn)(void *ctx, u8 *blks, unsigned int nbytes);
40 struct scatterlist *src, unsigned int nbytes,
H A Daead.h86 unsigned int nbytes, void *iv) aead_givcrypt_set_crypt()
88 aead_request_set_crypt(&req->areq, src, dst, nbytes, iv); aead_givcrypt_set_crypt()
83 aead_givcrypt_set_crypt(struct aead_givcrypt_request *req, struct scatterlist *src, struct scatterlist *dst, unsigned int nbytes, void *iv) aead_givcrypt_set_crypt() argument
H A Dskcipher.h97 unsigned int nbytes, void *iv) skcipher_givcrypt_set_crypt()
99 ablkcipher_request_set_crypt(&req->creq, src, dst, nbytes, iv); skcipher_givcrypt_set_crypt()
94 skcipher_givcrypt_set_crypt( struct skcipher_givcrypt_request *req, struct scatterlist *src, struct scatterlist *dst, unsigned int nbytes, void *iv) skcipher_givcrypt_set_crypt() argument
H A Dalgapi.h95 unsigned int nbytes; member in struct:blkcipher_walk
118 unsigned int nbytes; member in struct:ablkcipher_walk
312 unsigned int nbytes) blkcipher_walk_init()
316 walk->total = nbytes; blkcipher_walk_init()
322 unsigned int nbytes) ablkcipher_walk_init()
326 walk->total = nbytes; ablkcipher_walk_init()
309 blkcipher_walk_init(struct blkcipher_walk *walk, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) blkcipher_walk_init() argument
319 ablkcipher_walk_init(struct ablkcipher_walk *walk, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ablkcipher_walk_init() argument
/linux-4.1.27/drivers/crypto/
H A Dgeode-aes.c184 unsigned int nbytes) fallback_blk_dec()
193 ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); fallback_blk_dec()
200 unsigned int nbytes) fallback_blk_enc()
209 ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); fallback_blk_enc()
306 unsigned int nbytes) geode_cbc_decrypt()
313 return fallback_blk_dec(desc, dst, src, nbytes); geode_cbc_decrypt()
315 blkcipher_walk_init(&walk, dst, src, nbytes); geode_cbc_decrypt()
319 while ((nbytes = walk.nbytes)) { geode_cbc_decrypt()
323 op->len = nbytes - (nbytes % AES_BLOCK_SIZE); geode_cbc_decrypt()
328 nbytes -= ret; geode_cbc_decrypt()
329 err = blkcipher_walk_done(desc, &walk, nbytes); geode_cbc_decrypt()
338 unsigned int nbytes) geode_cbc_encrypt()
345 return fallback_blk_enc(desc, dst, src, nbytes); geode_cbc_encrypt()
347 blkcipher_walk_init(&walk, dst, src, nbytes); geode_cbc_encrypt()
351 while ((nbytes = walk.nbytes)) { geode_cbc_encrypt()
355 op->len = nbytes - (nbytes % AES_BLOCK_SIZE); geode_cbc_encrypt()
359 nbytes -= ret; geode_cbc_encrypt()
360 err = blkcipher_walk_done(desc, &walk, nbytes); geode_cbc_encrypt()
419 unsigned int nbytes) geode_ecb_decrypt()
426 return fallback_blk_dec(desc, dst, src, nbytes); geode_ecb_decrypt()
428 blkcipher_walk_init(&walk, dst, src, nbytes); geode_ecb_decrypt()
431 while ((nbytes = walk.nbytes)) { geode_ecb_decrypt()
435 op->len = nbytes - (nbytes % AES_BLOCK_SIZE); geode_ecb_decrypt()
439 nbytes -= ret; geode_ecb_decrypt()
440 err = blkcipher_walk_done(desc, &walk, nbytes); geode_ecb_decrypt()
449 unsigned int nbytes) geode_ecb_encrypt()
456 return fallback_blk_enc(desc, dst, src, nbytes); geode_ecb_encrypt()
458 blkcipher_walk_init(&walk, dst, src, nbytes); geode_ecb_encrypt()
461 while ((nbytes = walk.nbytes)) { geode_ecb_encrypt()
465 op->len = nbytes - (nbytes % AES_BLOCK_SIZE); geode_ecb_encrypt()
469 nbytes -= ret; geode_ecb_encrypt()
470 ret = blkcipher_walk_done(desc, &walk, nbytes); geode_ecb_encrypt()
182 fallback_blk_dec(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) fallback_blk_dec() argument
198 fallback_blk_enc(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) fallback_blk_enc() argument
304 geode_cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) geode_cbc_decrypt() argument
336 geode_cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) geode_cbc_encrypt() argument
417 geode_ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) geode_ecb_decrypt() argument
447 geode_ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) geode_ecb_encrypt() argument
H A Dpadlock-aes.c344 unsigned int nbytes) ecb_aes_encrypt()
353 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_aes_encrypt()
357 while ((nbytes = walk.nbytes)) { ecb_aes_encrypt()
360 nbytes / AES_BLOCK_SIZE); ecb_aes_encrypt()
361 nbytes &= AES_BLOCK_SIZE - 1; ecb_aes_encrypt()
362 err = blkcipher_walk_done(desc, &walk, nbytes); ecb_aes_encrypt()
373 unsigned int nbytes) ecb_aes_decrypt()
382 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_aes_decrypt()
386 while ((nbytes = walk.nbytes)) { ecb_aes_decrypt()
389 nbytes / AES_BLOCK_SIZE); ecb_aes_decrypt()
390 nbytes &= AES_BLOCK_SIZE - 1; ecb_aes_decrypt()
391 err = blkcipher_walk_done(desc, &walk, nbytes); ecb_aes_decrypt()
423 unsigned int nbytes) cbc_aes_encrypt()
432 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_aes_encrypt()
436 while ((nbytes = walk.nbytes)) { cbc_aes_encrypt()
440 nbytes / AES_BLOCK_SIZE); cbc_aes_encrypt()
442 nbytes &= AES_BLOCK_SIZE - 1; cbc_aes_encrypt()
443 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_aes_encrypt()
454 unsigned int nbytes) cbc_aes_decrypt()
463 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_aes_decrypt()
467 while ((nbytes = walk.nbytes)) { cbc_aes_decrypt()
470 nbytes / AES_BLOCK_SIZE); cbc_aes_decrypt()
471 nbytes &= AES_BLOCK_SIZE - 1; cbc_aes_decrypt()
472 err = blkcipher_walk_done(desc, &walk, nbytes); cbc_aes_decrypt()
342 ecb_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_aes_encrypt() argument
371 ecb_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_aes_decrypt() argument
421 cbc_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_aes_encrypt() argument
452 cbc_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_aes_decrypt() argument
H A Dimg-hash.c257 ctx->buffer, hdev->req->nbytes); img_hash_write_via_cpu()
259 ctx->total = hdev->req->nbytes; img_hash_write_via_cpu()
361 size_t nbytes, bleft, wsend, len, tbc; img_hash_dma_task() local
368 nbytes = ctx->sg->length - ctx->offset; img_hash_dma_task()
380 bleft = nbytes % 4; img_hash_dma_task()
381 wsend = (nbytes / 4); img_hash_dma_task()
446 if (req->nbytes >= IMG_HASH_DMA_THRESHOLD) { img_hash_process_data()
448 req->nbytes); img_hash_process_data()
452 req->nbytes); img_hash_process_data()
467 nbits = (u64)hdev->req->nbytes << 3; img_hash_hw_init()
531 ctx->op, req->nbytes); img_hash_handle_queue()
554 rctx->fallback_req.nbytes = req->nbytes; img_hash_update()
583 rctx->fallback_req.nbytes = req->nbytes; img_hash_finup()
636 ctx->total = req->nbytes; img_hash_digest()
H A Dhifn_795x.c1167 void *priv, unsigned int nbytes) hifn_setup_cmd_desc()
1192 buf_pos += hifn_setup_base_command(dev, buf_pos, nbytes, hifn_setup_cmd_desc()
1193 nbytes, mask, dev->snum); hifn_setup_cmd_desc()
1254 nbytes, nbytes, ctx->key, ctx->keysize, hifn_setup_cmd_desc()
1373 unsigned int nbytes, void *priv) hifn_setup_dma()
1380 n = nbytes; hifn_setup_dma()
1393 n = nbytes; hifn_setup_dma()
1415 hifn_setup_cmd_desc(dev, ctx, rctx, priv, nbytes); hifn_setup_dma()
1463 unsigned int copy, drest = *drestp, nbytes = *nbytesp; ablkcipher_add() local
1466 if (drest < size || size > nbytes) ablkcipher_add()
1474 nbytes -= copy; ablkcipher_add()
1476 dprintk("%s: copy: %u, size: %u, drest: %u, nbytes: %u.\n", ablkcipher_add()
1477 __func__, copy, size, drest, nbytes); ablkcipher_add()
1483 *nbytesp = nbytes; ablkcipher_add()
1493 unsigned int nbytes = req->nbytes, offset, copy, diff; hifn_cipher_walk() local
1498 while (nbytes) { hifn_cipher_walk()
1504 dprintk("\n%s: dlen: %u, doff: %u, offset: %u, nbytes: %u.\n", hifn_cipher_walk()
1505 __func__, dst->length, dst->offset, offset, nbytes); hifn_cipher_walk()
1510 unsigned slen = min(dst->length - offset, nbytes); hifn_cipher_walk()
1515 err = ablkcipher_add(&dlen, dst, slen, &nbytes); hifn_cipher_walk()
1524 if (dlen < nbytes) { hifn_cipher_walk()
1533 * nbytes += diff; hifn_cipher_walk()
1535 nbytes += diff; hifn_cipher_walk()
1541 printk(KERN_ERR "%s: dlen: %u, nbytes: %u," hifn_cipher_walk()
1543 __func__, dlen, nbytes, slen, offset); hifn_cipher_walk()
1551 copy += diff + nbytes; hifn_cipher_walk()
1555 err = ablkcipher_add(&dlen, dst, nbytes, &nbytes); hifn_cipher_walk()
1565 nbytes -= min(dst->length, nbytes); hifn_cipher_walk()
1581 unsigned int nbytes = req->nbytes, idx = 0; hifn_setup_session() local
1590 while (nbytes) { hifn_setup_session()
1592 dlen = min(dst->length, nbytes); hifn_setup_session()
1598 nbytes -= dlen; hifn_setup_session()
1620 err = hifn_setup_dma(dev, ctx, rctx, req->src, req->dst, req->nbytes, req); hifn_setup_session()
1724 unsigned int srest = *srestp, nbytes = *nbytesp, copy; ablkcipher_get() local
1728 if (srest < size || size > nbytes) ablkcipher_get()
1738 nbytes -= copy; ablkcipher_get()
1744 dprintk("%s: copy: %u, size: %u, srest: %u, nbytes: %u.\n", ablkcipher_get()
1745 __func__, copy, size, srest, nbytes); ablkcipher_get()
1751 *nbytesp = nbytes; ablkcipher_get()
1775 unsigned int nbytes = req->nbytes; hifn_process_ready() local
1780 while (nbytes) { hifn_process_ready()
1786 "nbytes: %u.\n", hifn_process_ready()
1788 sg_page(dst), dst->length, nbytes); hifn_process_ready()
1791 nbytes -= min(dst->length, nbytes); hifn_process_ready()
1799 dst, nbytes, &nbytes); hifn_process_ready()
2083 if (dev->started + DIV_ROUND_UP(req->nbytes, PAGE_SIZE) <= HIFN_QUEUE_LENGTH) hifn_handle_req()
1165 hifn_setup_cmd_desc(struct hifn_device *dev, struct hifn_context *ctx, struct hifn_request_context *rctx, void *priv, unsigned int nbytes) hifn_setup_cmd_desc() argument
1370 hifn_setup_dma(struct hifn_device *dev, struct hifn_context *ctx, struct hifn_request_context *rctx, struct scatterlist *src, struct scatterlist *dst, unsigned int nbytes, void *priv) hifn_setup_dma() argument
H A Dn2_core.c323 rctx->fallback_req.nbytes = req->nbytes; n2_hash_async_update()
350 rctx->fallback_req.nbytes = req->nbytes; n2_hash_async_finup()
517 int nbytes, cpu; n2_do_async_digest() local
522 if (unlikely(req->nbytes > (1 << 16))) { n2_do_async_digest()
529 rctx->fallback_req.nbytes = req->nbytes; n2_do_async_digest()
536 nbytes = crypto_hash_walk_first(req, &walk); n2_do_async_digest()
550 ent->control = control_word_base(nbytes, auth_key_len, 0, n2_do_async_digest()
563 nbytes = crypto_hash_walk_done(&walk, 0); n2_do_async_digest()
564 while (nbytes > 0) { n2_do_async_digest()
567 ent->control = (nbytes - 1); n2_do_async_digest()
576 nbytes = crypto_hash_walk_done(&walk, 0); n2_do_async_digest()
602 if (unlikely(req->nbytes == 0)) { n2_hash_async_digest()
622 if (unlikely(req->nbytes == 0) || n2_hmac_async_digest()
630 rctx->fallback_req.nbytes = req->nbytes; n2_hmac_async_digest()
818 static inline int cipher_descriptor_len(int nbytes, unsigned int block_size) cipher_descriptor_len() argument
820 int this_len = nbytes; cipher_descriptor_len()
822 this_len -= (nbytes & (block_size - 1)); cipher_descriptor_len()
881 int err, nbytes; n2_compute_chunks() local
883 ablkcipher_walk_init(walk, req->dst, req->src, req->nbytes); n2_compute_chunks()
901 while ((nbytes = walk->nbytes) != 0) { n2_compute_chunks()
911 this_len = cipher_descriptor_len(nbytes, walk->blocksize); n2_compute_chunks()
942 err = ablkcipher_walk_done(req, walk, nbytes - this_len); n2_compute_chunks()
H A Dsahara.c587 "dispatch request (nbytes=%d, src=%p, dst=%p)\n", sahara_aes_process()
588 req->nbytes, req->src, req->dst); sahara_aes_process()
591 dev->total = req->nbytes; sahara_aes_process()
670 dev_dbg(dev->device, "nbytes: %d, enc: %d, cbc: %d\n", sahara_aes_crypt()
671 req->nbytes, !!(mode & FLAGS_ENCRYPT), !!(mode & FLAGS_CBC)); sahara_aes_crypt()
673 if (!IS_ALIGNED(req->nbytes, AES_BLOCK_SIZE)) { sahara_aes_crypt()
938 static int sahara_walk_and_recalc(struct scatterlist *sg, unsigned int nbytes) sahara_walk_and_recalc() argument
941 return nbytes; sahara_walk_and_recalc()
943 while (nbytes && sg) { sahara_walk_and_recalc()
944 if (nbytes <= sg->length) { sahara_walk_and_recalc()
945 sg->length = nbytes; sahara_walk_and_recalc()
949 nbytes -= sg->length; sahara_walk_and_recalc()
953 return nbytes; sahara_walk_and_recalc()
967 len = rctx->buf_cnt + req->nbytes; sahara_sha_prepare_request()
973 0, req->nbytes, 0); sahara_sha_prepare_request()
974 rctx->buf_cnt += req->nbytes; sahara_sha_prepare_request()
986 unsigned int offset = req->nbytes - hash_later; sahara_sha_prepare_request()
992 /* nbytes should now be multiple of blocksize */ sahara_sha_prepare_request()
993 req->nbytes = req->nbytes - hash_later; sahara_sha_prepare_request()
995 sahara_walk_and_recalc(req->src, req->nbytes); sahara_sha_prepare_request()
998 if (rctx->buf_cnt && req->nbytes) { sahara_sha_prepare_request()
1004 rctx->total = req->nbytes + rctx->buf_cnt; sahara_sha_prepare_request()
1022 rctx->total = req->nbytes; sahara_sha_prepare_request()
1148 if (!req->nbytes && !last) sahara_sha_enqueue()
1204 req->nbytes = 0; sahara_sha_final()
H A Dbfin_crc.c337 dev_dbg(crc->dev, "handling new req, flag=%u, nbytes: %d\n", bfin_crypto_crc_handle_queue()
338 ctx->flag, req->nbytes); bfin_crypto_crc_handle_queue()
351 if (ctx->bufnext_len + req->nbytes < CHKSUM_DIGEST_SIZE) { bfin_crypto_crc_handle_queue()
353 sg_virt(req->src), req->nbytes); bfin_crypto_crc_handle_queue()
354 ctx->bufnext_len += req->nbytes; bfin_crypto_crc_handle_queue()
381 ctx->sg_buflen = ctx->buflast_len + req->nbytes; bfin_crypto_crc_handle_queue()
425 if (!req->nbytes) bfin_crypto_crc_update()
429 ctx->total += req->nbytes; bfin_crypto_crc_update()
455 ctx->total += req->nbytes; bfin_crypto_crc_finup()
H A Dpicoxcell_crypto.c264 static int sg_count(struct scatterlist *sg_list, int nbytes) sg_count() argument
269 while (nbytes > 0) { sg_count()
271 nbytes -= sg->length; sg_count()
291 unsigned nbytes, spacc_sg_to_ddt()
300 nents = sg_count(payload, nbytes); spacc_sg_to_ddt()
433 unsigned nbytes, enum dma_data_direction dir) spacc_free_ddt()
435 unsigned nents = sg_count(payload, nbytes); spacc_free_ddt()
932 ablk_req->nbytes, DMA_TO_DEVICE); spacc_ablk_complete()
934 ablk_req->nbytes, DMA_FROM_DEVICE); spacc_ablk_complete()
937 ablk_req->nbytes, DMA_BIDIRECTIONAL); spacc_ablk_complete()
960 writel(ablk_req->nbytes, engine->regs + SPA_PROC_LEN_REG_OFFSET); spacc_ablk_submit()
1024 req->nbytes, DMA_TO_DEVICE, &dev_req->src_addr); spacc_ablk_setup()
1029 req->nbytes, DMA_FROM_DEVICE, &dev_req->dst_addr); spacc_ablk_setup()
1034 req->nbytes, DMA_BIDIRECTIONAL, &dev_req->dst_addr); spacc_ablk_setup()
1067 req->nbytes, req->src == req->dst ? spacc_ablk_setup()
1072 req->src, req->nbytes, DMA_TO_DEVICE); spacc_ablk_setup()
289 spacc_sg_to_ddt(struct spacc_engine *engine, struct scatterlist *payload, unsigned nbytes, enum dma_data_direction dir, dma_addr_t *ddt_phys) spacc_sg_to_ddt() argument
431 spacc_free_ddt(struct spacc_req *req, struct spacc_ddt *ddt, dma_addr_t ddt_addr, struct scatterlist *payload, unsigned nbytes, enum dma_data_direction dir) spacc_free_ddt() argument
H A Dixp4xx_crypto.c783 struct scatterlist *sg, unsigned nbytes, chainup_buffers()
787 for (; nbytes > 0; sg = sg_next(sg)) { chainup_buffers()
788 unsigned len = min(nbytes, sg->length); chainup_buffers()
793 nbytes -= len; chainup_buffers()
873 unsigned int nbytes = req->nbytes; ablk_perform() local
898 crypt->crypt_len = nbytes; ablk_perform()
908 if (!chainup_buffers(dev, req->dst, nbytes, &dst_hook, ablk_perform()
918 if (!chainup_buffers(dev, req->src, nbytes, &src_hook, ablk_perform()
972 unsigned int nbytes) hmac_inconsistent()
976 if (!nbytes) hmac_inconsistent()
986 return (start + nbytes > offset + sg->length); hmac_inconsistent()
782 chainup_buffers(struct device *dev, struct scatterlist *sg, unsigned nbytes, struct buffer_desc *buf, gfp_t flags, enum dma_data_direction dir) chainup_buffers() argument
971 hmac_inconsistent(struct scatterlist *sg, unsigned start, unsigned int nbytes) hmac_inconsistent() argument
H A Dmv_cesa.c532 p->hw_nbytes = req->nbytes; mv_start_new_crypt_req()
537 num_sgs = count_sgs(req->src, req->nbytes); mv_start_new_crypt_req()
540 num_sgs = count_sgs(req->dst, req->nbytes); mv_start_new_crypt_req()
553 hw_bytes = req->nbytes + ctx->extra_bytes; mv_start_new_hash_req()
563 num_sgs = count_sgs(req->src, req->nbytes); mv_start_new_hash_req()
732 if (!req->nbytes) mv_hash_update()
735 mv_update_hash_req_ctx(ahash_request_ctx(req), 0, req->nbytes); mv_hash_update()
750 mv_update_hash_req_ctx(ahash_request_ctx(req), 1, req->nbytes); mv_hash_finup()
758 req->nbytes, tfm_ctx->count_add); mv_hash_digest()
H A Datmel-aes.c161 unsigned int total = req->nbytes; atmel_aes_sg_length()
168 total = req->nbytes; atmel_aes_sg_length()
594 dd->total = req->nbytes; atmel_aes_handle_queue()
714 if (!IS_ALIGNED(req->nbytes, CFB8_BLOCK_SIZE)) { atmel_aes_crypt()
720 if (!IS_ALIGNED(req->nbytes, CFB16_BLOCK_SIZE)) { atmel_aes_crypt()
726 if (!IS_ALIGNED(req->nbytes, CFB32_BLOCK_SIZE)) { atmel_aes_crypt()
732 if (!IS_ALIGNED(req->nbytes, CFB64_BLOCK_SIZE)) { atmel_aes_crypt()
738 if (!IS_ALIGNED(req->nbytes, AES_BLOCK_SIZE)) { atmel_aes_crypt()
H A Domap-aes.c403 unsigned int start, unsigned int nbytes, int out) sg_copy_buf()
407 if (!nbytes) sg_copy_buf()
412 scatterwalk_copychunks(buf, &walk, nbytes, out); sg_copy_buf()
639 dd->total = req->nbytes; omap_aes_handle_queue()
640 dd->total_save = req->nbytes; omap_aes_handle_queue()
725 pr_debug("nbytes: %d, enc: %d, cbc: %d\n", req->nbytes, omap_aes_crypt()
729 if (!IS_ALIGNED(req->nbytes, AES_BLOCK_SIZE)) { omap_aes_crypt()
402 sg_copy_buf(void *buf, struct scatterlist *sg, unsigned int start, unsigned int nbytes, int out) sg_copy_buf() argument
H A Domap-des.c387 unsigned int start, unsigned int nbytes, int out) sg_copy_buf()
391 if (!nbytes) sg_copy_buf()
396 scatterwalk_copychunks(buf, &walk, nbytes, out); sg_copy_buf()
621 dd->total = req->nbytes; omap_des_handle_queue()
622 dd->total_save = req->nbytes; omap_des_handle_queue()
707 pr_debug("nbytes: %d, enc: %d, cbc: %d\n", req->nbytes, omap_des_crypt()
711 if (!IS_ALIGNED(req->nbytes, DES_BLOCK_SIZE)) { omap_des_crypt()
386 sg_copy_buf(void *buf, struct scatterlist *sg, unsigned int start, unsigned int nbytes, int out) sg_copy_buf() argument
/linux-4.1.27/include/trace/events/
H A Drandom.h196 TP_PROTO(int nbytes, unsigned long IP),
198 TP_ARGS(nbytes, IP),
201 __field( int, nbytes )
206 __entry->nbytes = nbytes;
210 TP_printk("nbytes %d caller %pS", __entry->nbytes, (void *)__entry->IP)
214 TP_PROTO(int nbytes, unsigned long IP),
216 TP_ARGS(nbytes, IP)
220 TP_PROTO(int nbytes, unsigned long IP),
222 TP_ARGS(nbytes, IP)
226 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
229 TP_ARGS(pool_name, nbytes, entropy_count, IP),
233 __field( int, nbytes )
240 __entry->nbytes = nbytes;
245 TP_printk("%s pool: nbytes %d entropy_count %d caller %pS",
246 __entry->pool_name, __entry->nbytes, __entry->entropy_count,
252 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
255 TP_ARGS(pool_name, nbytes, entropy_count, IP)
259 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
262 TP_ARGS(pool_name, nbytes, entropy_count, IP)
/linux-4.1.27/drivers/staging/comedi/
H A Dcomedi_buf.c258 unsigned int nbytes) comedi_buf_write_alloc()
263 if (nbytes > available) comedi_buf_write_alloc()
264 nbytes = available; comedi_buf_write_alloc()
266 async->buf_write_alloc_count += nbytes; comedi_buf_write_alloc()
274 return nbytes; comedi_buf_write_alloc()
334 unsigned int nbytes) comedi_buf_write_free()
339 if (nbytes > allocated) comedi_buf_write_free()
340 nbytes = allocated; comedi_buf_write_free()
342 async->buf_write_count += nbytes; comedi_buf_write_free()
343 async->buf_write_ptr += nbytes; comedi_buf_write_free()
348 return nbytes; comedi_buf_write_free()
374 unsigned int nbytes) comedi_buf_read_alloc()
380 if (nbytes > available) comedi_buf_read_alloc()
381 nbytes = available; comedi_buf_read_alloc()
383 async->buf_read_alloc_count += nbytes; comedi_buf_read_alloc()
391 return nbytes; comedi_buf_read_alloc()
402 unsigned int nbytes) comedi_buf_read_free()
414 if (nbytes > allocated) comedi_buf_read_free()
415 nbytes = allocated; comedi_buf_read_free()
417 async->buf_read_count += nbytes; comedi_buf_read_free()
418 async->buf_read_ptr += nbytes; comedi_buf_read_free()
420 return nbytes; comedi_buf_read_free()
448 void *dest, unsigned int nbytes) comedi_buf_memcpy_from()
454 while (nbytes) { comedi_buf_memcpy_from()
459 if (nbytes >= async->prealloc_bufsz - read_ptr) comedi_buf_memcpy_from()
462 block_size = nbytes; comedi_buf_memcpy_from()
465 nbytes -= block_size; comedi_buf_memcpy_from()
486 unsigned int nbytes; comedi_buf_write_samples() local
504 nbytes = comedi_buf_write_alloc(s, comedi_buf_write_samples()
506 comedi_buf_memcpy_to(s, data, nbytes); comedi_buf_write_samples()
507 comedi_buf_write_free(s, nbytes); comedi_buf_write_samples()
508 comedi_inc_scan_progress(s, nbytes); comedi_buf_write_samples()
511 return nbytes; comedi_buf_write_samples()
530 unsigned int nbytes; comedi_buf_read_samples() local
541 nbytes = comedi_buf_read_alloc(s, comedi_buf_read_samples()
543 comedi_buf_memcpy_from(s, data, nbytes); comedi_buf_read_samples()
544 comedi_buf_read_free(s, nbytes); comedi_buf_read_samples()
545 comedi_inc_scan_progress(s, nbytes); comedi_buf_read_samples()
548 return nbytes; comedi_buf_read_samples()
257 comedi_buf_write_alloc(struct comedi_subdevice *s, unsigned int nbytes) comedi_buf_write_alloc() argument
333 comedi_buf_write_free(struct comedi_subdevice *s, unsigned int nbytes) comedi_buf_write_free() argument
373 comedi_buf_read_alloc(struct comedi_subdevice *s, unsigned int nbytes) comedi_buf_read_alloc() argument
401 comedi_buf_read_free(struct comedi_subdevice *s, unsigned int nbytes) comedi_buf_read_free() argument
447 comedi_buf_memcpy_from(struct comedi_subdevice *s, void *dest, unsigned int nbytes) comedi_buf_memcpy_from() argument
/linux-4.1.27/drivers/pnp/isapnp/
H A Dproc.c36 size_t nbytes, loff_t * ppos) isapnp_proc_bus_read()
44 if (nbytes >= size) isapnp_proc_bus_read()
45 nbytes = size; isapnp_proc_bus_read()
46 if (pos + nbytes > size) isapnp_proc_bus_read()
47 nbytes = size - pos; isapnp_proc_bus_read()
48 cnt = nbytes; isapnp_proc_bus_read()
62 return nbytes; isapnp_proc_bus_read()
35 isapnp_proc_bus_read(struct file *file, char __user * buf, size_t nbytes, loff_t * ppos) isapnp_proc_bus_read() argument
/linux-4.1.27/arch/arm64/crypto/
H A Daes-glue.c100 struct scatterlist *src, unsigned int nbytes) ecb_encrypt()
108 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_encrypt()
112 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { ecb_encrypt()
115 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); ecb_encrypt()
122 struct scatterlist *src, unsigned int nbytes) ecb_decrypt()
130 blkcipher_walk_init(&walk, dst, src, nbytes); ecb_decrypt()
134 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { ecb_decrypt()
137 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); ecb_decrypt()
144 struct scatterlist *src, unsigned int nbytes) cbc_encrypt()
152 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_encrypt()
156 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { cbc_encrypt()
160 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); cbc_encrypt()
167 struct scatterlist *src, unsigned int nbytes) cbc_decrypt()
175 blkcipher_walk_init(&walk, dst, src, nbytes); cbc_decrypt()
179 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { cbc_decrypt()
183 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); cbc_decrypt()
190 struct scatterlist *src, unsigned int nbytes) ctr_encrypt()
198 blkcipher_walk_init(&walk, dst, src, nbytes); ctr_encrypt()
203 while ((blocks = (walk.nbytes / AES_BLOCK_SIZE))) { ctr_encrypt()
208 nbytes -= blocks * AES_BLOCK_SIZE; ctr_encrypt()
209 if (nbytes && nbytes == walk.nbytes % AES_BLOCK_SIZE) ctr_encrypt()
212 walk.nbytes % AES_BLOCK_SIZE); ctr_encrypt()
214 if (nbytes) { ctr_encrypt()
220 * Minimum alignment is 8 bytes, so if nbytes is <= 8, we need ctr_encrypt()
223 blocks = (nbytes <= 8) ? -1 : 1; ctr_encrypt()
227 memcpy(tdst, tail, nbytes); ctr_encrypt()
236 struct scatterlist *src, unsigned int nbytes) xts_encrypt()
244 blkcipher_walk_init(&walk, dst, src, nbytes); xts_encrypt()
248 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { xts_encrypt()
252 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); xts_encrypt()
260 struct scatterlist *src, unsigned int nbytes) xts_decrypt()
268 blkcipher_walk_init(&walk, dst, src, nbytes); xts_decrypt()
272 for (first = 1; (blocks = (walk.nbytes / AES_BLOCK_SIZE)); first = 0) { xts_decrypt()
276 err = blkcipher_walk_done(desc, &walk, walk.nbytes % AES_BLOCK_SIZE); xts_decrypt()
99 ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_encrypt() argument
121 ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_decrypt() argument
143 cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_encrypt() argument
166 cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_decrypt() argument
189 ctr_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_encrypt() argument
235 xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_encrypt() argument
259 xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) xts_decrypt() argument
H A Daes-ce-ccm-glue.c175 while (walk.nbytes) { ccm_encrypt()
176 u32 tail = walk.nbytes % AES_BLOCK_SIZE; ccm_encrypt()
178 if (walk.nbytes == len) ccm_encrypt()
182 walk.nbytes - tail, ctx->key_enc, ccm_encrypt()
185 len -= walk.nbytes - tail; ccm_encrypt()
231 while (walk.nbytes) { ccm_decrypt()
232 u32 tail = walk.nbytes % AES_BLOCK_SIZE; ccm_decrypt()
234 if (walk.nbytes == len) ccm_decrypt()
238 walk.nbytes - tail, ctx->key_enc, ccm_decrypt()
241 len -= walk.nbytes - tail; ccm_decrypt()
/linux-4.1.27/arch/x86/lib/
H A Dinsn.c116 prefixes->nbytes++; insn_get_prefixes()
140 insn->rex_prefix.nbytes = 1; insn_get_prefixes()
168 insn->vex_prefix.nbytes = 3; insn_get_prefixes()
180 insn->vex_prefix.nbytes = 2; insn_get_prefixes()
216 opcode->nbytes = 1; insn_get_opcode()
233 opcode->bytes[opcode->nbytes++] = op; insn_get_opcode()
266 modrm->nbytes = 1; insn_get_modrm()
304 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); insn_rip_relative()
322 if (insn->modrm.nbytes) { insn_get_sib()
327 insn->sib.nbytes = 1; insn_get_sib()
353 if (insn->modrm.nbytes) { insn_get_displacement()
378 insn->displacement.nbytes = 1; insn_get_displacement()
383 insn->displacement.nbytes = 2; insn_get_displacement()
389 insn->displacement.nbytes = 4; insn_get_displacement()
406 insn->moffset1.nbytes = 2; __get_moffset()
410 insn->moffset1.nbytes = 4; __get_moffset()
414 insn->moffset1.nbytes = 4; __get_moffset()
416 insn->moffset2.nbytes = 4; __get_moffset()
435 insn->immediate.nbytes = 2; __get_immv32()
440 insn->immediate.nbytes = 4; __get_immv32()
458 insn->immediate1.nbytes = 2; __get_immv()
462 insn->immediate1.nbytes = 4; __get_immv()
466 insn->immediate1.nbytes = 4; __get_immv()
468 insn->immediate2.nbytes = 4; __get_immv()
486 insn->immediate1.nbytes = 2; __get_immptr()
490 insn->immediate1.nbytes = 4; __get_immptr()
499 insn->immediate2.nbytes = 2; __get_immptr()
514 * get by bit masking with ((1 << (nbytes * 8)) - 1)
536 insn->immediate.nbytes = 1; insn_get_immediate()
540 insn->immediate.nbytes = 2; insn_get_immediate()
544 insn->immediate.nbytes = 4; insn_get_immediate()
548 insn->immediate1.nbytes = 4; insn_get_immediate()
550 insn->immediate2.nbytes = 4; insn_get_immediate()
570 insn->immediate2.nbytes = 1; insn_get_immediate()
/linux-4.1.27/drivers/zorro/
H A Dproc.c30 proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) proc_bus_zorro_read() argument
38 if (nbytes >= sizeof(struct ConfigDev)) proc_bus_zorro_read()
39 nbytes = sizeof(struct ConfigDev); proc_bus_zorro_read()
40 if (pos + nbytes > sizeof(struct ConfigDev)) proc_bus_zorro_read()
41 nbytes = sizeof(struct ConfigDev) - pos; proc_bus_zorro_read()
51 if (copy_to_user(buf, (void *)&cd + pos, nbytes)) proc_bus_zorro_read()
53 *ppos += nbytes; proc_bus_zorro_read()
55 return nbytes; proc_bus_zorro_read()
/linux-4.1.27/fs/coda/
H A Dpsdev.c98 size_t nbytes, loff_t *off) coda_psdev_write()
116 if ( nbytes < sizeof(struct coda_out_hdr) ) { coda_psdev_write()
119 count = nbytes; coda_psdev_write()
122 if ( nbytes > size ) { coda_psdev_write()
125 nbytes = size; coda_psdev_write()
127 CODA_ALLOC(dcbuf, union outputArgs *, nbytes); coda_psdev_write()
128 if (copy_from_user(dcbuf, buf, nbytes)) { coda_psdev_write()
129 CODA_FREE(dcbuf, nbytes); coda_psdev_write()
137 CODA_FREE(dcbuf, nbytes); coda_psdev_write()
144 count = nbytes; coda_psdev_write()
168 if (req->uc_outSize < nbytes) { coda_psdev_write()
170 __func__, req->uc_outSize, (long)nbytes, coda_psdev_write()
172 nbytes = req->uc_outSize; /* don't have more space! */ coda_psdev_write()
174 if (copy_from_user(req->uc_data, buf, nbytes)) { coda_psdev_write()
182 req->uc_outSize = nbytes; coda_psdev_write()
184 count = nbytes; coda_psdev_write()
204 size_t nbytes, loff_t *off) coda_psdev_read()
211 if (nbytes == 0) coda_psdev_read()
244 if (nbytes < req->uc_inSize) { coda_psdev_read()
246 __func__, (long)nbytes, req->uc_inSize); coda_psdev_read()
247 count = nbytes; coda_psdev_read()
97 coda_psdev_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *off) coda_psdev_write() argument
203 coda_psdev_read(struct file * file, char __user * buf, size_t nbytes, loff_t *off) coda_psdev_read() argument
/linux-4.1.27/drivers/staging/speakup/
H A Ddevsynth.c17 size_t nbytes, loff_t *ppos) speakup_file_write()
19 size_t count = nbytes; speakup_file_write()
37 return (ssize_t) nbytes; speakup_file_write()
41 size_t nbytes, loff_t *ppos) speakup_file_read()
16 speakup_file_write(struct file *fp, const char __user *buffer, size_t nbytes, loff_t *ppos) speakup_file_write() argument
40 speakup_file_read(struct file *fp, char __user *buf, size_t nbytes, loff_t *ppos) speakup_file_read() argument
/linux-4.1.27/include/linux/
H A Dcuda.h15 void (*done)(struct adb_request *), int nbytes, ...);
H A Drandom.h16 extern void get_random_bytes(void *buf, int nbytes);
17 extern void get_random_bytes_arch(void *buf, int nbytes);
29 void prandom_bytes(void *buf, size_t nbytes);
38 void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes);
H A Dadb.h12 int nbytes; member in struct:adb_request
55 int flags, int nbytes, ...);
H A Dmpi.h79 MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes);
83 void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign);
84 void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign);
85 int mpi_set_buffer(MPI a, const void *buffer, unsigned nbytes, int sign);
H A Dcrc8.h80 * @nbytes: number of bytes in data buffer.
99 u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc);
H A Dpmu.h17 void (*done)(struct adb_request *), int nbytes, ...);
H A Dcrypto.h168 unsigned int nbytes; member in struct:ablkcipher_request
214 const u8 *src, unsigned int nbytes);
354 unsigned int nbytes);
357 unsigned int nbytes);
625 struct scatterlist *src, unsigned int nbytes);
627 struct scatterlist *src, unsigned int nbytes);
1174 * @nbytes: number of bytes to process from @src
1188 unsigned int nbytes, void *iv) ablkcipher_request_set_crypt()
1192 req->nbytes = nbytes; ablkcipher_request_set_crypt()
1796 * @nbytes: number of bytes of the plaintext to encrypt.
1811 unsigned int nbytes) crypto_blkcipher_encrypt()
1814 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); crypto_blkcipher_encrypt()
1823 * @nbytes: number of bytes of the plaintext to encrypt.
1839 unsigned int nbytes) crypto_blkcipher_encrypt_iv()
1841 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); crypto_blkcipher_encrypt_iv()
1850 * @nbytes: number of bytes of the ciphertext to decrypt.
1864 unsigned int nbytes) crypto_blkcipher_decrypt()
1867 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); crypto_blkcipher_decrypt()
1876 * @nbytes: number of bytes of the ciphertext to decrypt.
1889 unsigned int nbytes) crypto_blkcipher_decrypt_iv()
1891 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); crypto_blkcipher_decrypt_iv()
2261 * @nbytes: number of bytes to be processed from @sg
2272 unsigned int nbytes) crypto_hash_update()
2274 return crypto_hash_crt(desc->tfm)->update(desc, sg, nbytes); crypto_hash_update()
2300 * @nbytes: see crypto_hash_update()
2312 unsigned int nbytes, u8 *out) crypto_hash_digest()
2314 return crypto_hash_crt(desc->tfm)->digest(desc, sg, nbytes, out); crypto_hash_digest()
1185 ablkcipher_request_set_crypt( struct ablkcipher_request *req, struct scatterlist *src, struct scatterlist *dst, unsigned int nbytes, void *iv) ablkcipher_request_set_crypt() argument
1808 crypto_blkcipher_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_blkcipher_encrypt() argument
1836 crypto_blkcipher_encrypt_iv(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_blkcipher_encrypt_iv() argument
1861 crypto_blkcipher_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_blkcipher_decrypt() argument
1886 crypto_blkcipher_decrypt_iv(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_blkcipher_decrypt_iv() argument
2270 crypto_hash_update(struct hash_desc *desc, struct scatterlist *sg, unsigned int nbytes) crypto_hash_update() argument
2310 crypto_hash_digest(struct hash_desc *desc, struct scatterlist *sg, unsigned int nbytes, u8 *out) crypto_hash_digest() argument
H A Dnet.h246 bool __net_get_random_once(void *buf, int nbytes, bool *done,
249 #define net_get_random_once(buf, nbytes) \
257 nbytes, \
/linux-4.1.27/drivers/crypto/nx/
H A Dnx-aes-cbc.c68 unsigned int nbytes, cbc_aes_nx_crypt()
85 to_process = nbytes - processed; cbc_aes_nx_crypt()
108 } while (processed < nbytes); cbc_aes_nx_crypt()
117 unsigned int nbytes) cbc_aes_nx_encrypt()
119 return cbc_aes_nx_crypt(desc, dst, src, nbytes, 1); cbc_aes_nx_encrypt()
125 unsigned int nbytes) cbc_aes_nx_decrypt()
127 return cbc_aes_nx_crypt(desc, dst, src, nbytes, 0); cbc_aes_nx_decrypt()
65 cbc_aes_nx_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, int enc) cbc_aes_nx_crypt() argument
114 cbc_aes_nx_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_aes_nx_encrypt() argument
122 cbc_aes_nx_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) cbc_aes_nx_decrypt() argument
H A Dnx-aes-ecb.c68 unsigned int nbytes, ecb_aes_nx_crypt()
85 to_process = nbytes - processed; ecb_aes_nx_crypt()
107 } while (processed < nbytes); ecb_aes_nx_crypt()
117 unsigned int nbytes) ecb_aes_nx_encrypt()
119 return ecb_aes_nx_crypt(desc, dst, src, nbytes, 1); ecb_aes_nx_encrypt()
125 unsigned int nbytes) ecb_aes_nx_decrypt()
127 return ecb_aes_nx_crypt(desc, dst, src, nbytes, 0); ecb_aes_nx_decrypt()
65 ecb_aes_nx_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, int enc) ecb_aes_nx_crypt() argument
114 ecb_aes_nx_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_aes_nx_encrypt() argument
122 ecb_aes_nx_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ecb_aes_nx_decrypt() argument
H A Dnx-aes-gcm.c132 unsigned int nbytes = req->assoclen; nx_gca() local
136 if (nbytes <= AES_BLOCK_SIZE) { nx_gca()
138 scatterwalk_copychunks(out, &walk, nbytes, SCATTERWALK_FROM_SG); nx_gca()
156 to_process = min_t(u64, nbytes - processed, nx_gca()
164 if ((to_process + processed) < nbytes) nx_gca()
186 } while (processed < nbytes); nx_gca()
199 unsigned int nbytes = req->assoclen; gmac() local
222 to_process = min_t(u64, nbytes - processed, gmac()
230 if ((to_process + processed) < nbytes) gmac()
239 csbcpb->cpb.aes_gcm.bit_length_aad = 8 * nbytes; gmac()
257 } while (processed < nbytes); gmac()
336 unsigned int nbytes = req->cryptlen; gcm_aes_nx_crypt() local
347 if (nbytes == 0) { gcm_aes_nx_crypt()
372 nbytes -= crypto_aead_authsize(crypto_aead_reqtfm(req)); gcm_aes_nx_crypt()
376 to_process = nbytes - processed; gcm_aes_nx_crypt()
378 csbcpb->cpb.aes_gcm.bit_length_data = nbytes * 8; gcm_aes_nx_crypt()
387 if ((to_process + processed) < nbytes) gcm_aes_nx_crypt()
411 } while (processed < nbytes); gcm_aes_nx_crypt()
417 req->dst, nbytes, gcm_aes_nx_crypt()
424 scatterwalk_map_and_copy(itag, req->src, nbytes, gcm_aes_nx_crypt()
H A Dnx-aes-ccm.c176 unsigned int nbytes, generate_pat()
226 rc = generate_b0(iv, req->assoclen, authsize, nbytes, b0); generate_pat()
350 unsigned int nbytes = req->cryptlen; ccm_nx_decrypt() local
359 nbytes -= authsize; ccm_nx_decrypt()
363 req->src, nbytes, authsize, ccm_nx_decrypt()
366 rc = generate_pat(desc->info, req, nx_ctx, authsize, nbytes, ccm_nx_decrypt()
376 to_process = nbytes - processed; ccm_nx_decrypt()
378 if ((to_process + processed) < nbytes) ccm_nx_decrypt()
413 } while (processed < nbytes); ccm_nx_decrypt()
427 unsigned int nbytes = req->cryptlen; ccm_nx_encrypt() local
435 rc = generate_pat(desc->info, req, nx_ctx, authsize, nbytes, ccm_nx_encrypt()
444 to_process = nbytes - processed; ccm_nx_encrypt()
446 if ((to_process + processed) < nbytes) ccm_nx_encrypt()
482 } while (processed < nbytes); ccm_nx_encrypt()
486 req->dst, nbytes, authsize, ccm_nx_encrypt()
172 generate_pat(u8 *iv, struct aead_request *req, struct nx_crypto_ctx *nx_ctx, unsigned int authsize, unsigned int nbytes, u8 *out) generate_pat() argument
H A Dnx-aes-ctr.c87 unsigned int nbytes) ctr_aes_nx_crypt()
98 to_process = nbytes - processed; ctr_aes_nx_crypt()
122 } while (processed < nbytes); ctr_aes_nx_crypt()
131 unsigned int nbytes) ctr3686_aes_nx_crypt()
144 return ctr_aes_nx_crypt(desc, dst, src, nbytes); ctr3686_aes_nx_crypt()
84 ctr_aes_nx_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr_aes_nx_crypt() argument
128 ctr3686_aes_nx_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) ctr3686_aes_nx_crypt() argument
H A Dnx.c221 unsigned int *nbytes) trim_sg_list()
247 data_back = *nbytes - (data_back & ~(AES_BLOCK_SIZE - 1)); trim_sg_list()
248 *nbytes -= data_back; trim_sg_list()
262 * @nbytes: length of data described in the scatterlists
275 unsigned int *nbytes, nx_build_sg_lists()
280 unsigned int total = *nbytes; nx_build_sg_lists()
293 *nbytes = min_t(u64, *nbytes, nx_ctx->ap->databytelen); nx_build_sg_lists()
296 offset, nbytes); nx_build_sg_lists()
298 offset, nbytes); nx_build_sg_lists()
300 if (*nbytes < total) nx_build_sg_lists()
301 delta = *nbytes - (*nbytes & ~(AES_BLOCK_SIZE - 1)); nx_build_sg_lists()
306 nx_ctx->op.inlen = trim_sg_list(nx_ctx->in_sg, nx_insg, delta, nbytes); nx_build_sg_lists()
307 nx_ctx->op.outlen = trim_sg_list(nx_ctx->out_sg, nx_outsg, delta, nbytes); nx_build_sg_lists()
218 trim_sg_list(struct nx_sg *sg, struct nx_sg *end, unsigned int delta, unsigned int *nbytes) trim_sg_list() argument
271 nx_build_sg_lists(struct nx_crypto_ctx *nx_ctx, struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int *nbytes, unsigned int offset, u8 *iv) nx_build_sg_lists() argument
/linux-4.1.27/arch/x86/include/asm/crypto/
H A Dglue_helper.h48 bool fpu_enabled, unsigned int nbytes) glue_fpu_begin()
60 if (nbytes < bsize * (unsigned int)fpu_blocks_limit) glue_fpu_begin()
116 struct scatterlist *src, unsigned int nbytes);
122 unsigned int nbytes);
128 unsigned int nbytes);
133 struct scatterlist *src, unsigned int nbytes);
138 struct scatterlist *src, unsigned int nbytes,
46 glue_fpu_begin(unsigned int bsize, int fpu_blocks_limit, struct blkcipher_desc *desc, bool fpu_enabled, unsigned int nbytes) glue_fpu_begin() argument
/linux-4.1.27/drivers/crypto/caam/
H A Dsg_sw_sec4.h59 static inline int __sg_count(struct scatterlist *sg_list, int nbytes, __sg_count() argument
65 while (nbytes > 0) { __sg_count()
67 nbytes -= sg->length; __sg_count()
77 static inline int sg_count(struct scatterlist *sg_list, int nbytes, sg_count() argument
80 int sg_nents = __sg_count(sg_list, nbytes, chained); sg_count()
H A Dcaamhash.c786 int in_len = *buflen + req->nbytes, to_hash; ahash_update_ctx()
800 src_nents = __sg_count(req->src, req->nbytes - (*next_buflen), ahash_update_ctx()
883 req->nbytes, 0); ahash_update_ctx()
1003 src_nents = __sg_count(req->src, req->nbytes, &chained); ahash_finup_ctx()
1046 buflen + req->nbytes, LDST_SGF); ahash_finup_ctx()
1089 src_nents = sg_count(req->src, req->nbytes, &chained); ahash_digest()
1125 append_seq_in_ptr(desc, src_dma, req->nbytes, options); ahash_digest()
1227 int in_len = *buflen + req->nbytes, to_hash; ahash_update_no_ctx()
1240 src_nents = __sg_count(req->src, req->nbytes - (*next_buflen), ahash_update_no_ctx()
1313 req->nbytes, 0); ahash_update_no_ctx()
1350 src_nents = __sg_count(req->src, req->nbytes, &chained); ahash_finup_no_ctx()
1388 req->nbytes, LDST_SGF); ahash_finup_no_ctx()
1436 *next_buflen = req->nbytes & (crypto_tfm_alg_blocksize(&ahash->base) - ahash_update_first()
1438 to_hash = req->nbytes - *next_buflen; ahash_update_first()
1441 src_nents = sg_count(req->src, req->nbytes - (*next_buflen), ahash_update_first()
1522 req->nbytes, 0); ahash_update_first()
/linux-4.1.27/drivers/pci/
H A Dproc.c27 size_t nbytes, loff_t *ppos) proc_bus_pci_read()
48 if (nbytes >= size) proc_bus_pci_read()
49 nbytes = size; proc_bus_pci_read()
50 if (pos + nbytes > size) proc_bus_pci_read()
51 nbytes = size - pos; proc_bus_pci_read()
52 cnt = nbytes; proc_bus_pci_read()
107 return nbytes; proc_bus_pci_read()
111 size_t nbytes, loff_t *ppos) proc_bus_pci_write()
121 if (nbytes >= size) proc_bus_pci_write()
122 nbytes = size; proc_bus_pci_write()
123 if (pos + nbytes > size) proc_bus_pci_write()
124 nbytes = size - pos; proc_bus_pci_write()
125 cnt = nbytes; proc_bus_pci_write()
181 return nbytes; proc_bus_pci_write()
26 proc_bus_pci_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) proc_bus_pci_read() argument
110 proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) proc_bus_pci_write() argument
/linux-4.1.27/tools/usb/
H A Dffs-test.c288 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes);
289 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes);
290 static ssize_t ep0_consume(struct thread *t, const void *buf, size_t nbytes);
291 static ssize_t fill_in_buf(struct thread *t, void *buf, size_t nbytes);
292 static ssize_t empty_out_buf(struct thread *t, const void *buf, size_t nbytes);
435 static ssize_t read_wrap(struct thread *t, void *buf, size_t nbytes) read_wrap() argument
437 return read(t->fd, buf, nbytes); read_wrap()
440 static ssize_t write_wrap(struct thread *t, const void *buf, size_t nbytes) write_wrap() argument
442 return write(t->fd, buf, nbytes); write_wrap()
453 fill_in_buf(struct thread *ignore, void *buf, size_t nbytes) fill_in_buf() argument
462 memset(buf, 0, nbytes); fill_in_buf()
466 for (p = buf, i = 0; i < nbytes; ++i, ++p) fill_in_buf()
471 return fread(buf, 1, nbytes, stdin); fill_in_buf()
474 return nbytes; fill_in_buf()
478 empty_out_buf(struct thread *ignore, const void *buf, size_t nbytes) empty_out_buf() argument
490 for (p = buf, len = 0; len < nbytes; ++p, ++len) empty_out_buf()
496 for (p = buf, len = 0; len < nbytes; ++p, ++len) empty_out_buf()
504 ret = fwrite(buf, nbytes, 1, stdout); empty_out_buf()
512 for (p = buf, len = 0; len < nbytes; ++p, ++len) { empty_out_buf()
540 ep0_consume(struct thread *ignore, const void *buf, size_t nbytes) ep0_consume() argument
557 for (n = nbytes / sizeof *event; n; --n, ++event) ep0_consume()
575 return nbytes; ep0_consume()
/linux-4.1.27/drivers/macintosh/
H A Dvia-pmu68k.c286 for (i = 0; i < req->nbytes - 1; ++i) pmu_send_request()
288 --req->nbytes; pmu_send_request()
299 if (req->nbytes != 2) pmu_send_request()
302 req->nbytes = 1; pmu_send_request()
310 if (req->nbytes != 6) pmu_send_request()
313 req->nbytes = 5; pmu_send_request()
323 if (req->nbytes != 4) pmu_send_request()
328 req->nbytes = 3; pmu_send_request()
336 if (req->nbytes != 5) pmu_send_request()
342 req->nbytes = 4; pmu_send_request()
352 for (i = req->nbytes - 1; i > 1; --i) pmu_send_request()
354 req->data[3] = req->nbytes - 2; pmu_send_request()
358 req->nbytes += 2; pmu_send_request()
413 req.nbytes = 5; pmu_reset_bus()
448 int nbytes, ...) pmu_request()
453 if (nbytes < 0 || nbytes > 32) { pmu_request()
454 printk(KERN_ERR "pmu_request: bad nbytes (%d)\n", nbytes); pmu_request()
458 req->nbytes = nbytes; pmu_request()
460 va_start(list, nbytes); pmu_request()
461 for (i = 0; i < nbytes; ++i) pmu_request()
479 if (req->nbytes <= 0) { pmu_queue_request()
484 if (nsend >= 0 && req->nbytes != nsend + 1) { pmu_queue_request()
604 data_len = req->nbytes - 1; pmu_interrupt()
447 pmu_request(struct adb_request *req, void (*done)(struct adb_request *), int nbytes, ...) pmu_request() argument
H A Dadb-iop.c177 printk("adb_iop_start %p: sending packet, %d bytes:", req, req->nbytes); adb_iop_start()
178 for (i = 0 ; i < req->nbytes ; i++) adb_iop_start()
187 amsg.count = req->nbytes - 2; adb_iop_start()
191 memcpy(&amsg.cmd, req->data + 1, req->nbytes - 1); adb_iop_start()
234 if ((req->nbytes < 2) || (req->data[0] != ADB_PACKET)) { adb_iop_write()
275 .nbytes = 2, adb_iop_reset_bus()
H A Dvia-cuda.c104 void (*done)(struct adb_request *), int nbytes, ...);
363 int nbytes, ...) cuda_request()
373 req->nbytes = nbytes; cuda_request()
375 va_start(list, nbytes); cuda_request()
376 for (i = 0; i < nbytes; ++i) cuda_request()
389 if (req->nbytes < 2 || req->data[0] > CUDA_PACKET) { cuda_write()
521 if (data_index >= req->nbytes) { cuda_interrupt()
362 cuda_request(struct adb_request *req, void (*done)(struct adb_request *), int nbytes, ...) cuda_request() argument
H A Dvia-maciisi.c245 for (i = 0; i < req->nbytes; i++) { maciisi_send_request()
297 int nbytes, ...) maciisi_request()
302 req->nbytes = nbytes; maciisi_request()
305 va_start(list, nbytes); maciisi_request()
306 for (i = 0; i < nbytes; i++) maciisi_request()
322 if (req->nbytes < 2 || req->data[0] > CUDA_PACKET) { maciisi_write()
512 if (data_index >= req->nbytes) { maciisi_interrupt()
296 maciisi_request(struct adb_request *req, void (*done)(struct adb_request *), int nbytes, ...) maciisi_request() argument
H A Dmacio-adb.c174 for (i = 0; i < req->nbytes - 1; ++i) macio_send_request()
176 --req->nbytes; macio_send_request()
216 for (i = 0; i < req->nbytes; ++i) macio_adb_interrupt()
218 out_8(&adb->dcount.r, req->nbytes & HMB); macio_adb_interrupt()
H A Dvia-pmu.c975 for (i = 0; i < req->nbytes - 1; ++i) pmu_send_request()
977 --req->nbytes; pmu_send_request()
988 if (req->nbytes != 2) pmu_send_request()
991 req->nbytes = 1; pmu_send_request()
999 if (req->nbytes != 6) pmu_send_request()
1002 req->nbytes = 5; pmu_send_request()
1016 for (i = req->nbytes - 1; i > 1; --i) pmu_send_request()
1018 req->data[3] = req->nbytes - 2; pmu_send_request()
1022 req->nbytes += 2; pmu_send_request()
1079 req.nbytes = 4; pmu_adb_reset_bus()
1104 int nbytes, ...) pmu_request()
1112 if (nbytes < 0 || nbytes > 32) { pmu_request()
1113 printk(KERN_ERR "pmu_request: bad nbytes (%d)\n", nbytes); pmu_request()
1117 req->nbytes = nbytes; pmu_request()
1119 va_start(list, nbytes); pmu_request()
1120 for (i = 0; i < nbytes; ++i) pmu_request()
1138 if (req->nbytes <= 0) { pmu_queue_request()
1143 if (nsend >= 0 && req->nbytes != nsend + 1) { pmu_queue_request()
1477 data_len = req->nbytes - 1; pmu_sr_intr()
2467 if (l >= 0 && req->nbytes != l + 1) pmu_polled_request()
2478 l = req->nbytes - 1; pmu_polled_request()
2505 req.nbytes = 4; pmu_blink()
2516 req.nbytes = 4; pmu_blink()
1103 pmu_request(struct adb_request *req, void (*done)(struct adb_request *), int nbytes, ...) pmu_request() argument
H A Dadb.c425 int flags, int nbytes, ...) adb_request()
434 if (nbytes < 1) adb_request()
437 req->nbytes = nbytes+1; adb_request()
441 va_start(list, nbytes); adb_request()
442 for (i = 0; i < nbytes; ++i) adb_request()
653 if (req->nbytes < 3) do_adb_query()
796 req->nbytes = count; adb_write()
424 adb_request(struct adb_request *req, void (*done)(struct adb_request *), int flags, int nbytes, ...) adb_request() argument
H A Dvia-macii.c258 if (req->nbytes < 2 || req->data[0] != ADB_PACKET || req->nbytes > 15) { macii_write()
354 * And req->nbytes is the number of bytes of real data plus one. macii_start()
435 if (data_index >= req->nbytes) { macii_interrupt()
/linux-4.1.27/drivers/crypto/qce/
H A Dsha.c70 req->nbytes = rctx->nbytes_orig; qce_ahash_done()
95 rctx->src_nents = qce_countsg(req->src, req->nbytes, qce_ahash_async_req_handle()
242 unsigned int nbytes; qce_ahash_update() local
246 rctx->count += req->nbytes; qce_ahash_update()
249 total = req->nbytes + rctx->buflen; qce_ahash_update()
253 0, req->nbytes, 0); qce_ahash_update()
254 rctx->buflen += req->nbytes; qce_ahash_update()
260 rctx->nbytes_orig = req->nbytes; qce_ahash_update()
272 unsigned int src_offset = req->nbytes - hash_later; qce_ahash_update()
277 /* here nbytes is multiple of blocksize */ qce_ahash_update()
278 nbytes = total - hash_later; qce_ahash_update()
283 while (len < nbytes && sg) { qce_ahash_update()
284 if (len + sg_dma_len(sg) > nbytes) qce_ahash_update()
303 req->nbytes = nbytes; qce_ahash_update()
321 rctx->nbytes_orig = req->nbytes; qce_ahash_final()
327 req->nbytes = rctx->buflen; qce_ahash_final()
344 rctx->nbytes_orig = req->nbytes; qce_ahash_digest()
H A Ddma.c90 int qce_countsg(struct scatterlist *sglist, int nbytes, bool *chained) qce_countsg() argument
98 while (nbytes > 0 && sg) { qce_countsg()
100 nbytes -= sg->length; qce_countsg()
H A Ddma.h52 int qce_countsg(struct scatterlist *sg_list, int nbytes, bool *chained);
H A Dablkcipher.c77 rctx->cryptlen = req->nbytes; qce_ablkcipher_async_req_handle()
83 rctx->src_nents = qce_countsg(req->src, req->nbytes, qce_ablkcipher_async_req_handle()
86 rctx->dst_nents = qce_countsg(req->dst, req->nbytes, qce_ablkcipher_async_req_handle()
142 ret = qce_start(async_req, tmpl->crypto_alg_type, req->nbytes, 0); qce_ablkcipher_async_req_handle()
H A Dcommon.c246 if (!rctx->last_blk && req->nbytes % blocksize) qce_setup_regs_ahash()
301 qce_write(qce, REG_AUTH_SEG_SIZE, req->nbytes); qce_setup_regs_ahash()
304 qce_write(qce, REG_SEG_SIZE, req->nbytes); qce_setup_regs_ahash()
/linux-4.1.27/arch/x86/include/asm/
H A Dinsn.h33 unsigned char nbytes; member in struct:insn_field
145 if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ insn_vex_m_bits()
153 if (insn->vex_prefix.nbytes == 2) /* 2 bytes VEX */ insn_vex_p_bits()
174 return insn->prefixes.nbytes; insn_offset_rex_prefix()
178 return insn_offset_rex_prefix(insn) + insn->rex_prefix.nbytes; insn_offset_vex_prefix()
182 return insn_offset_vex_prefix(insn) + insn->vex_prefix.nbytes; insn_offset_opcode()
186 return insn_offset_opcode(insn) + insn->opcode.nbytes; insn_offset_modrm()
190 return insn_offset_modrm(insn) + insn->modrm.nbytes; insn_offset_sib()
194 return insn_offset_sib(insn) + insn->sib.nbytes; insn_offset_displacement()
198 return insn_offset_displacement(insn) + insn->displacement.nbytes; insn_offset_immediate()
/linux-4.1.27/drivers/staging/rtl8192e/rtl8192e/
H A Drtl_crypto.h146 unsigned int nbytes);
150 unsigned int nbytes, u8 *iv);
154 unsigned int nbytes);
158 unsigned int nbytes, u8 *iv);
317 unsigned int nbytes) crypto_cipher_encrypt()
320 return tfm->crt_cipher.cit_encrypt(tfm, dst, src, nbytes); crypto_cipher_encrypt()
326 unsigned int nbytes, u8 *iv) crypto_cipher_encrypt_iv()
330 return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); crypto_cipher_encrypt_iv()
336 unsigned int nbytes) crypto_cipher_decrypt()
339 return tfm->crt_cipher.cit_decrypt(tfm, dst, src, nbytes); crypto_cipher_decrypt()
345 unsigned int nbytes, u8 *iv) crypto_cipher_decrypt_iv()
349 return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); crypto_cipher_decrypt_iv()
314 crypto_cipher_encrypt(struct crypto_tfm *tfm, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_cipher_encrypt() argument
323 crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, u8 *iv) crypto_cipher_encrypt_iv() argument
333 crypto_cipher_decrypt(struct crypto_tfm *tfm, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) crypto_cipher_decrypt() argument
342 crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes, u8 *iv) crypto_cipher_decrypt_iv() argument
/linux-4.1.27/drivers/staging/unisys/visorchannel/
H A Dvisorchannel.h50 void *local, ulong nbytes);
52 void *local, ulong nbytes);
54 u8 ch, ulong nbytes);
H A Dvisorchannel_funcs.c222 void *local, ulong nbytes) visorchannel_read()
225 local, nbytes); visorchannel_read()
227 (nbytes >= sizeof(struct channel_header))) { visorchannel_read()
237 void *local, ulong nbytes) visorchannel_write()
239 if (offset == 0 && nbytes >= sizeof(struct channel_header)) visorchannel_write()
242 return visor_memregion_write(channel->memregion, offset, local, nbytes); visorchannel_write()
248 ulong nbytes) visorchannel_clear()
259 while (nbytes > 0) { visorchannel_clear()
263 if (nbytes < thisbytes) visorchannel_clear()
264 thisbytes = nbytes; visorchannel_clear()
272 nbytes -= thisbytes; visorchannel_clear()
556 ulong nbytes = 0, nbytes_region = 0; visorchannel_debug() local
584 nbytes = (ulong)(phdr->size); visorchannel_debug()
586 addr + off, nbytes, nbytes_region); visorchannel_debug()
626 addr + off, nbytes); visorchannel_debug()
221 visorchannel_read(struct visorchannel *channel, ulong offset, void *local, ulong nbytes) visorchannel_read() argument
236 visorchannel_write(struct visorchannel *channel, ulong offset, void *local, ulong nbytes) visorchannel_write() argument
247 visorchannel_clear(struct visorchannel *channel, ulong offset, u8 ch, ulong nbytes) visorchannel_clear() argument
/linux-4.1.27/drivers/crypto/ccp/
H A Dccp-crypto-aes-cmac.c39 unsigned int offset = rctx->nbytes - rctx->hash_rem; ccp_aes_cmac_complete()
58 static int ccp_do_cmac_update(struct ahash_request *req, unsigned int nbytes, ccp_do_cmac_update() argument
75 if (nbytes) ccp_do_cmac_update()
78 len = (u64)rctx->buf_count + (u64)nbytes; ccp_do_cmac_update()
82 0, nbytes, 0); ccp_do_cmac_update()
83 rctx->buf_count += nbytes; ccp_do_cmac_update()
89 rctx->nbytes = nbytes; ccp_do_cmac_update()
110 sg_count = (nbytes) ? sg_nents(req->src) + 2 : 2; ccp_do_cmac_update()
123 if (nbytes) ccp_do_cmac_update()
181 return ccp_do_cmac_update(req, req->nbytes, 0); ccp_aes_cmac_update()
191 return ccp_do_cmac_update(req, req->nbytes, 1); ccp_aes_cmac_finup()
H A Dccp-crypto-sha.c38 unsigned int offset = rctx->nbytes - rctx->hash_rem; ccp_sha_complete()
57 static int ccp_do_sha_update(struct ahash_request *req, unsigned int nbytes, ccp_do_sha_update() argument
71 len = (u64)rctx->buf_count + (u64)nbytes; ccp_do_sha_update()
75 0, nbytes, 0); ccp_do_sha_update()
76 rctx->buf_count += nbytes; ccp_do_sha_update()
82 rctx->nbytes = nbytes; ccp_do_sha_update()
97 if (rctx->buf_count && nbytes) { ccp_do_sha_update()
118 } else if (nbytes) { ccp_do_sha_update()
173 return ccp_do_sha_update(req, req->nbytes, 0); ccp_sha_update()
183 return ccp_do_sha_update(req, req->nbytes, 1); ccp_sha_finup()
H A Dccp-crypto-aes-xts.c131 if (req->nbytes & (AES_BLOCK_SIZE - 1)) ccp_aes_xts_crypt()
138 if (req->nbytes <= unit_size_map[0].size) { ccp_aes_xts_crypt()
140 if (!(req->nbytes & (unit_size_map[unit].size - 1))) { ccp_aes_xts_crypt()
174 rctx->cmd.u.xts.src_len = req->nbytes; ccp_aes_xts_crypt()
H A Dccp-crypto.h111 unsigned int nbytes; member in struct:ccp_aes_cmac_req_ctx
165 unsigned int nbytes; member in struct:ccp_sha_req_ctx
H A Dccp-ops.c522 unsigned int nbytes = min_t(u64, len, wa->bytes_left); ccp_update_sg_workarea() local
527 wa->sg_used += nbytes; ccp_update_sg_workarea()
528 wa->bytes_left -= nbytes; ccp_update_sg_workarea()
618 unsigned int nbytes, sg_offset, dm_offset, ksb_len, i; ccp_reverse_set_dm_area() local
625 nbytes = len; ccp_reverse_set_dm_area()
626 while (nbytes) { ccp_reverse_set_dm_area()
627 ksb_len = min_t(unsigned int, nbytes, se_len); ccp_reverse_set_dm_area()
635 nbytes -= ksb_len; ccp_reverse_set_dm_area()
650 unsigned int nbytes, sg_offset, dm_offset, ksb_len, i; ccp_reverse_get_dm_area() local
655 nbytes = len; ccp_reverse_get_dm_area()
656 while (nbytes) { ccp_reverse_get_dm_area()
657 ksb_len = min_t(unsigned int, nbytes, sizeof(buffer)); ccp_reverse_get_dm_area()
665 nbytes -= ksb_len; ccp_reverse_get_dm_area()
705 unsigned int buf_count, nbytes; ccp_queue_buf() local
715 * nbytes will always be <= UINT_MAX because dm_wa->length is ccp_queue_buf()
718 nbytes = min_t(u64, sg_wa->bytes_left, dm_wa->length); ccp_queue_buf()
720 nbytes, from); ccp_queue_buf()
725 nbytes = min(sg_wa->sg->length - sg_wa->sg_used, ccp_queue_buf()
727 nbytes = min_t(u64, sg_wa->bytes_left, nbytes); ccp_queue_buf()
729 buf_count += nbytes; ccp_queue_buf()
730 ccp_update_sg_workarea(sg_wa, nbytes); ccp_queue_buf()
H A Dccp-crypto-aes.c84 (req->nbytes & (AES_BLOCK_SIZE - 1))) ccp_aes_crypt()
109 rctx->cmd.u.aes.src_len = req->nbytes; ccp_aes_crypt()
/linux-4.1.27/lib/
H A Dcrc8.c71 * nbytes: number of bytes in data buffer.
74 u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc) crc8() argument
77 while (nbytes-- > 0) crc8()
/linux-4.1.27/drivers/media/usb/uvc/
H A Duvc_isight.c48 unsigned int maxlen, nbytes; isight_decode() local
88 nbytes = min(len, maxlen); isight_decode()
89 memcpy(mem, data, nbytes); isight_decode()
90 buf->bytesused += nbytes; isight_decode()
H A Duvc_debugfs.c48 size_t nbytes, loff_t *ppos) uvc_debugfs_stats_read()
52 return simple_read_from_buffer(user_buf, nbytes, ppos, buf->data, uvc_debugfs_stats_read()
47 uvc_debugfs_stats_read(struct file *file, char __user *user_buf, size_t nbytes, loff_t *ppos) uvc_debugfs_stats_read() argument
/linux-4.1.27/drivers/crypto/amcc/
H A Dcrypto4xx_core.c485 u32 *idx, u32 *offset, u32 *nbytes) crypto4xx_fill_one_page()
496 *nbytes -= dev->scatter_buffer_size; crypto4xx_fill_one_page()
512 *nbytes -= *length; crypto4xx_fill_one_page()
515 *nbytes -= *length; crypto4xx_fill_one_page()
521 len = (*nbytes <= dev->scatter_buffer_size) ? crypto4xx_fill_one_page()
522 (*nbytes) : dev->scatter_buffer_size; crypto4xx_fill_one_page()
528 *nbytes -= len; crypto4xx_fill_one_page()
542 u32 nbytes, crypto4xx_copy_pkt_to_dst()
557 while (nbytes) { crypto4xx_copy_pkt_to_dst()
564 len = (nbytes <= sg->length) ? nbytes : sg->length; crypto4xx_copy_pkt_to_dst()
566 &this_sd, &offset, &nbytes)) crypto4xx_copy_pkt_to_dst()
568 if (!nbytes) crypto4xx_copy_pkt_to_dst()
572 len = (nbytes <= (dev->scatter_buffer_size - offset)) ? crypto4xx_copy_pkt_to_dst()
573 nbytes : (dev->scatter_buffer_size - offset); crypto4xx_copy_pkt_to_dst()
576 &this_sd, &offset, &nbytes)) crypto4xx_copy_pkt_to_dst()
578 if (!nbytes) crypto4xx_copy_pkt_to_dst()
584 &sg_len, &this_sd, &offset, &nbytes)) crypto4xx_copy_pkt_to_dst()
639 crypto4xx_copy_pkt_to_dst(dev, pd, pd_uinfo, ablk_req->nbytes, crypto4xx_ablkcipher_done()
747 static int get_sg_count(struct scatterlist *sg_list, int nbytes) get_sg_count() argument
752 while (nbytes) { get_sg_count()
754 if (sg->length > nbytes) get_sg_count()
756 nbytes -= sg->length; get_sg_count()
798 unsigned int nbytes = datalen, idx; crypto4xx_build_pd() local
897 while (nbytes) { crypto4xx_build_pd()
905 if (sg->length >= nbytes) crypto4xx_build_pd()
907 nbytes -= sg->length; crypto4xx_build_pd()
945 nbytes = datalen; crypto4xx_build_pd()
958 if (nbytes >= PPC4XX_SD_BUFFER_SIZE) crypto4xx_build_pd()
959 nbytes -= PPC4XX_SD_BUFFER_SIZE; crypto4xx_build_pd()
961 nbytes = 0; crypto4xx_build_pd()
962 while (nbytes) { crypto4xx_build_pd()
968 if (nbytes >= PPC4XX_SD_BUFFER_SIZE) crypto4xx_build_pd()
969 nbytes -= PPC4XX_SD_BUFFER_SIZE; crypto4xx_build_pd()
973 * which is more than nbytes, so done. crypto4xx_build_pd()
975 nbytes = 0; crypto4xx_build_pd()
483 crypto4xx_fill_one_page(struct crypto4xx_device *dev, dma_addr_t *addr, u32 *length, u32 *idx, u32 *offset, u32 *nbytes) crypto4xx_fill_one_page() argument
539 crypto4xx_copy_pkt_to_dst(struct crypto4xx_device *dev, struct ce_pd *pd, struct pd_uinfo *pd_uinfo, u32 nbytes, struct scatterlist *dst) crypto4xx_copy_pkt_to_dst() argument
H A Dcrypto4xx_alg.c83 req->nbytes, req->info, crypto4xx_encrypt()
97 req->nbytes, req->info, crypto4xx_decrypt()
265 req->nbytes, NULL, 0); crypto4xx_hash_update()
283 req->nbytes, NULL, 0); crypto4xx_hash_digest()
/linux-4.1.27/drivers/char/
H A Drandom.c104 * void get_random_bytes(void *buf, int nbytes);
490 int nbytes) _mix_pool_bytes()
508 while (nbytes--) { _mix_pool_bytes()
537 int nbytes) __mix_pool_bytes()
539 trace_mix_pool_bytes_nolock(r->name, nbytes, _RET_IP_); __mix_pool_bytes()
540 _mix_pool_bytes(r, in, nbytes); __mix_pool_bytes()
544 int nbytes) mix_pool_bytes()
548 trace_mix_pool_bytes(r->name, nbytes, _RET_IP_); mix_pool_bytes()
550 _mix_pool_bytes(r, in, nbytes); mix_pool_bytes()
948 size_t nbytes, int min, int rsvd);
955 static void _xfer_secondary_pool(struct entropy_store *r, size_t nbytes); xfer_secondary_pool()
956 static void xfer_secondary_pool(struct entropy_store *r, size_t nbytes) xfer_secondary_pool() argument
959 r->entropy_count >= (nbytes << (ENTROPY_SHIFT + 3)) || xfer_secondary_pool()
972 _xfer_secondary_pool(r, nbytes); xfer_secondary_pool()
975 static void _xfer_secondary_pool(struct entropy_store *r, size_t nbytes) _xfer_secondary_pool() argument
981 int bytes = nbytes; _xfer_secondary_pool()
988 trace_xfer_secondary_pool(r->name, bytes * 8, nbytes * 8, _xfer_secondary_pool()
1016 static size_t account(struct entropy_store *r, size_t nbytes, int min, account() argument
1027 ibytes = nbytes; account()
1134 size_t nbytes, int min, int reserved) extract_entropy()
1156 trace_extract_entropy(r->name, nbytes, ENTROPY_BITS(r), _RET_IP_); extract_entropy()
1157 xfer_secondary_pool(r, nbytes); extract_entropy()
1158 nbytes = account(r, nbytes, min, reserved); extract_entropy()
1160 while (nbytes) { extract_entropy()
1170 i = min_t(int, nbytes, EXTRACT_SIZE); extract_entropy()
1172 nbytes -= i; extract_entropy()
1188 size_t nbytes) extract_entropy_user()
1192 int large_request = (nbytes > 256); extract_entropy_user()
1194 trace_extract_entropy_user(r->name, nbytes, ENTROPY_BITS(r), _RET_IP_); extract_entropy_user()
1195 xfer_secondary_pool(r, nbytes); extract_entropy_user()
1196 nbytes = account(r, nbytes, 0, 0); extract_entropy_user()
1198 while (nbytes) { extract_entropy_user()
1209 i = min_t(int, nbytes, EXTRACT_SIZE); extract_entropy_user()
1215 nbytes -= i; extract_entropy_user()
1233 void get_random_bytes(void *buf, int nbytes) get_random_bytes() argument
1242 trace_get_random_bytes(nbytes, _RET_IP_); get_random_bytes()
1243 extract_entropy(&nonblocking_pool, buf, nbytes, 0, 0); get_random_bytes()
1257 void get_random_bytes_arch(void *buf, int nbytes) get_random_bytes_arch() argument
1261 trace_get_random_bytes_arch(nbytes, _RET_IP_); get_random_bytes_arch()
1262 while (nbytes) { get_random_bytes_arch()
1264 int chunk = min(nbytes, (int)sizeof(unsigned long)); get_random_bytes_arch()
1271 nbytes -= chunk; get_random_bytes_arch()
1274 if (nbytes) get_random_bytes_arch()
1275 extract_entropy(&nonblocking_pool, p, nbytes, 0, 0); get_random_bytes_arch()
1343 _random_read(int nonblock, char __user *buf, size_t nbytes) _random_read() argument
1347 if (nbytes == 0) _random_read()
1350 nbytes = min_t(size_t, nbytes, SEC_XFER_SIZE); _random_read()
1352 n = extract_entropy_user(&blocking_pool, buf, nbytes); _random_read()
1355 trace_random_read(n*8, (nbytes-n)*8, _random_read()
1374 random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) random_read() argument
1376 return _random_read(file->f_flags & O_NONBLOCK, buf, nbytes); random_read()
1380 urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) urandom_read() argument
1389 nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3)); urandom_read()
1390 ret = extract_entropy_user(&nonblocking_pool, buf, nbytes); urandom_read()
1392 trace_urandom_read(8 * nbytes, ENTROPY_BITS(&nonblocking_pool), urandom_read()
489 _mix_pool_bytes(struct entropy_store *r, const void *in, int nbytes) _mix_pool_bytes() argument
536 __mix_pool_bytes(struct entropy_store *r, const void *in, int nbytes) __mix_pool_bytes() argument
543 mix_pool_bytes(struct entropy_store *r, const void *in, int nbytes) mix_pool_bytes() argument
1133 extract_entropy(struct entropy_store *r, void *buf, size_t nbytes, int min, int reserved) extract_entropy() argument
1187 extract_entropy_user(struct entropy_store *r, void __user *buf, size_t nbytes) extract_entropy_user() argument
/linux-4.1.27/drivers/usb/mon/
H A Dmon_stat.c45 size_t nbytes, loff_t *ppos) mon_stat_read()
49 return simple_read_from_buffer(buf, nbytes, ppos, sp->str, sp->slen); mon_stat_read()
44 mon_stat_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) mon_stat_read() argument
H A Dmon_bin.c735 void __user *data, unsigned int nbytes) mon_bin_get_event()
757 step_len = min(ep->len_cap, nbytes); mon_bin_get_event()
797 size_t nbytes, loff_t *ppos) mon_bin_read()
819 step_len = min(nbytes, (size_t)(hdrbytes - rp->b_read)); mon_bin_read()
825 nbytes -= step_len; mon_bin_read()
834 if (step_len > nbytes) mon_bin_read()
835 step_len = nbytes; mon_bin_read()
844 nbytes -= step_len; mon_bin_read()
733 mon_bin_get_event(struct file *file, struct mon_reader_bin *rp, struct mon_bin_hdr __user *hdr, unsigned int hdrbytes, void __user *data, unsigned int nbytes) mon_bin_get_event() argument
796 mon_bin_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) mon_bin_read() argument
/linux-4.1.27/arch/nios2/lib/
H A Dmemcpy.c35 #define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \
37 size_t __nbytes = (nbytes); \
53 #define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \
56 _wordcopy_fwd_aligned(dst_bp, src_bp, (nbytes) / OPSIZ);\
58 _wordcopy_fwd_dest_aligned(dst_bp, src_bp, (nbytes) / OPSIZ);\
59 src_bp += (nbytes) & -OPSIZ; \
60 dst_bp += (nbytes) & -OPSIZ; \
61 (nbytes_left) = (nbytes) % OPSIZ; \
/linux-4.1.27/net/sunrpc/
H A Dxdr.c51 * @nbytes: size of data.
53 * Copy the array of data of length nbytes at ptr to the XDR buffer
61 __be32 *xdr_encode_opaque_fixed(__be32 *p, const void *ptr, unsigned int nbytes) xdr_encode_opaque_fixed() argument
63 if (likely(nbytes != 0)) { xdr_encode_opaque_fixed()
64 unsigned int quadlen = XDR_QUADLEN(nbytes); xdr_encode_opaque_fixed()
65 unsigned int padding = (quadlen << 2) - nbytes; xdr_encode_opaque_fixed()
68 memcpy(p, ptr, nbytes); xdr_encode_opaque_fixed()
70 memset((char *)p + nbytes, 0, padding); xdr_encode_opaque_fixed()
81 * @nbytes: size of data.
85 __be32 *xdr_encode_opaque(__be32 *p, const void *ptr, unsigned int nbytes) xdr_encode_opaque() argument
87 *p++ = cpu_to_be32(nbytes); xdr_encode_opaque()
88 return xdr_encode_opaque_fixed(p, ptr, nbytes); xdr_encode_opaque()
513 size_t nbytes) xdr_get_next_encode_buffer()
519 if (nbytes > PAGE_SIZE) xdr_get_next_encode_buffer()
521 if (xdr->buf->len + nbytes > xdr->buf->buflen) xdr_get_next_encode_buffer()
524 frag2bytes = nbytes - frag1bytes; xdr_get_next_encode_buffer()
549 xdr->buf->len += nbytes; xdr_get_next_encode_buffer()
556 * @nbytes: number of bytes to reserve
558 * Checks that we have enough buffer space to encode 'nbytes' more
562 __be32 * xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes) xdr_reserve_space() argument
568 /* align nbytes on the next 32-bit boundary */ xdr_reserve_space()
569 nbytes += 3; xdr_reserve_space()
570 nbytes &= ~3; xdr_reserve_space()
571 q = p + (nbytes >> 2); xdr_reserve_space()
573 return xdr_get_next_encode_buffer(xdr, nbytes); xdr_reserve_space()
576 xdr->iov->iov_len += nbytes; xdr_reserve_space()
578 xdr->buf->page_len += nbytes; xdr_reserve_space()
579 xdr->buf->len += nbytes; xdr_reserve_space()
826 static __be32 * __xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) __xdr_inline_decode() argument
828 unsigned int nwords = XDR_QUADLEN(nbytes); __xdr_inline_decode()
857 static __be32 *xdr_copy_to_scratch(struct xdr_stream *xdr, size_t nbytes) xdr_copy_to_scratch() argument
863 if (nbytes > xdr->scratch.iov_len) xdr_copy_to_scratch()
867 nbytes -= cplen; xdr_copy_to_scratch()
870 p = __xdr_inline_decode(xdr, nbytes); xdr_copy_to_scratch()
873 memcpy(cpdest, p, nbytes); xdr_copy_to_scratch()
880 * @nbytes: number of bytes of data to decode
883 * 'nbytes' more bytes of data starting at the current position.
887 __be32 * xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes) xdr_inline_decode() argument
891 if (nbytes == 0) xdr_inline_decode()
895 p = __xdr_inline_decode(xdr, nbytes); xdr_inline_decode()
898 return xdr_copy_to_scratch(xdr, nbytes); xdr_inline_decode()
512 xdr_get_next_encode_buffer(struct xdr_stream *xdr, size_t nbytes) xdr_get_next_encode_buffer() argument
/linux-4.1.27/arch/alpha/boot/
H A Dmain.c155 int nbytes; start_kernel() local
178 nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval)); start_kernel()
179 if (nbytes < 0) { start_kernel()
180 nbytes = 0; start_kernel()
182 envval[nbytes] = '\0'; start_kernel()
H A Dbootp.c148 static long nbytes; start_kernel() local
179 nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval)); start_kernel()
180 if (nbytes < 0 || nbytes >= sizeof(envval)) { start_kernel()
181 nbytes = 0; start_kernel()
183 envval[nbytes] = '\0'; start_kernel()
H A Dbootpz.c288 static long nbytes; start_kernel() local
312 nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval)); start_kernel()
313 if (nbytes < 0 || nbytes >= sizeof(envval)) { start_kernel()
314 nbytes = 0; start_kernel()
316 envval[nbytes] = '\0'; start_kernel()
/linux-4.1.27/net/ipv4/
H A Dtcp_memcontrol.c116 char *buf, size_t nbytes, loff_t off) tcp_cgroup_write()
138 return ret ?: nbytes; tcp_cgroup_write()
179 char *buf, size_t nbytes, loff_t off) tcp_cgroup_reset()
187 return nbytes; tcp_cgroup_reset()
198 return nbytes; tcp_cgroup_reset()
115 tcp_cgroup_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) tcp_cgroup_write() argument
178 tcp_cgroup_reset(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) tcp_cgroup_reset() argument
/linux-4.1.27/drivers/net/ethernet/brocade/bna/
H A Dbnad_debugfs.c244 size_t nbytes, loff_t *pos) bnad_debugfs_read()
251 return simple_read_from_buffer(buf, nbytes, pos, bnad_debugfs_read()
290 size_t nbytes, loff_t *pos) bnad_debugfs_read_regrd()
299 rc = simple_read_from_buffer(buf, nbytes, pos, bnad_debugfs_read_regrd()
302 if ((*pos + nbytes) >= bnad->reglen) { bnad_debugfs_read_regrd()
313 size_t nbytes, loff_t *ppos) bnad_debugfs_write_regrd()
325 kern_buf = kzalloc(nbytes, GFP_KERNEL); bnad_debugfs_write_regrd()
329 if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) { bnad_debugfs_write_regrd()
376 return nbytes; bnad_debugfs_write_regrd()
381 size_t nbytes, loff_t *ppos) bnad_debugfs_write_regwr()
392 kern_buf = kzalloc(nbytes, GFP_KERNEL); bnad_debugfs_write_regwr()
396 if (copy_from_user(kern_buf, (void __user *)buf, nbytes)) { bnad_debugfs_write_regwr()
425 return nbytes; bnad_debugfs_write_regwr()
243 bnad_debugfs_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pos) bnad_debugfs_read() argument
289 bnad_debugfs_read_regrd(struct file *file, char __user *buf, size_t nbytes, loff_t *pos) bnad_debugfs_read_regrd() argument
312 bnad_debugfs_write_regrd(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) bnad_debugfs_write_regrd() argument
380 bnad_debugfs_write_regwr(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) bnad_debugfs_write_regwr() argument
/linux-4.1.27/drivers/i2c/busses/
H A Di2c-xlr.c136 int nbytes, timedout; xlr_i2c_rx() local
146 nbytes = 0; xlr_i2c_rx()
154 if (nbytes > len) xlr_i2c_rx()
157 /* we need to do a dummy datain when nbytes == len */ xlr_i2c_rx()
159 if (nbytes < len) xlr_i2c_rx()
160 buf[nbytes] = byte; xlr_i2c_rx()
161 nbytes++; xlr_i2c_rx()
/linux-4.1.27/arch/xtensa/platforms/iss/
H A Dsimdisk.c76 unsigned long nbytes = nsect << SECTOR_SHIFT; simdisk_transfer() local
78 if (offset > dev->size || dev->size - offset < nbytes) { simdisk_transfer()
80 write ? "write" : "read", offset, nbytes); simdisk_transfer()
85 while (nbytes > 0) { simdisk_transfer()
90 io = simc_write(dev->fd, buffer, nbytes); simdisk_transfer()
92 io = simc_read(dev->fd, buffer, nbytes); simdisk_transfer()
99 nbytes -= io; simdisk_transfer()
/linux-4.1.27/tools/usb/usbip/src/
H A Dusbip_network.c110 ssize_t nbytes; usbip_net_xmit() local
118 nbytes = send(sockfd, buff, bufflen, 0); usbip_net_xmit()
120 nbytes = recv(sockfd, buff, bufflen, MSG_WAITALL); usbip_net_xmit()
122 if (nbytes <= 0) usbip_net_xmit()
125 buff = (void *)((intptr_t) buff + nbytes); usbip_net_xmit()
126 bufflen -= nbytes; usbip_net_xmit()
127 total += nbytes; usbip_net_xmit()
/linux-4.1.27/drivers/scsi/bfa/
H A Dbfad_debugfs.c183 size_t nbytes, loff_t *pos) bfad_debugfs_read()
190 return simple_read_from_buffer(buf, nbytes, pos, bfad_debugfs_read()
226 size_t nbytes, loff_t *pos) bfad_debugfs_read_regrd()
236 rc = simple_read_from_buffer(buf, nbytes, pos, bfad_debugfs_read_regrd()
239 if ((*pos + nbytes) >= bfad->reglen) { bfad_debugfs_read_regrd()
250 size_t nbytes, loff_t *ppos) bfad_debugfs_write_regrd()
263 kern_buf = memdup_user(buf, nbytes); bfad_debugfs_write_regrd()
313 return nbytes; bfad_debugfs_write_regrd()
318 size_t nbytes, loff_t *ppos) bfad_debugfs_write_regwr()
330 kern_buf = memdup_user(buf, nbytes); bfad_debugfs_write_regwr()
360 return nbytes; bfad_debugfs_write_regwr()
182 bfad_debugfs_read(struct file *file, char __user *buf, size_t nbytes, loff_t *pos) bfad_debugfs_read() argument
225 bfad_debugfs_read_regrd(struct file *file, char __user *buf, size_t nbytes, loff_t *pos) bfad_debugfs_read_regrd() argument
249 bfad_debugfs_write_regrd(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) bfad_debugfs_write_regrd() argument
317 bfad_debugfs_write_regwr(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) bfad_debugfs_write_regwr() argument
/linux-4.1.27/fs/
H A Dsync.c232 * a file in the range offset .. (offset+nbytes-1) inclusive. If nbytes is
277 SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, SYSCALL_DEFINE4()
290 endbyte = offset + nbytes; SYSCALL_DEFINE4()
312 nbytes = 0; SYSCALL_DEFINE4()
316 if (nbytes == 0) SYSCALL_DEFINE4()
363 loff_t, offset, loff_t, nbytes) SYSCALL_DEFINE4()
365 return sys_sync_file_range(fd, offset, nbytes, flags); SYSCALL_DEFINE4()
/linux-4.1.27/arch/powerpc/kernel/
H A Dproc_powerpc.c37 static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes, page_map_read() argument
40 return simple_read_from_buffer(buf, nbytes, ppos, page_map_read()
H A Dsys_ppc32.c125 loff_t nbytes = ((loff_t)nbytes_hi << 32) | nbytes_lo; compat_sys_sync_file_range2() local
127 return sys_sync_file_range(fd, offset, nbytes, flags); compat_sys_sync_file_range2()
/linux-4.1.27/net/atm/
H A Dmpoa_proc.c51 size_t nbytes, loff_t *ppos);
207 size_t nbytes, loff_t *ppos) proc_mpc_write()
212 if (nbytes == 0) proc_mpc_write()
215 if (nbytes >= PAGE_SIZE) proc_mpc_write()
216 nbytes = PAGE_SIZE-1; proc_mpc_write()
222 for (p = page, len = 0; len < nbytes; p++, len++) { proc_mpc_write()
206 proc_mpc_write(struct file *file, const char __user *buff, size_t nbytes, loff_t *ppos) proc_mpc_write() argument
/linux-4.1.27/arch/x86/crypto/sha-mb/
H A Dsha1_mb.c382 int nbytes, err = 0; sha_finish_walk() local
388 nbytes = crypto_ahash_walk_done(&rctx->walk, 0); sha_finish_walk()
389 if (nbytes < 0) { sha_finish_walk()
390 err = nbytes; sha_finish_walk()
402 sha_ctx = sha1_ctx_mgr_submit(cstate->mgr, sha_ctx, rctx->walk.data, nbytes, flag); sha_finish_walk()
501 int ret = 0, nbytes; sha1_mb_update() local
513 nbytes = crypto_ahash_walk_first(req, &rctx->walk); sha1_mb_update()
515 if (nbytes < 0) { sha1_mb_update()
516 ret = nbytes; sha1_mb_update()
527 sha_ctx = sha1_ctx_mgr_submit(cstate->mgr, sha_ctx, rctx->walk.data, nbytes, HASH_UPDATE); sha1_mb_update()
560 int ret = 0, flag = HASH_UPDATE, nbytes; sha1_mb_finup() local
571 nbytes = crypto_ahash_walk_first(req, &rctx->walk); sha1_mb_finup()
573 if (nbytes < 0) { sha1_mb_finup()
574 ret = nbytes; sha1_mb_finup()
590 sha_ctx = sha1_ctx_mgr_submit(cstate->mgr, sha_ctx, rctx->walk.data, nbytes, flag); sha1_mb_finup()
/linux-4.1.27/drivers/scsi/lpfc/
H A Dlpfc_debugfs.c989 size_t nbytes, loff_t *ppos) lpfc_debugfs_dumpDataDif_write()
1007 return nbytes; lpfc_debugfs_dumpDataDif_write()
1012 size_t nbytes, loff_t *ppos) lpfc_debugfs_dif_err_read()
1048 return simple_read_from_buffer(buf, nbytes, ppos, &cbuf, cnt); lpfc_debugfs_dif_err_read()
1053 size_t nbytes, loff_t *ppos) lpfc_debugfs_dif_err_write()
1062 size = (nbytes < 32) ? nbytes : 32; lpfc_debugfs_dif_err_write()
1097 return nbytes; lpfc_debugfs_dif_err_write()
1176 * @nbytes: The number of bytes to read.
1181 * field of @file. It will start reading at @ppos and copy up to @nbytes of
1186 * than @nbytes if the end of the file was reached) or a negative error value.
1190 size_t nbytes, loff_t *ppos) lpfc_debugfs_read()
1194 return simple_read_from_buffer(buf, nbytes, ppos, debug->buffer, lpfc_debugfs_read()
1246 * @nbytes: The number of bytes in the user space buffer.
1256 static int lpfc_idiag_cmd_get(const char __user *buf, size_t nbytes, lpfc_idiag_cmd_get() argument
1265 if (!access_ok(VERIFY_READ, buf, nbytes)) lpfc_idiag_cmd_get()
1270 bsize = min(nbytes, (sizeof(mybuf)-1)); lpfc_idiag_cmd_get()
1396 * @nbytes: The number of bytes to read.
1408 * than @nbytes if the end of the file was reached) or a negative error value.
1411 lpfc_idiag_pcicfg_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_pcicfg_read() argument
1471 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_pcicfg_read()
1511 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_pcicfg_read()
1518 * @nbytes: The number of bytes to get.
1534 size_t nbytes, loff_t *ppos) lpfc_idiag_pcicfg_write()
1552 rc = lpfc_idiag_cmd_get(buf, nbytes, &idiag.cmd); lpfc_idiag_pcicfg_write()
1685 return nbytes; lpfc_idiag_pcicfg_write()
1695 * @nbytes: The number of bytes to read.
1704 * than @nbytes if the end of the file was reached) or a negative error value.
1707 lpfc_idiag_baracc_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_baracc_read() argument
1774 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_baracc_read()
1835 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_baracc_read()
1842 * @nbytes: The number of bytes to get.
1859 size_t nbytes, loff_t *ppos) lpfc_idiag_baracc_write()
1877 rc = lpfc_idiag_cmd_get(buf, nbytes, &idiag.cmd); lpfc_idiag_baracc_write()
1971 return nbytes; lpfc_idiag_baracc_write()
1981 * @nbytes: The number of bytes to read.
1990 * than @nbytes if the end of the file was reached) or a negative error value.
1993 lpfc_idiag_queinfo_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_queinfo_read() argument
2382 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queinfo_read()
2388 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queinfo_read()
2464 * @nbytes: The number of bytes to read.
2475 * than @nbytes if the end of the file was reached) or a negative error value.
2478 lpfc_idiag_queacc_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_queacc_read() argument
2513 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queacc_read()
2533 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_queacc_read()
2540 * @nbytes: The number of bytes to get.
2556 size_t nbytes, loff_t *ppos) lpfc_idiag_queacc_write()
2568 rc = lpfc_idiag_cmd_get(buf, nbytes, &idiag.cmd); lpfc_idiag_queacc_write()
2762 return nbytes; lpfc_idiag_queacc_write()
2824 * @nbytes: The number of bytes to read.
2835 * than @nbytes if the end of the file was reached) or a negative error value.
2838 lpfc_idiag_drbacc_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_drbacc_read() argument
2872 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_drbacc_read()
2879 * @nbytes: The number of bytes to get.
2895 size_t nbytes, loff_t *ppos) lpfc_idiag_drbacc_write()
2906 rc = lpfc_idiag_cmd_get(buf, nbytes, &idiag.cmd); lpfc_idiag_drbacc_write()
2964 return nbytes; lpfc_idiag_drbacc_write()
3041 * @nbytes: The number of bytes to read.
3050 * than @nbytes if the end of the file was reached) or a negative error value.
3053 lpfc_idiag_ctlacc_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_ctlacc_read() argument
3087 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_ctlacc_read()
3094 * @nbytes: The number of bytes to get.
3107 size_t nbytes, loff_t *ppos) lpfc_idiag_ctlacc_write()
3118 rc = lpfc_idiag_cmd_get(buf, nbytes, &idiag.cmd); lpfc_idiag_ctlacc_write()
3188 return nbytes; lpfc_idiag_ctlacc_write()
3206 * than @nbytes if the end of the file was reached) or a negative error value.
3235 * @nbytes: The number of bytes to read.
3244 * than @nbytes if the end of the file was reached) or a negative error value.
3247 lpfc_idiag_mbxacc_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_mbxacc_read() argument
3273 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_mbxacc_read()
3280 * @nbytes: The number of bytes to get.
3293 size_t nbytes, loff_t *ppos) lpfc_idiag_mbxacc_write()
3302 rc = lpfc_idiag_cmd_get(buf, nbytes, &idiag.cmd); lpfc_idiag_mbxacc_write()
3344 return nbytes; lpfc_idiag_mbxacc_write()
3349 return nbytes; lpfc_idiag_mbxacc_write()
3554 * @nbytes: The number of bytes to get.
3567 size_t nbytes, loff_t *ppos) lpfc_idiag_extacc_write()
3576 rc = lpfc_idiag_cmd_get(buf, nbytes, &idiag.cmd); lpfc_idiag_extacc_write()
3589 return nbytes; lpfc_idiag_extacc_write()
3600 * @nbytes: The number of bytes to read.
3609 * than @nbytes if the end of the file was reached) or a negative error value.
3612 lpfc_idiag_extacc_read(struct file *file, char __user *buf, size_t nbytes, lpfc_idiag_extacc_read() argument
3642 return simple_read_from_buffer(buf, nbytes, ppos, pbuffer, len); lpfc_idiag_extacc_read()
988 lpfc_debugfs_dumpDataDif_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_debugfs_dumpDataDif_write() argument
1011 lpfc_debugfs_dif_err_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) lpfc_debugfs_dif_err_read() argument
1052 lpfc_debugfs_dif_err_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_debugfs_dif_err_write() argument
1189 lpfc_debugfs_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) lpfc_debugfs_read() argument
1533 lpfc_idiag_pcicfg_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_idiag_pcicfg_write() argument
1858 lpfc_idiag_baracc_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_idiag_baracc_write() argument
2555 lpfc_idiag_queacc_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_idiag_queacc_write() argument
2894 lpfc_idiag_drbacc_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_idiag_drbacc_write() argument
3106 lpfc_idiag_ctlacc_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_idiag_ctlacc_write() argument
3292 lpfc_idiag_mbxacc_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_idiag_mbxacc_write() argument
3566 lpfc_idiag_extacc_write(struct file *file, const char __user *buf, size_t nbytes, loff_t *ppos) lpfc_idiag_extacc_write() argument
/linux-4.1.27/drivers/rtc/
H A Drtc-ds1374.c86 int reg, int nbytes) ds1374_read_rtc()
92 if (nbytes > 4) { ds1374_read_rtc()
97 ret = i2c_smbus_read_i2c_block_data(client, reg, nbytes, buf); ds1374_read_rtc()
101 if (ret < nbytes) ds1374_read_rtc()
104 for (i = nbytes - 1, *time = 0; i >= 0; i--) ds1374_read_rtc()
111 int reg, int nbytes) ds1374_write_rtc()
116 if (nbytes > 4) { ds1374_write_rtc()
121 for (i = 0; i < nbytes; i++) { ds1374_write_rtc()
126 return i2c_smbus_write_i2c_block_data(client, reg, nbytes, buf); ds1374_write_rtc()
85 ds1374_read_rtc(struct i2c_client *client, u32 *time, int reg, int nbytes) ds1374_read_rtc() argument
110 ds1374_write_rtc(struct i2c_client *client, u32 time, int reg, int nbytes) ds1374_write_rtc() argument
/linux-4.1.27/fs/fuse/
H A Ddev.c303 unsigned nbytes = 0; len_args() local
307 nbytes += args[i].size; len_args()
309 return nbytes; len_args()
1015 static int fuse_copy_pages(struct fuse_copy_state *cs, unsigned nbytes, fuse_copy_pages() argument
1021 for (i = 0; i < req->num_pages && (nbytes || zeroing); i++) { fuse_copy_pages()
1024 unsigned count = min(nbytes, req->page_descs[i].length); fuse_copy_pages()
1031 nbytes -= count; fuse_copy_pages()
1109 size_t nbytes, struct fuse_req *req)
1127 if (nbytes < reqsize)
1162 size_t nbytes)
1179 if (nbytes < ih.len)
1194 struct fuse_copy_state *cs, size_t nbytes)
1208 if (nbytes < ih.len) {
1213 max_forgets = (nbytes - ih.len) / sizeof(struct fuse_forget_one);
1243 size_t nbytes)
1247 return fuse_read_single_forget(fc, cs, nbytes);
1249 return fuse_read_batch_forget(fc, cs, nbytes);
1262 struct fuse_copy_state *cs, size_t nbytes) fuse_dev_do_read()
1287 return fuse_read_interrupt(fc, cs, nbytes, req); fuse_dev_do_read()
1292 return fuse_read_forget(fc, cs, nbytes); fuse_dev_do_read()
1305 if (nbytes < reqsize) { fuse_dev_do_read()
1845 unsigned nbytes) copy_out_args()
1850 return nbytes != reqsize ? -EINVAL : 0; copy_out_args()
1854 if (reqsize < nbytes || (reqsize > nbytes && !out->argvar)) copy_out_args()
1856 else if (reqsize > nbytes) { copy_out_args()
1858 unsigned diffsize = reqsize - nbytes; copy_out_args()
1875 struct fuse_copy_state *cs, size_t nbytes) fuse_dev_do_write()
1881 if (nbytes < sizeof(struct fuse_out_header)) fuse_dev_do_write()
1889 if (oh.len != nbytes) fuse_dev_do_write()
1897 err = fuse_notify(fc, oh.error, nbytes - sizeof(oh), cs); fuse_dev_do_write()
1898 return err ? err : nbytes; fuse_dev_do_write()
1924 if (nbytes != sizeof(struct fuse_out_header)) fuse_dev_do_write()
1934 return nbytes; fuse_dev_do_write()
1946 err = copy_out_args(cs, &req->out, nbytes); fuse_dev_do_write()
1958 return err ? err : nbytes; fuse_dev_do_write()
1261 fuse_dev_do_read(struct fuse_conn *fc, struct file *file, struct fuse_copy_state *cs, size_t nbytes) fuse_dev_do_read() argument
1844 copy_out_args(struct fuse_copy_state *cs, struct fuse_out *out, unsigned nbytes) copy_out_args() argument
1874 fuse_dev_do_write(struct fuse_conn *fc, struct fuse_copy_state *cs, size_t nbytes) fuse_dev_do_write() argument
/linux-4.1.27/drivers/isdn/i4l/
H A Disdn_v110.c102 v->nbytes = 8 / v->nbits; isdn_v110_open()
119 v->framelen = v->nbytes * 10; isdn_v110_open()
154 for (i = 0; (i < v->decodelen) && (i < v->nbytes); i++) ValidHeaderBytes()
287 if (v->decodelen < v->nbytes) { /* got a new header ? */ isdn_v110_decode()
291 if (ValidHeaderBytes(v) != v->nbytes) { /* is that a valid header? */ isdn_v110_decode()
295 len = (v->decodelen - (v->decodelen % (10 * v->nbytes))) / v->nbytes; isdn_v110_decode()
303 for (j = 0; j < v->nbytes; j++) isdn_v110_decode()
304 v110_buf[i] |= (v->decodebuf[(i * v->nbytes) + j] & v->key) << (8 - ((j + 1) * v->nbits)); isdn_v110_decode()
307 v->decodelen = (v->decodelen % (10 * v->nbytes)); isdn_v110_decode()
308 memcpy(v->decodebuf, &(v->decodebuf[len * v->nbytes]), v->decodelen); isdn_v110_decode()
501 for (j = 0; j < v->nbytes; j++) { isdn_v110_encode()
/linux-4.1.27/fs/xfs/
H A Dxfs_inode_item.c44 int *nbytes) xfs_inode_item_data_fork_size()
54 *nbytes += XFS_IFORK_DSIZE(ip); xfs_inode_item_data_fork_size()
61 *nbytes += ip->i_df.if_broot_bytes; xfs_inode_item_data_fork_size()
68 *nbytes += roundup(ip->i_df.if_bytes, 4); xfs_inode_item_data_fork_size()
86 int *nbytes) xfs_inode_item_attr_fork_size()
96 *nbytes += XFS_IFORK_ASIZE(ip); xfs_inode_item_attr_fork_size()
103 *nbytes += ip->i_afp->if_broot_bytes; xfs_inode_item_attr_fork_size()
110 *nbytes += roundup(ip->i_afp->if_bytes, 4); xfs_inode_item_attr_fork_size()
131 int *nbytes) xfs_inode_item_size()
137 *nbytes += sizeof(struct xfs_inode_log_format) + xfs_inode_item_size()
140 xfs_inode_item_data_fork_size(iip, nvecs, nbytes); xfs_inode_item_size()
142 xfs_inode_item_attr_fork_size(iip, nvecs, nbytes); xfs_inode_item_size()
41 xfs_inode_item_data_fork_size( struct xfs_inode_log_item *iip, int *nvecs, int *nbytes) xfs_inode_item_data_fork_size() argument
83 xfs_inode_item_attr_fork_size( struct xfs_inode_log_item *iip, int *nvecs, int *nbytes) xfs_inode_item_attr_fork_size() argument
128 xfs_inode_item_size( struct xfs_log_item *lip, int *nvecs, int *nbytes) xfs_inode_item_size() argument
H A Dxfs_icreate_item.c48 int *nbytes) xfs_icreate_item_size()
51 *nbytes += sizeof(struct xfs_icreate_log); xfs_icreate_item_size()
45 xfs_icreate_item_size( struct xfs_log_item *lip, int *nvecs, int *nbytes) xfs_icreate_item_size() argument
H A Dxfs_dquot_item.c45 int *nbytes) xfs_qm_dquot_logitem_size()
48 *nbytes += sizeof(struct xfs_dq_logformat) + xfs_qm_dquot_logitem_size()
281 int *nbytes) xfs_qm_qoff_logitem_size()
284 *nbytes += sizeof(struct xfs_qoff_logitem); xfs_qm_qoff_logitem_size()
42 xfs_qm_dquot_logitem_size( struct xfs_log_item *lip, int *nvecs, int *nbytes) xfs_qm_dquot_logitem_size() argument
278 xfs_qm_qoff_logitem_size( struct xfs_log_item *lip, int *nvecs, int *nbytes) xfs_qm_qoff_logitem_size() argument
H A Dxfs_extfree_item.c88 int *nbytes) xfs_efi_item_size()
91 *nbytes += xfs_efi_item_sizeof(EFI_ITEM(lip)); xfs_efi_item_size()
355 int *nbytes) xfs_efd_item_size()
358 *nbytes += xfs_efd_item_sizeof(EFD_ITEM(lip)); xfs_efd_item_size()
85 xfs_efi_item_size( struct xfs_log_item *lip, int *nvecs, int *nbytes) xfs_efi_item_size() argument
352 xfs_efd_item_size( struct xfs_log_item *lip, int *nvecs, int *nbytes) xfs_efd_item_size() argument
/linux-4.1.27/arch/cris/arch-v32/drivers/
H A Di2c.c391 i2c_write(unsigned char theSlave, void *data, size_t nbytes) i2c_write() argument
416 for (bytes_wrote = 0; bytes_wrote < nbytes; bytes_wrote++) { i2c_write()
447 i2c_read(unsigned char theSlave, void *data, size_t nbytes) i2c_read() argument
458 memset(data, 0, nbytes); i2c_read()
475 for (bytes_read = 0; bytes_read < nbytes; bytes_read++) { i2c_read()
479 if (bytes_read < (nbytes - 1)) i2c_read()
/linux-4.1.27/drivers/net/wireless/ath/ath10k/
H A Dce.c271 unsigned int nbytes, ath10k_ce_send_nolock()
285 if (nbytes > ce_state->src_sz_max) ath10k_ce_send_nolock()
286 ath10k_warn(ar, "%s: send more we can (nbytes: %d, max: %d)\n", ath10k_ce_send_nolock()
287 __func__, nbytes, ce_state->src_sz_max); ath10k_ce_send_nolock()
307 sdesc->nbytes = __cpu_to_le16(nbytes); ath10k_ce_send_nolock()
356 unsigned int nbytes, ath10k_ce_send()
366 buffer, nbytes, transfer_id, flags); ath10k_ce_send()
419 desc->nbytes = 0; __ath10k_ce_rx_post_buf()
460 u16 nbytes; ath10k_ce_completed_recv_next_nolock() local
465 nbytes = __le16_to_cpu(sdesc.nbytes); ath10k_ce_completed_recv_next_nolock()
466 if (nbytes == 0) { ath10k_ce_completed_recv_next_nolock()
476 desc->nbytes = 0; ath10k_ce_completed_recv_next_nolock()
480 *nbytesp = nbytes; ath10k_ce_completed_recv_next_nolock()
561 desc->nbytes = 0; ath10k_ce_revoke_recv_next()
621 *nbytesp = __le16_to_cpu(sdesc->nbytes); ath10k_ce_completed_send_next_nolock()
674 *nbytesp = __le16_to_cpu(desc->nbytes); ath10k_ce_cancel_send_next()
268 ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state, void *per_transfer_context, u32 buffer, unsigned int nbytes, unsigned int transfer_id, unsigned int flags) ath10k_ce_send_nolock() argument
353 ath10k_ce_send(struct ath10k_ce_pipe *ce_state, void *per_transfer_context, u32 buffer, unsigned int nbytes, unsigned int transfer_id, unsigned int flags) ath10k_ce_send() argument
H A Dpci.c488 int nbytes) ath10k_pci_diag_read_mem()
513 orig_nbytes = nbytes; ath10k_pci_diag_read_mem()
528 nbytes = min_t(unsigned int, remaining_bytes, ath10k_pci_diag_read_mem()
547 ret = ath10k_ce_send_nolock(ce_diag, NULL, (u32)address, nbytes, 0, ath10k_pci_diag_read_mem()
563 if (nbytes != completed_nbytes) { ath10k_pci_diag_read_mem()
585 if (nbytes != completed_nbytes) { ath10k_pci_diag_read_mem()
595 remaining_bytes -= nbytes; ath10k_pci_diag_read_mem()
596 address += nbytes; ath10k_pci_diag_read_mem()
597 ce_data += nbytes; ath10k_pci_diag_read_mem()
656 const void *data, int nbytes) ath10k_pci_diag_write_mem()
680 orig_nbytes = nbytes; ath10k_pci_diag_write_mem()
709 nbytes = min_t(int, remaining_bytes, DIAG_TRANSFER_LIMIT); ath10k_pci_diag_write_mem()
721 nbytes, 0, 0); ath10k_pci_diag_write_mem()
737 if (nbytes != completed_nbytes) { ath10k_pci_diag_write_mem()
759 if (nbytes != completed_nbytes) { ath10k_pci_diag_write_mem()
769 remaining_bytes -= nbytes; ath10k_pci_diag_write_mem()
770 address += nbytes; ath10k_pci_diag_write_mem()
771 ce_data += nbytes; ath10k_pci_diag_write_mem()
844 unsigned int nbytes; ath10k_pci_ce_send_done() local
849 &nbytes, &transfer_id) == 0) { ath10k_pci_ce_send_done()
872 unsigned int nbytes, max_nbytes; ath10k_pci_ce_recv_data() local
878 &ce_data, &nbytes, &transfer_id, ath10k_pci_ce_recv_data()
885 if (unlikely(max_nbytes < nbytes)) { ath10k_pci_ce_recv_data()
886 ath10k_warn(ar, "rxed more than expected (nbytes %d, max %d)", ath10k_pci_ce_recv_data()
887 nbytes, max_nbytes); ath10k_pci_ce_recv_data()
892 skb_put(skb, nbytes); ath10k_pci_ce_recv_data()
1450 unsigned int nbytes; ath10k_pci_bmi_send_done() local
1454 &nbytes, &transfer_id)) ath10k_pci_bmi_send_done()
1465 unsigned int nbytes; ath10k_pci_bmi_recv_data() local
1470 &nbytes, &transfer_id, &flags)) ath10k_pci_bmi_recv_data()
1481 xfer->resp_len = nbytes; ath10k_pci_bmi_recv_data()
487 ath10k_pci_diag_read_mem(struct ath10k *ar, u32 address, void *data, int nbytes) ath10k_pci_diag_read_mem() argument
655 ath10k_pci_diag_write_mem(struct ath10k *ar, u32 address, const void *data, int nbytes) ath10k_pci_diag_write_mem() argument
H A Dce.h46 __le16 nbytes; member in struct:ce_desc
137 * nbytes - number of bytes to send
149 unsigned int nbytes,
157 unsigned int nbytes,
H A Dhif.h50 int nbytes);
117 const void *data, int nbytes) ath10k_hif_diag_write()
122 return ar->hif.ops->diag_write(ar, address, data, nbytes); ath10k_hif_diag_write()
116 ath10k_hif_diag_write(struct ath10k *ar, u32 address, const void *data, int nbytes) ath10k_hif_diag_write() argument
/linux-4.1.27/drivers/usb/core/
H A Ddevices.c490 * nbytes - the maximum number of bytes to write
495 static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes, usb_device_dump() argument
509 if (*nbytes <= 0) usb_device_dump()
583 if (length > *nbytes) usb_device_dump()
584 length = *nbytes; usb_device_dump()
589 *nbytes -= length; usb_device_dump()
602 ret = usb_device_dump(buffer, nbytes, skip_bytes, usb_hub_for_each_child()
614 size_t nbytes, loff_t *ppos) usb_device_read()
622 if (nbytes <= 0) usb_device_read()
624 if (!access_ok(VERIFY_WRITE, buf, nbytes)) usb_device_read()
634 ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos, usb_device_read()
613 usb_device_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) usb_device_read() argument
/linux-4.1.27/drivers/staging/unisys/visorchipset/
H A Dparser.h43 void *parser_byte_stream_get(struct parser_context *ctx, ulong *nbytes);
H A Dparser.c168 void *parser_byte_stream_get(struct parser_context *ctx, ulong *nbytes) parser_byte_stream_get() argument
172 if (nbytes) parser_byte_stream_get()
173 *nbytes = ctx->param_bytes; parser_byte_stream_get()
/linux-4.1.27/drivers/dma/
H A Dfsl-edma.c124 __le32 nbytes; member in struct:fsl_edma_hw_tcd
370 len += le32_to_cpu(edesc->tcd[i].vtcd->nbytes) fsl_edma_desc_residue()
383 size = le32_to_cpu(edesc->tcd[i].vtcd->nbytes) fsl_edma_desc_residue()
448 edma_writel(edma, le32_to_cpu(tcd->nbytes), addr + EDMA_TCD_NBYTES(ch)); fsl_edma_set_tcd_regs()
462 u16 attr, u16 soff, u32 nbytes, u32 slast, u16 citer, fsl_edma_fill_tcd()
481 tcd->nbytes = cpu_to_le32(EDMA_TCD_NBYTES_NBYTES(nbytes)); fsl_edma_fill_tcd()
540 u32 src_addr, dst_addr, last_sg, nbytes; fsl_edma_prep_dma_cyclic() local
553 nbytes = fsl_chan->fsc.addr_width * fsl_chan->fsc.burst; fsl_edma_prep_dma_cyclic()
554 iter = period_len / nbytes; fsl_edma_prep_dma_cyclic()
576 fsl_chan->fsc.attr, soff, nbytes, 0, iter, fsl_edma_prep_dma_cyclic()
592 u32 src_addr, dst_addr, last_sg, nbytes; fsl_edma_prep_slave_sg() local
604 nbytes = fsl_chan->fsc.addr_width * fsl_chan->fsc.burst; for_each_sg()
621 iter = sg_dma_len(sg) / nbytes; for_each_sg()
626 nbytes, 0, iter, iter, doff, last_sg, for_each_sg()
632 nbytes, 0, iter, iter, doff, last_sg, for_each_sg()
461 fsl_edma_fill_tcd(struct fsl_edma_hw_tcd *tcd, u32 src, u32 dst, u16 attr, u16 soff, u32 nbytes, u32 slast, u16 citer, u16 biter, u16 doff, u32 dlast_sga, bool major_int, bool disable_req, bool enable_sg) fsl_edma_fill_tcd() argument
/linux-4.1.27/arch/ia64/include/asm/sn/
H A Dtioce_provider.h51 u64 nbytes; /* # bytes mapped */ member in struct:tioce_dmamap
/linux-4.1.27/arch/m32r/kernel/
H A Dsys_m32r.c86 asmlinkage int sys_cachectl(char *addr, int nbytes, int op) sys_cachectl() argument
/linux-4.1.27/kernel/
H A Dmodule_signing.c111 size_t nbytes; mod_extract_mpi_array() local
116 nbytes = ((const u8 *)data)[0] << 8 | ((const u8 *)data)[1]; mod_extract_mpi_array()
119 if (len != nbytes) mod_extract_mpi_array()
122 mpi = mpi_read_raw_data(data, nbytes); mod_extract_mpi_array()
/linux-4.1.27/drivers/scsi/fnic/
H A Dfnic_debugfs.c309 * @nbytes: The number of bytes to read.
314 * field of @file. It will start reading at @pos and copy up to @nbytes of
319 * less than @nbytes if the end of the file was reached).
323 size_t nbytes, fnic_trace_debugfs_read()
328 rc = simple_read_from_buffer(ubuf, nbytes, pos, fnic_trace_debugfs_read()
705 * @nbytes: The number of bytes to read.
710 * field of @file. It will start reading at @pos and copy up to @nbytes of
715 * less than @nbytes if the end of the file was reached).
719 size_t nbytes, fnic_stats_debugfs_read()
724 rc = simple_read_from_buffer(ubuf, nbytes, pos, fnic_stats_debugfs_read()
321 fnic_trace_debugfs_read(struct file *file, char __user *ubuf, size_t nbytes, loff_t *pos) fnic_trace_debugfs_read() argument
717 fnic_stats_debugfs_read(struct file *file, char __user *ubuf, size_t nbytes, loff_t *pos) fnic_stats_debugfs_read() argument
/linux-4.1.27/drivers/block/
H A Dskd_main.c1441 uint nbytes = sizeof(*iov) * sgp->iovec_count; skd_sg_io_get_and_check_args() local
1444 iov = kmalloc(nbytes, GFP_KERNEL); skd_sg_io_get_and_check_args()
1454 if (copy_from_user(iov, sgp->dxferp, nbytes)) { skd_sg_io_get_and_check_args()
1566 u32 nbytes = PAGE_SIZE; skd_skreq_prep_buffering() local
1572 if (nbytes > resid) skd_skreq_prep_buffering()
1573 nbytes = resid; skd_skreq_prep_buffering()
1579 sg_set_page(sg, page, nbytes, 0); skd_skreq_prep_buffering()
1584 sksg->byte_count = nbytes; skd_skreq_prep_buffering()
1593 resid -= nbytes; skd_skreq_prep_buffering()
1662 u32 nbytes = PAGE_SIZE; skd_sg_io_copy_buffer() local
1676 nbytes = min_t(u32, nbytes, resid); skd_sg_io_copy_buffer()
1677 nbytes = min_t(u32, nbytes, curiov.iov_len); skd_sg_io_copy_buffer()
1678 nbytes = min_t(u32, nbytes, buf_len); skd_sg_io_copy_buffer()
1681 rc = __copy_from_user(bufp, curiov.iov_base, nbytes); skd_sg_io_copy_buffer()
1683 rc = __copy_to_user(curiov.iov_base, bufp, nbytes); skd_sg_io_copy_buffer()
1688 resid -= nbytes; skd_sg_io_copy_buffer()
1689 curiov.iov_len -= nbytes; skd_sg_io_copy_buffer()
1690 curiov.iov_base += nbytes; skd_sg_io_copy_buffer()
1691 buf_len -= nbytes; skd_sg_io_copy_buffer()
1808 u32 nbytes = sizeof(*ei); skd_sg_io_put_status() local
1810 nbytes = min_t(u32, nbytes, sgp->mx_sb_len); skd_sg_io_put_status()
1812 sgp->sb_len_wr = nbytes; skd_sg_io_put_status()
1814 if (__copy_to_user(sgp->sbp, ei, nbytes)) { skd_sg_io_put_status()
2971 u32 nbytes; skd_reset_skcomp() local
2974 nbytes = sizeof(*skcomp) * SKD_N_COMPLETION_ENTRY; skd_reset_skcomp()
2975 nbytes += sizeof(struct fit_comp_error_info) * SKD_N_COMPLETION_ENTRY; skd_reset_skcomp()
2977 memset(skdev->skcomp_table, 0, nbytes); skd_reset_skcomp()
4106 u32 nbytes; skd_cons_skcomp() local
4108 nbytes = sizeof(*skcomp) * SKD_N_COMPLETION_ENTRY; skd_cons_skcomp()
4109 nbytes += sizeof(struct fit_comp_error_info) * SKD_N_COMPLETION_ENTRY; skd_cons_skcomp()
4113 nbytes, SKD_N_COMPLETION_ENTRY); skd_cons_skcomp()
4115 skcomp = pci_zalloc_consistent(skdev->pdev, nbytes, skd_cons_skcomp()
4192 u32 nbytes; skd_cons_sg_list() local
4194 nbytes = sizeof(*sg_list) * n_sg; skd_cons_sg_list()
4196 sg_list = pci_alloc_consistent(skdev->pdev, nbytes, ret_dma_addr); skd_cons_sg_list()
4202 memset(sg_list, 0, nbytes); skd_cons_sg_list()
4278 u32 i, nbytes; skd_cons_skspcl() local
4303 nbytes = SKD_N_SPECIAL_FITMSG_BYTES; skd_cons_skspcl()
4306 pci_zalloc_consistent(skdev->pdev, nbytes, skd_cons_skspcl()
4344 u32 nbytes; skd_cons_sksb() local
4351 nbytes = SKD_N_INTERNAL_BYTES; skd_cons_sksb()
4353 skspcl->data_buf = pci_zalloc_consistent(skdev->pdev, nbytes, skd_cons_sksb()
4360 nbytes = SKD_N_SPECIAL_FITMSG_BYTES; skd_cons_sksb()
4361 skspcl->msg_buf = pci_zalloc_consistent(skdev->pdev, nbytes, skd_cons_sksb()
4530 u32 nbytes; skd_free_skcomp() local
4532 nbytes = sizeof(skdev->skcomp_table[0]) * skd_free_skcomp()
4534 pci_free_consistent(skdev->pdev, nbytes, skd_free_skcomp()
4574 u32 nbytes; skd_free_sg_list() local
4576 nbytes = sizeof(*sg_list) * n_sg; skd_free_sg_list()
4578 pci_free_consistent(skdev->pdev, nbytes, sg_list, dma_addr); skd_free_sg_list()
4611 u32 nbytes; skd_free_skspcl() local
4622 nbytes = SKD_N_SPECIAL_FITMSG_BYTES; skd_free_skspcl()
4623 pci_free_consistent(skdev->pdev, nbytes, skd_free_skspcl()
4648 u32 nbytes; skd_free_sksb() local
4653 nbytes = SKD_N_INTERNAL_BYTES; skd_free_sksb()
4655 pci_free_consistent(skdev->pdev, nbytes, skd_free_sksb()
4663 nbytes = SKD_N_SPECIAL_FITMSG_BYTES; skd_free_sksb()
4664 pci_free_consistent(skdev->pdev, nbytes, skd_free_sksb()
/linux-4.1.27/drivers/usb/gadget/function/
H A Duvc_video.c48 unsigned int nbytes; uvc_video_encode_data() local
53 nbytes = min((unsigned int)len, buf->bytesused - queue->buf_used); uvc_video_encode_data()
55 memcpy(data, mem, nbytes); uvc_video_encode_data()
56 queue->buf_used += nbytes; uvc_video_encode_data()
58 return nbytes; uvc_video_encode_data()
/linux-4.1.27/arch/mips/alchemy/common/
H A Ddbdma.c591 u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags) au1xxx_dbdma_put_source() argument
618 dp->dscr_cmd1 = nbytes; au1xxx_dbdma_put_source()
632 dma_cache_wback_inv((unsigned long)buf, nbytes); au1xxx_dbdma_put_source()
642 return nbytes; au1xxx_dbdma_put_source()
650 u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags) au1xxx_dbdma_put_dest() argument
681 dp->dscr_cmd1 = nbytes; au1xxx_dbdma_put_dest()
694 dma_cache_inv((unsigned long)buf, nbytes); au1xxx_dbdma_put_dest()
704 return nbytes; au1xxx_dbdma_put_dest()
714 u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes) au1xxx_dbdma_get_dest() argument
742 *nbytes = dp->dscr_cmd1; au1xxx_dbdma_get_dest()
938 u32 nbytes = 0; au1xxx_dbdma_put_dscr() local
966 nbytes = dscr->dscr_cmd1; au1xxx_dbdma_put_dscr()
976 return nbytes; au1xxx_dbdma_put_dscr()
/linux-4.1.27/arch/alpha/kernel/
H A Dosf_sys.c610 long nbytes; member in struct:pl_args::setargs
615 long nbytes; member in struct:pl_args::fsetargs
622 long nbytes; member in struct:pl_args::getargs
629 long nbytes; member in struct:pl_args::fgetargs
658 if (get_user(error, &args->set.nbytes)) SYSCALL_DEFINE2()
662 if (get_user(error, &args->fset.nbytes)) SYSCALL_DEFINE2()
768 unsigned long, nbytes, int __user *, start, void __user *, arg) SYSCALL_DEFINE5()
793 if (nbytes < sizeof(unsigned int)) SYSCALL_DEFINE5()
801 if (nbytes < sizeof(unsigned long)) SYSCALL_DEFINE5()
811 if (nbytes > sizeof(*hwrpb)) SYSCALL_DEFINE5()
813 if (copy_to_user(buffer, hwrpb, nbytes) != 0) SYSCALL_DEFINE5()
825 unsigned long, nbytes, int __user *, start, void __user *, arg) SYSCALL_DEFINE5()
908 for (i = 0, p = buffer; i < nbytes; ++i, p += 2) { SYSCALL_DEFINE5()
/linux-4.1.27/arch/x86/tools/
H A Dtest_get_len.c66 fprintf(fp, "%s\t.got = %d, .nbytes = %d},\n", indent, dump_field()
67 field->got, field->nbytes); dump_field()
H A Dinsn_sanity.c76 fprintf(fp, "%s\t.got = %d, .nbytes = %d},\n", indent, dump_field()
77 field->got, field->nbytes); dump_field()
/linux-4.1.27/drivers/atm/
H A Dnicstarmac.c239 u_int8_t prom_offset, u_int8_t * buffer, u_int32_t nbytes) nicstar_read_eprom()
243 for (i = 0; i < nbytes; i++) { nicstar_read_eprom()
238 nicstar_read_eprom(virt_addr_t base, u_int8_t prom_offset, u_int8_t * buffer, u_int32_t nbytes) nicstar_read_eprom() argument
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
H A Dsdio.h310 * nbytes: number of bytes to transfer to/from buf
319 int brcmf_sdiod_send_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes);
322 int brcmf_sdiod_recv_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes);
337 * nbytes: number of bytes to transfer to/from buf
H A Dbcmsdh.c258 brcmf_dbg(SDIO, "rw=%d, func=%d, addr=0x%05x, nbytes=%d\n", brcmf_sdiod_request_data()
667 int brcmf_sdiod_recv_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes) brcmf_sdiod_recv_buf() argument
672 mypkt = brcmu_pkt_buf_get_skb(nbytes); brcmf_sdiod_recv_buf()
675 nbytes); brcmf_sdiod_recv_buf()
681 memcpy(buf, mypkt->data, nbytes); brcmf_sdiod_recv_buf()
743 int brcmf_sdiod_send_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes) brcmf_sdiod_send_buf() argument
749 mypkt = brcmu_pkt_buf_get_skb(nbytes); brcmf_sdiod_send_buf()
752 nbytes); brcmf_sdiod_send_buf()
756 memcpy(mypkt->data, buf, nbytes); brcmf_sdiod_send_buf()
/linux-4.1.27/mm/
H A Dhugetlb_cgroup.c272 char *buf, size_t nbytes, loff_t off) hugetlb_cgroup_write()
298 return ret ?: nbytes; hugetlb_cgroup_write()
302 char *buf, size_t nbytes, loff_t off) hugetlb_cgroup_reset()
321 return ret ?: nbytes; hugetlb_cgroup_reset()
271 hugetlb_cgroup_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) hugetlb_cgroup_write() argument
301 hugetlb_cgroup_reset(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) hugetlb_cgroup_reset() argument
/linux-4.1.27/drivers/spi/
H A Dspi-tegra20-sflash.c186 unsigned nbytes; tegra_sflash_fill_tx_fifo_from_client_txbuf() local
193 nbytes = max_n_32bit * tsd->bytes_per_word; tegra_sflash_fill_tx_fifo_from_client_txbuf()
200 for (i = 0; nbytes && (i < tsd->bytes_per_word); tegra_sflash_fill_tx_fifo_from_client_txbuf()
201 i++, nbytes--) tegra_sflash_fill_tx_fifo_from_client_txbuf()
204 if (!nbytes) tegra_sflash_fill_tx_fifo_from_client_txbuf()
H A Dspi-tegra114.c286 unsigned nbytes; tegra_spi_fill_tx_fifo_from_client_txbuf() local
301 nbytes = written_words * tspi->bytes_per_word; tegra_spi_fill_tx_fifo_from_client_txbuf()
302 max_n_32bit = DIV_ROUND_UP(nbytes, 4); tegra_spi_fill_tx_fifo_from_client_txbuf()
306 for (i = 0; (i < 4) && nbytes; i++, nbytes--) tegra_spi_fill_tx_fifo_from_client_txbuf()
313 nbytes = written_words * tspi->bytes_per_word; tegra_spi_fill_tx_fifo_from_client_txbuf()
317 for (i = 0; nbytes && (i < tspi->bytes_per_word); tegra_spi_fill_tx_fifo_from_client_txbuf()
318 i++, nbytes--) tegra_spi_fill_tx_fifo_from_client_txbuf()
H A Dspi-tegra20-slink.c303 unsigned nbytes; tegra_slink_fill_tx_fifo_from_client_txbuf() local
318 nbytes = written_words * tspi->bytes_per_word; tegra_slink_fill_tx_fifo_from_client_txbuf()
319 max_n_32bit = DIV_ROUND_UP(nbytes, 4); tegra_slink_fill_tx_fifo_from_client_txbuf()
322 for (i = 0; (i < 4) && nbytes; i++, nbytes--) tegra_slink_fill_tx_fifo_from_client_txbuf()
329 nbytes = written_words * tspi->bytes_per_word; tegra_slink_fill_tx_fifo_from_client_txbuf()
332 for (i = 0; nbytes && (i < tspi->bytes_per_word); tegra_slink_fill_tx_fifo_from_client_txbuf()
333 i++, nbytes--) tegra_slink_fill_tx_fifo_from_client_txbuf()
/linux-4.1.27/drivers/mtd/nand/gpmi-nand/
H A Dgpmi-lib.c1377 size_t nbytes; gpmi_copy_bits() local
1411 nbytes = nbits / 8; gpmi_copy_bits()
1415 if (bits_in_src_buffer < (8 - dst_bit_off) && nbytes) { gpmi_copy_bits()
1419 nbytes--; gpmi_copy_bits()
1443 if (nbytes) gpmi_copy_bits()
1444 memcpy(dst, src, nbytes); gpmi_copy_bits()
1451 for (i = 0; i < nbytes; i++) { gpmi_copy_bits()
1458 dst += nbytes; gpmi_copy_bits()
1459 src += nbytes; gpmi_copy_bits()
1495 nbytes = bits_in_src_buffer / 8; gpmi_copy_bits()
1497 src_buffer |= (dst[nbytes] & gpmi_copy_bits()
1499 (nbytes * 8); gpmi_copy_bits()
1500 nbytes++; gpmi_copy_bits()
1504 for (i = 0; i < nbytes; i++) { gpmi_copy_bits()
/linux-4.1.27/fs/nfsd/
H A Dnfs4xdr.c95 #define READMEM(x,nbytes) do { \
97 p += XDR_QUADLEN(nbytes); \
99 #define SAVEMEM(x,nbytes) do { \
101 savemem(argp, p, nbytes) : \
107 p += XDR_QUADLEN(nbytes); \
109 #define COPYMEM(x,nbytes) do { \
110 memcpy((x), p, nbytes); \
111 p += XDR_QUADLEN(nbytes); \
114 /* READ_BUF, read_buf(): nbytes must be <= PAGE_SIZE */
115 #define READ_BUF(nbytes) do { \
116 if (nbytes <= (u32)((char *)argp->end - (char *)argp->p)) { \
118 argp->p += XDR_QUADLEN(nbytes); \
119 } else if (!(p = read_buf(argp, nbytes))) { \
139 static __be32 *read_buf(struct nfsd4_compoundargs *argp, u32 nbytes) read_buf() argument
146 if (avail + argp->pagelen < nbytes) read_buf()
148 if (avail + PAGE_SIZE < nbytes) /* need more than a page !! */ read_buf()
151 if (nbytes <= sizeof(argp->tmp)) read_buf()
155 p = argp->tmpp = kmalloc(nbytes, GFP_KERNEL); read_buf()
162 * called with nbytes > avail, and the two cases above both read_buf()
163 * guarantee p points to at least nbytes bytes. read_buf()
167 memcpy(((char*)p)+avail, argp->p, (nbytes - avail)); read_buf()
168 argp->p += XDR_QUADLEN(nbytes - avail); read_buf()
221 * @nbytes: length to be duplicated
223 * Returns a pointer to a copy of @nbytes bytes of memory at @p
227 static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes) savemem() argument
231 ret = svcxdr_tmpalloc(argp, nbytes); savemem()
234 memcpy(ret, p, nbytes); savemem()
/linux-4.1.27/fs/jfs/
H A Dxattr.c226 s32 nbytes, nb; ea_write() local
260 nbytes = size; ea_write()
266 nb = min(PSIZE, nbytes); ea_write()
299 nbytes -= nb; ea_write()
375 int nbytes, nb; ea_read() local
383 nbytes = sizeDXD(&ji->ea); ea_read()
384 if (!nbytes) { ea_read()
385 jfs_error(sb, "nbytes is 0\n"); ea_read()
406 nb = min(PSIZE, nbytes); ea_read()
418 nbytes -= nb; ea_read()
/linux-4.1.27/drivers/crypto/ux500/cryp/
H A Dcryp_core.c811 static int get_nents(struct scatterlist *sg, int nbytes) get_nents() argument
815 while (nbytes > 0) { get_nents()
816 nbytes -= sg->length; get_nents()
836 ctx->datalen = areq->nbytes; ablk_dma_crypt()
837 ctx->outlen = areq->nbytes; ablk_dma_crypt()
890 int nbytes; ablk_crypt() local
898 ablkcipher_walk_init(&walk, areq->dst, areq->src, areq->nbytes); ablk_crypt()
907 while ((nbytes = walk.nbytes) > 0) { ablk_crypt()
915 ctx->datalen = nbytes - (nbytes % ctx->blocksize); ablk_crypt()
921 nbytes -= ctx->datalen; ablk_crypt()
922 ret = ablkcipher_walk_done(areq, &walk, nbytes); ablk_crypt()
/linux-4.1.27/drivers/iio/accel/
H A Dmma9551_core.c90 u8 nbytes; member in struct:mma9551_mbox_request
103 u8 nbytes; member in struct:mma9551_mbox_response
139 req.nbytes = num_inbytes; mma9551_transfer()
141 req.nbytes = num_outbytes; mma9551_transfer()
194 if (rsp.nbytes != rsp.req_bytes) { mma9551_transfer()
197 rsp.nbytes, rsp.req_bytes); mma9551_transfer()
/linux-4.1.27/drivers/net/ppp/
H A Dppp_mppe.c140 unsigned int nbytes; get_new_key_from_sha() local
144 nbytes = setup_sg(&sg[0], state->master_key, state->keylen); get_new_key_from_sha()
145 nbytes += setup_sg(&sg[1], sha_pad->sha_pad1, get_new_key_from_sha()
147 nbytes += setup_sg(&sg[2], state->session_key, state->keylen); get_new_key_from_sha()
148 nbytes += setup_sg(&sg[3], sha_pad->sha_pad2, get_new_key_from_sha()
154 crypto_hash_digest(&desc, sg, nbytes, state->sha1_digest); get_new_key_from_sha()
/linux-4.1.27/arch/mips/include/asm/mach-au1x00/
H A Dau1xxx_dbdma.h361 u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags);
362 u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags);
365 u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes);
/linux-4.1.27/net/rds/
H A Dmessage.c269 unsigned long to_copy, nbytes; rds_message_copy_from_user() local
296 nbytes = copy_page_from_iter(sg_page(sg), sg->offset + sg_off, rds_message_copy_from_user()
298 if (nbytes != to_copy) rds_message_copy_from_user()
/linux-4.1.27/arch/x86/kernel/
H A Duprobes.c272 for (i = 0; i < insn->prefixes.nbytes; i++) { is_prefix_bad()
306 if (insn->opcode.nbytes == 2) { uprobe_init_insn()
358 if (insn->rex_prefix.nbytes) { riprel_analyze()
367 if (insn->vex_prefix.nbytes == 3) { riprel_analyze()
422 if (insn->vex_prefix.nbytes == 2) riprel_analyze()
424 else if (insn->vex_prefix.nbytes == 3) riprel_analyze()
703 0, insn->immediate.nbytes); branch_clear_offset()
728 if (insn->opcode.nbytes != 2) branch_setup_xol_ops()
745 for (i = 0; i < insn->prefixes.nbytes; i++) { branch_setup_xol_ops()
/linux-4.1.27/block/
H A Dblk-merge.c164 int nbytes = bvec->bv_len; __blk_segment_map_sg() local
167 if ((*sg)->length + nbytes > queue_max_segment_size(q)) __blk_segment_map_sg()
175 (*sg)->length += nbytes; __blk_segment_map_sg()
195 sg_set_page(*sg, bvec->bv_page, nbytes, bvec->bv_offset); __blk_segment_map_sg()
/linux-4.1.27/drivers/crypto/ux500/hash/
H A Dhash_core.c576 if (req->nbytes < HASH_DMA_ALIGN_SIZE) { hash_init()
582 if (req->nbytes >= HASH_DMA_PERFORMANCE_MIN_SIZE && hash_init()
583 hash_dma_valid_data(req->src, req->nbytes)) { hash_init()
919 /* Number of bits in last word = (nbytes * 8) % 32 */ hash_dma_final()
920 HASH_SET_NBLW((req->nbytes * 8) % 32); hash_dma_final()
925 ctx->device->dma.nents = hash_get_nents(req->src, req->nbytes, NULL); hash_dma_final()
933 bytes_written = hash_dma_write(ctx, req->src, req->nbytes); hash_dma_final()
934 if (bytes_written != req->nbytes) { hash_dma_final()
997 } else if (req->nbytes == 0 && ctx->keylen == 0) { hash_hw_final()
1024 } else if (req->nbytes == 0 && ctx->keylen > 0) { hash_hw_final()
1332 pr_debug("%s: data size: %d\n", __func__, req->nbytes); ahash_final()
/linux-4.1.27/drivers/staging/comedi/drivers/
H A Ddt282x.c397 unsigned int nbytes) dt282x_munge()
403 if (nbytes % 2) dt282x_munge()
407 for (i = 0; i < nbytes / 2; i++) { dt282x_munge()
425 unsigned int nbytes; dt282x_ao_setup_dma() local
427 nbytes = comedi_buf_read_samples(s, desc->virt_addr, nsamples); dt282x_ao_setup_dma()
428 if (nbytes) dt282x_ao_setup_dma()
429 dt282x_prep_ao_dma(dev, cur_dma, nbytes); dt282x_ao_setup_dma()
433 return nbytes; dt282x_ao_setup_dma()
394 dt282x_munge(struct comedi_device *dev, struct comedi_subdevice *s, unsigned short *buf, unsigned int nbytes) dt282x_munge() argument
H A Dquatech_daqp_cs.c570 unsigned long long nbytes; daqp_ai_cmd() local
574 nbytes = nsamples * comedi_bytes_per_sample(s); daqp_ai_cmd()
575 while (nbytes > DAQP_FIFO_SIZE * 3 / 4) daqp_ai_cmd()
576 nbytes /= 2; daqp_ai_cmd()
577 threshold = nbytes; daqp_ai_cmd()
/linux-4.1.27/drivers/gpu/drm/
H A Ddrm_ioc32.c443 size_t nbytes; compat_drm_infobufs() local
458 nbytes = sizeof(*request) + count * sizeof(struct drm_buf_desc); compat_drm_infobufs()
459 request = compat_alloc_user_space(nbytes); compat_drm_infobufs()
460 if (!access_ok(VERIFY_WRITE, request, nbytes)) compat_drm_infobufs()
509 size_t nbytes; compat_drm_mapbufs() local
519 nbytes = sizeof(*request) + count * sizeof(struct drm_buf_pub); compat_drm_mapbufs()
520 request = compat_alloc_user_space(nbytes); compat_drm_mapbufs()
521 if (!access_ok(VERIFY_WRITE, request, nbytes)) compat_drm_mapbufs()
/linux-4.1.27/arch/sparc/include/asm/
H A Dopenprom.h41 int (*v2_dev_read)(int d, char *buf, int nbytes);
42 int (*v2_dev_write)(int d, const char *buf, int nbytes);
/linux-4.1.27/fs/nfs/
H A Dpnfs_dev.c67 unsigned int nbytes = NFS4_DEVICEID4_SIZE; nfs4_deviceid_hash() local
70 while (nbytes--) { nfs4_deviceid_hash()
/linux-4.1.27/include/linux/sunrpc/
H A Dxdr.h217 extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes);
228 extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes);
/linux-4.1.27/arch/m68k/include/asm/
H A Dopenprom.h49 int (*v2_dev_read)(int d, char *buf, int nbytes);
50 int (*v2_dev_write)(int d, char *buf, int nbytes);
/linux-4.1.27/fs/cifs/
H A Dsmb2proto.h131 unsigned int *nbytes, char **buf, int *buf_type);
135 unsigned int *nbytes, struct kvec *iov, int n_vec);
/linux-4.1.27/net/core/
H A Dnetprio_cgroup.c189 char *buf, size_t nbytes, loff_t off) write_priomap()
209 return ret ?: nbytes; write_priomap()
188 write_priomap(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) write_priomap() argument
H A Dutils.c364 bool __net_get_random_once(void *buf, int nbytes, bool *done, __net_get_random_once() argument
376 get_random_bytes(buf, nbytes); __net_get_random_once()

Completed in 9297 milliseconds

12