Repository navigation
Commit 3eca993
timekeeping: Replace read_boot_clock64() with read_persistent_wall_and_boot_offset()
If architecture does not support exact boot time, it is challenging to
estimate boot time without having a reference to the current persistent
clock value. Yet, it cannot read the persistent clock time again, because
this may lead to math discrepancies with the caller of read_boot_clock64()
who have read the persistent clock at a different time.
This is why it is better to provide two values simultaneously: the
persistent clock value, and the boot time.
Replace read_boot_clock64() with:
read_persistent_wall_and_boot_offset(wall_time, boot_offset)
Where wall_time is returned by read_persistent_clock() And boot_offset is
wall_time - boot time, which defaults to 0.
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: steven.sistare@oracle.com
Cc: daniel.m.jordan@oracle.com
Cc: linux@armlinux.org.uk
Cc: schwidefsky@de.ibm.com
Cc: heiko.carstens@de.ibm.com
Cc: john.stultz@linaro.org
Cc: sboyd@codeaurora.org
Cc: hpa@zytor.com
Cc: douly.fnst@cn.fujitsu.com
Cc: peterz@infradead.org
Cc: prarit@redhat.com
Cc: feng.tang@intel.com
Cc: pmladek@suse.com
Cc: gnomes@lxorguk.ukuu.org.uk
Cc: linux-s390@vger.kernel.org
Cc: boris.ostrovsky@oracle.com
Cc: jgross@suse.com
Cc: pbonzini@redhat.com
Link: https://lkml.kernel.org/r/20180719205545.16512-16-pasha.tatashin@oracle.com1 parent be2e0e4 commit 3eca993
2 files changed
Lines changed: 32 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
1496 | 1497 | | |
1497 | 1498 | | |
1498 | 1499 | | |
1499 | | - | |
| 1500 | + | |
| 1501 | + | |
1500 | 1502 | | |
1501 | 1503 | | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1506 | 1507 | | |
1507 | | - | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
1508 | 1511 | | |
1509 | | - | |
1510 | | - | |
| 1512 | + | |
| 1513 | + | |
1511 | 1514 | | |
1512 | 1515 | | |
1513 | 1516 | | |
| |||
1521 | 1524 | | |
1522 | 1525 | | |
1523 | 1526 | | |
| 1527 | + | |
1524 | 1528 | | |
1525 | 1529 | | |
1526 | 1530 | | |
1527 | | - | |
1528 | | - | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | 1531 | | |
1538 | | - | |
1539 | | - | |
1540 | | - | |
1541 | | - | |
1542 | | - | |
1543 | | - | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
1544 | 1539 | | |
1545 | 1540 | | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
1546 | 1550 | | |
1547 | 1551 | | |
1548 | 1552 | | |
| |||
1552 | 1556 | | |
1553 | 1557 | | |
1554 | 1558 | | |
1555 | | - | |
| 1559 | + | |
1556 | 1560 | | |
1557 | | - | |
1558 | | - | |
1559 | 1561 | | |
1560 | | - | |
1561 | | - | |
| 1562 | + | |
1562 | 1563 | | |
1563 | 1564 | | |
1564 | 1565 | | |
| |||
0 commit comments