File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1503,14 +1503,17 @@ void __weak read_persistent_clock64(struct timespec64 *ts64)
1503
1503
* Weak dummy function for arches that do not yet support it.
1504
1504
* wall_time - current time as returned by persistent clock
1505
1505
* boot_offset - offset that is defined as wall_time - boot_time
1506
- * default to 0.
1506
+ * The default function calculates offset based on the current value of
1507
+ * local_clock(). This way architectures that support sched_clock() but don't
1508
+ * support dedicated boot time clock will provide the best estimate of the
1509
+ * boot time.
1507
1510
*/
1508
1511
void __weak __init
1509
1512
read_persistent_wall_and_boot_offset (struct timespec64 * wall_time ,
1510
1513
struct timespec64 * boot_offset )
1511
1514
{
1512
1515
read_persistent_clock64 (wall_time );
1513
- * boot_offset = ( struct timespec64 ){ 0 } ;
1516
+ * boot_offset = ns_to_timespec64 ( local_clock ()) ;
1514
1517
}
1515
1518
1516
1519
/* Flag for if timekeeping_resume() has injected sleeptime */
You can’t perform that action at this time.
0 commit comments