Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\debug.c Create Date:2022-07-28 10:35:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dma_debug_init

Proto:static int dma_debug_init(void)

Type:int

Parameter:Nothing

934  If Global disable flag - will be set in case of an error Then Return 0
937  When i < HASH_SIZE cycle
938  Initialization list head
939  Process spin lock initialization( & 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  When i < nr_pages cycle dma_debug_create_entries(GFP_KERNEL)
947  If num_free_entries >= umber of preallocated entries requested by kernel cmdline Then
948  pr_info("preallocated %d debug entries\n", nr_total_entries)
949  Else if num_free_entries > 0 Then
950  pr_warn("%d debug entries requested but only %d allocated\n", umber of preallocated entries requested by kernel cmdline , nr_total_entries)
952  Else
953  pr_err("debugging out of memory error - disabled\n")
954  Global disable flag - will be set in case of an error = true
956  Return 0
958  min_free_entries = num_free_entries
960  Early initialization disable flag, set at the end of dma_debug_init = true
962  pr_info("debugging enabled by kernel config\n")
963  Return 0