time64.h: consolidate uses of PSEC_PER_NSEC
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 28 Jun 2022 14:52:38 +0000 (17:52 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 1 Jul 2022 04:18:16 +0000 (21:18 -0700)
commit837ced3a1a5d8bb1a637dd584711f31ae6b54d93
tree5ff0dddc936cd8561624623fe3ae925492460bff
parent55a515b1f5a97df5704a1788fe97a4a740be2b9e
time64.h: consolidate uses of PSEC_PER_NSEC

Time-sensitive networking code needs to work with PTP times expressed in
nanoseconds, and with packet transmission times expressed in
picoseconds, since those would be fractional at higher than gigabit
speed when expressed in nanoseconds.

Convert the existing uses in tc-taprio and the ocelot/felix DSA driver
to a PSEC_PER_NSEC macro. This macro is placed in include/linux/time64.h
as opposed to its relatives (PSEC_PER_SEC etc) from include/vdso/time64.h
because the vDSO library does not (yet) need/use it.

Cc: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> # for the vDSO parts
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix_vsc9959.c
include/linux/time64.h
net/sched/sch_taprio.c