函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\debug.c Create Date:2022-07-27 11:34:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:dma_debug_init

函数原型:static int dma_debug_init(void)

返回类型:int

参数:

934  如果Global disable flag - will be set in case of an error 则返回:0
937 i小于HASH_SIZE循环
938  初始化链表头
939  spin_lock_init( & lock)
942  dma_debug_fs_init()
944  nr_pages等于DIV_ROUND_UP(umber of preallocated entries requested by kernel cmdline , If the pool runs out, add this many new entries at once )
945 i小于nr_pages循环dma_debug_create_entries(GFP_KERNEL)
947  如果num_free_entries大于等于umber of preallocated entries requested by kernel cmdline
948  打印信息("preallocated %d debug entries\n", nr_total_entries)
949  否则如果num_free_entries大于0则
950  打印警告信息("%d debug entries requested but only %d allocated\n", umber of preallocated entries requested by kernel cmdline , nr_total_entries)
952  否则
953  打印错误信息("debugging out of memory error - disabled\n")
954  Global disable flag - will be set in case of an error = true
956  返回:0
958  min_free_entries等于num_free_entries
960  Early initialization disable flag, set at the end of dma_debug_init = true
962  打印信息("debugging enabled by kernel config\n")
963  返回:0