函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kdb_per_cpu - This function implements the 'per_cpu' command.

函数原型:static int kdb_per_cpu(int argc, const char **argv)

返回类型:int

参数:

类型参数名称
intargc
const char **argv
2562  nextarg等于1
2563  bytesperword等于0, whichcpu等于0UL的反
2565  如果argc小于1或argc大于3则返回:KDB_ARGCOUNT
2568  diag等于kdbgetaddrarg - This function is responsible for parsing an* address-expression and returning the value of the expression,* symbol name, and offset to the caller
2569  如果diag则返回:diag
2572  如果argc大于等于2则
2573  diag等于kdbgetularg - This function will convert a numeric string into an* unsigned long value.* Parameters:* arg A character string representing a numeric value* Outputs:* *value the unsigned long represntation of arg.* Returns:
2574  如果diag则返回:diag
2577  如果非bytesperwordbytesperword等于KDB_WORD_SIZE
2579  否则如果bytesperword大于KDB_WORD_SIZE则返回:KDB_BADWIDTH
2581  输出格式化串
2582  如果argc大于等于3则
2583  diag等于kdbgetularg - This function will convert a numeric string into an* unsigned long value.* Parameters:* arg A character string representing a numeric value* Outputs:* *value the unsigned long represntation of arg.* Returns:
2584  如果diag则返回:diag
2586  如果whichcpu大于等于CPU数量或非cpu_online(whichcpu)则
2587  kdb_printf("cpu %ld is not online\n", whichcpu)
2588  返回:KDB_BADCPUNUM
2604  遍历在线CPU(cpu)
2605  如果KDB_FLAG(CMD_INTERRUPT)则返回:0
2608  如果whichcpu不等于0UL的反且whichcpu不等于cpu则继续下一循环
2610  addr等于symaddrKDB_PCU(cpu)
2611  diag等于kdb_getword - Read a binary value. Unlike kdb_getarea, this treats* data as numbers.* Inputs:* word Pointer to the word to receive the result.* addr Address of the area to copy.* size Size of the area.* Returns:* 0 for success, < 0 for error.
2612  如果diag
2613  kdb_printf("%5d "kdb_bfd_vma_fmt0" - unable to read, diag=%d\n", cpu, addr, diag)
2615  继续下一循环
2617  kdb_printf("%5d ", cpu)
2618  kdb_md - This function implements the 'md', 'md1', 'md2', 'md4',* 'md8' 'mdr' and 'mds' commands.* md|mds [ [ []]]* mdWcN [ [ []]]* where W = is the width (1, 2, 4 or 8) and N is the count.* for eg
2623  返回:0