czw., 20 lut 2020 o 16:03 Linus Walleij <linus.walleij@xxxxxxxxxx> napisał(a): > > The existing use of ktime_get_real_ns() in the timestamps from > the GPIO events is dubious. > > We have had several discussions about this timestamp, and it is > unclear whether userspace has ever taken into account that a > timestamp from ktime_get_real_ns() can actually move backwards > in time relative the previous timetamp, and userspace is more > likely to expect a monotonic counter. > > Background: > https://lore.kernel.org/linux-gpio/CAK8P3a1Skvm48sje8FNDPLYqyz9Lf8q0qX1QETWtyZTxuX4k1g@xxxxxxxxxxxxxx/ > https://marc.info/?l=linux-gpio&m=151661955709074&w=2 > > The change is ABI incompatible, but incompatible in a way that > is IMO more likely to fix future bugs rather than break current > userspace. To the best of my knowledge all userspace expects > a monotonic timestamp and users are just lucky that they very > seldom move backwards in time. > > Cc: Arnd Bergmann <arnd@xxxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > --- I too am in favor of this change. Acked-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>