Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__flip_bit

Proto:static inline int __flip_bit(unsigned int msr, u8 bit, bool set)

Type:int

Parameter:

TypeParameterName
unsigned intmsr
u8bit
boolset
65  err = -EINVAL
67  If bit > 63 Then Return err
70  err = Read an MSR with error handling*@msr: MSR to read*@m: value to read into* It returns read data only on success, otherwise it doesn't change the output* argument @m.
71  If err Then Return err
74  m1 = m
75  If set Then q |= BIT_64(bit)
77  Else q &= ~BIT_64(bit)
80  If q == q Then Return 0
83  err = Write an MSR with error handling*@msr: MSR to write*@m: value to write
84  If err Then Return err
87  Return 1
Caller
NameDescribe
msr_set_bitSet @bit in a MSR @msr.* Retval:* < 0: An error was encountered.* = 0: Bit was already set.* > 0: Hardware accepted the MSR write.
msr_clear_bitClear @bit in a MSR @msr.* Retval:* < 0: An error was encountered.* = 0: Bit was already cleared.* > 0: Hardware accepted the MSR write.