Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Scale base by mult/div checking for overflow

Proto:static int scale64_check_overflow(u64 mult, u64 div, u64 *base)

Type:int

Parameter:

TypeParameterName
u64mult
u64div
u64 *base
1002  tmp = div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder*@dividend: 64bit dividend*@divisor: 64bit divisor*@remainder: 64bit remainder* This implementation is a comparable to algorithm used by div64_u64
1004  If sizeof(u64) * 8 - ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit < ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit || sizeof(u64) * 8 - ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit < ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit Then Return -EOVERFLOW
1007  tmp *= mult
1008  rem *= mult
1010  do_div() is NOT a C function(rem, div)
1011  base = tmp + rem
1012  Return 0
Caller
NameDescribe
adjust_historical_crosststampadjust_historical_crosststamp - adjust crosstimestamp previous to current interval*@history: Snapshot representing start of history*@partial_history_cycles: Cycle offset into history (fractional part)*@total_history_cycles: Total history length in