函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__clocksource_update_freq_scale - Used update clocksource with new freq*@cs: clocksource to be registered*@scale: Scale factor multiplied against freq to get clocksource hz*@freq: clocksource frequency (cycles per second) divided by scale

函数原型:void __clocksource_update_freq_scale(struct clocksource *cs, unsigned int scale, unsigned int freq)

返回类型:void

参数:

类型参数名称
struct clocksource *cs
unsigned intscale
unsigned intfreq
866  如果freq
876  sec等于mask
877  do_div() is NOT a C function(sec, freq)
878  do_div() is NOT a C function(sec, scale)
879  如果非secsec等于1
881  否则如果sec大于600且mask大于UINT_MAXsec等于600
884  locks_calc_mult_shift - calculate mult/shift factors for scaled math of clocks*@mult: pointer to mult variable*@shift: pointer to shift variable*@from: frequency to convert from*@to: frequency to convert to*@maxsec: guaranteed runtime conversion range in
891  maxadj等于locksource_max_adjustment- Returns max adjustment amount*@cs: Pointer to clocksource
892 freqmultmaxadj小于multmultmaxadj大于mult的值循环
894  mult右移等于1位
895  shift自减
896  maxadj等于locksource_max_adjustment- Returns max adjustment amount*@cs: Pointer to clocksource
903  WARN_ONCE(mult + maxadj < mult, "timekeeping: Clocksource %s might overflow on 11%% adjustment\n", name)
907  locksource_update_max_deferment - Updates the clocksource max_idle_ns & max_cycles*@cs: Pointer to clocksource to be updated
909  打印信息("%s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n", name, mask, max_cycles, max_idle_ns)
调用者
名称描述
__clocksource_register_scale__clocksource_register_scale - Used to install new clocksources*@cs: clocksource to be registered*@scale: Scale factor multiplied against freq to get clocksource hz*@freq: clocksource frequency (cycles per second) divided by scale