Function report |
Source Code:arch\x86\kernel\apb_timer.c |
Create Date:2022-07-28 08:43:30 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alled before apb_timer_enable, use early map
Proto:unsigned long apbt_quick_calibrate(void)
Type:unsigned long
Parameter:Nothing
| 355 | khz = 0 |
| 358 | apbt_set_mapping() |
| 363 | i = 10000 |
| 365 | If old != dw_apb_clocksource_read(clocksource_apbt) Then Break |
| 372 | loop = Common DW APB timer info / 1000 << 4 |
| 380 | t1 = dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer |
| 382 | Do |
| 386 | t2 = dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer |
| 388 | shift = 5 |
| 389 | If Value for the false possibility is greater at compile time(loop >> shift == 0) Then |
| 390 | printk(formational "APBT TSC calibration failed, not enough resolution\n") |
| 392 | Return 0 |
| 395 | khz = scale * Common DW APB timer info / 1000 >> shift |
| 396 | printk(formational "TSC freq calculated by APB timer is %lu khz\n", khz) |
| 397 | Return khz |
| 398 | failed : |
| 399 | Return 0 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |