函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\mpi\mpicoder.c Create Date:2022-07-27 08:17:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:mpi_read_raw_from_sgl() - Function allocates an MPI and populates it with* data from the sgl* This function works in the same way as the mpi_read_raw_data, but it* takes an sgl instead of void * buffer. i.e. it allocates

函数原型:MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int nbytes)

返回类型:MPI

参数:

类型参数名称
struct scatterlist *sgl
unsigned intnbytes
338  MPI val = NULL
340  ents等于sg_nents_for_len - return total count of entries in scatterlist* needed to satisfy the supplied length*@sg: The scatterlist*@len: The total required length* Description:* Determines the number of entries in sg that are required to meet* the supplied
341  如果ents小于0则返回:NULL
344  开始映射迭代一个SG名单
346  lzeros等于0
347  len等于0
348 nbytes大于0循环
349 len且非buff循环
350  lzeros自加
351  len自减
352  buff自加
355  如果lenbuff退出
358  sg_miter_next - proceed mapping iterator to the next mapping*@miter: sg mapping iter to proceed* Description:* Proceeds @miter to the next mapping. @miter should have been started* using sg_miter_start(). On successful return, @miter->page,
359  buff等于 pointer to the mapped area
360  len等于 length of the mapped area
362  nbytes减等于lzeros
363  lzeros等于0
366  number of consumed bytes 等于lzeros
368  nbytes减等于lzeros
369  nbits等于nbytes乘8
370  如果nbits大于MAX_EXTERN_MPI_BITS
371  sg_miter_stop - stop mapping iteration*@miter: sg mapping iter to be stopped* Description:* Stops mapping iterator @miter. @miter should have been started* using sg_miter_start(). A stopped iteration can be resumed by* calling sg_miter_next() on it
372  打印信息("MPI: mpi too large (%u bits)\n", nbits)
373  返回:NULL
376  如果nbytes大于0则nbits减等于_leading_zeros - Count the number of zeros from the MSB back*@x: The value* Count the number of leading zeros from the MSB going towards the LSB in @x.* If the MSB of @x is set, the result is 0.BITS_PER_LONG减8
379  sg_miter_stop - stop mapping iteration*@miter: sg mapping iter to be stopped* Description:* Stops mapping iterator @miter. @miter should have been started* using sg_miter_start(). A stopped iteration can be resumed by* calling sg_miter_next() on it
381  nlimbs等于DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB)
382  val等于分配mpi空间
383  如果非val则返回:NULL
386  the real number of valid bits (info only) 等于nbits
387  indicates a negative number 等于0
388  number of valid limbs 等于nlimbs
390  如果nbytes恒等于0则返回:val
393  j等于nlimbs减1
394  a等于0
395  z等于BYTES_PER_MPI_LIMBnbytes取模BYTES_PER_MPI_LIMB
396  z取模等于BYTES_PER_MPI_LIMB
398 sg_miter_next - proceed mapping iterator to the next mapping*@miter: sg mapping iter to proceed* Description:* Proceeds @miter to the next mapping. @miter should have been started* using sg_miter_start(). On successful return, @miter->page,循环
399  buff等于 pointer to the mapped area
400  len等于 length of the mapped area
402 x小于len循环
403  a左移等于8位
404  a或等于buff自加
405  如果zx加1的和取模BYTES_PER_MPI_LIMB恒等于0则
406  array with the limbs [j--]等于a
407  a等于0
410  z加等于x
413  返回:val