Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_main.c Create Date:2022-07-28 11:42:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kdb_per_cpu - This function implements the 'per_cpu' command.

Proto:static int kdb_per_cpu(int argc, const char **argv)

Type:int

Parameter:

TypeParameterName
intargc
const char **argv
2562  nextarg = 1
2563  bytesperword = 0 , whichcpu = ~0UL
2565  If argc < 1 || argc > 3 Then Return 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  If diag Then Return diag
2572  If argc >= 2 Then
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  If diag Then Return diag
2577  If Not bytesperword Then bytesperword = KDB_WORD_SIZE
2579  Else if bytesperword > KDB_WORD_SIZE Then Return KDB_BADWIDTH
2581  sprintf(fmtstr, "%%0%dlx ", (int)(2 * bytesperword))
2582  If argc >= 3 Then
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  If diag Then Return diag
2587  kdb_printf("cpu %ld is not online\n", whichcpu)
2588  Return KDB_BADCPUNUM
2604  for_each_online_cpu(cpu)
2605  If KDB_FLAG(CMD_INTERRUPT) Then Return 0
2608  If whichcpu != ~0UL && whichcpu != cpu Then Continue
2610  addr = symaddr + KDB_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  If diag Then
2613  kdb_printf("%5d "kdb_bfd_vma_fmt0" - unable to read, diag=%d\n", cpu, addr, diag)
2615  Continue
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  Return 0