]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 08:47:19 +0000 (10:47 +0200)
commitc078abef701da227175cf3de0f07abddb0d3b351
tree5ec5dbaf2d0d724d4036076be04564b8da6b518b
parent1ceb383def1e2da5ebfd62ef5bded9cab999963c
time64.h: consolidate uses of PSEC_PER_NSEC

[ Upstream commit 837ced3a1a5d8bb1a637dd584711f31ae6b54d93 ]

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>
Stable-dep-of: 11afdc6526de ("net: dsa: felix: tc-taprio intervals smaller than MTU should send at least one packet")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/ocelot/felix_vsc9959.c
include/linux/time64.h
net/sched/sch_taprio.c