Kurt Kanzenbach c6d5f19330 net: stmmac: Calculate CDC error only once
The clock domain crossing error (CDC) is calculated at every fetch of Tx or Rx
timestamps. It includes a division. Especially on arm32 based systems it is
expensive. It also requires two conditionals in the hotpath.

Add a compensation value cache to struct plat_stmmacenet_data and subtract it
unconditionally in the RX/TX functions which spares the conditionals.

The value is initialized to 0 and if supported calculated in the PTP
initialization code.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Link: https://lore.kernel.org/r/20211122111931.135135-1-kurt@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-23 20:11:05 -08:00
..
2021-11-10 11:52:40 -08:00
2021-11-06 14:36:12 -07:00
2021-11-09 11:24:08 -08:00
2021-11-13 09:11:33 -08:00
2021-11-01 10:09:14 -07:00
2021-11-04 08:21:47 -07:00
2021-11-14 11:11:51 -08:00
2021-11-02 11:24:14 -07:00
2021-11-03 17:00:52 -07:00
2021-11-06 14:36:12 -07:00
2021-11-08 11:49:48 -08:00
2021-11-10 11:47:55 -08:00
2021-11-12 12:11:07 -08:00
2021-11-05 08:42:02 -07:00
2021-11-08 11:55:21 -08:00
2021-11-12 12:11:07 -08:00
2021-11-04 13:56:55 -07:00
2021-11-10 11:36:43 -08:00
2021-11-06 14:36:12 -07:00
2021-11-09 11:24:08 -08:00
2021-11-10 11:52:40 -08:00
2021-11-06 14:36:12 -07:00
2021-11-10 11:36:43 -08:00
2021-11-10 11:52:40 -08:00
2021-10-26 19:12:01 +02:00
2021-11-09 11:24:08 -08:00
2021-11-10 10:56:02 -08:00
2021-11-09 11:20:07 -08:00
2021-11-14 11:11:51 -08:00
2021-11-02 15:58:39 -07:00
2021-11-10 11:36:43 -08:00
2021-11-08 12:07:52 -08:00
2021-11-03 17:00:52 -07:00
2021-11-10 09:07:26 -08:00
2021-11-12 11:44:31 -08:00
2021-11-12 12:25:50 -08:00
2021-11-01 19:09:04 -07:00
2021-11-12 12:25:50 -08:00
2021-11-04 08:21:47 -07:00
2021-11-11 09:40:15 -08:00
2021-11-03 15:00:39 -07:00
2021-11-17 11:04:02 +01:00
2021-11-10 09:41:22 -08:00
2021-11-10 11:14:21 -08:00