Messages in this thread | | | Subject | Re: [PATCH v5 1/2] sched/clock: interface to allow timestamps early in boot | From | Pasha Tatashin <> | Date | Mon, 28 Aug 2017 13:59:29 -0400 |
| |
>> void __init timekeeping_init(void) >> { >> /* >> * We must determine boot timestamp before getting current >> * persistent clock value, because implementation of >> * read_boot_clock64() might also call the persistent >> * clock, and a leap second may occur. >> */ >> >> read_boot_clock64(&boot); >> ... >> read_persistent_clock64(&now); > > No. That's the same crap just the other way round. > > s390 can do that, because the boot timestamp is correlated with the > persistent clock. Your's not so much. >
OK, how about reading the persistent clock only once, and send it's value to use for calculation of boot stamp to read_boot_clock64() via a new argument:
read_boot_clock64(&now, &boot);
Does this sound alright or is there a better way?
I would need to update read_boot_clock64() everywhere it is declared to add the __init macro, so this extra argument is not going to increase number of line changes.
Thank you, Pasha
| |