Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpuid.c Create Date:2022-07-28 08:19:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cpuid_read

Proto:static ssize_t cpuid_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *buf
size_tcount
loff_t *ppos
65  __user * tmp = buf
67  cpu = iminor(file_inode(file))
68  pos = ppos
69  bytes = 0
70  err = 0
72  If count % 16 Then Return -EINVAL
75  init_completion( & done)
76  When count cycle
77  call_single_data_t csd = {func = cpuid_smp_cpuid, info = & cmd, }
82  eax = pos
83  ecx = pos >> 32
85  err = smp_call_function_single_async(cpu, & csd)
86  If err Then Break
88  wait_for_completion( & done)
89  If copy_to_user(tmp, & regs, 16) Then
90  err = -EFAULT
91  Break
93  tmp += 16
94  bytes += 16
95  ppos = ++pos
96  _completion - reinitialize a completion structure*@x: pointer to completion structure that is to be reinitialized* This inline function should be used to reinitialize a completion structure so it can* be reused
99  Return If bytes Then bytes Else err