]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1bf54e26b2b9bea20f890c5dab0a4fe12e26d095
tree5ff0dddc936cd8561624623fe3ae925492460bff
parenteb99ed107125faf72fd3f65930542bae1de10a27
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