FAILED: patch "[PATCH] iio: imu: inv_mpu6050: stabilized timestamping in interrupt" failed to apply to 6.6-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 8844ed0a6e063acf7173b231021b2d301e31ded9
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024061730-float-nephew-920b@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
8844ed0a6e06 ("iio: imu: inv_mpu6050: stabilized timestamping in interrupt") bf8367b00c33 ("iio: invensense: fix timestamp glitches when switching frequency") a1432b5b4f4c ("iio: imu: inv_icm42600: add support of ICM-42686-P") 5537f653d9be ("iio: imu: inv_mpu6050: add new interrupt handler for WoM events") b58b13f156c0 ("iio: invensense: remove redundant initialization of variable period")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8844ed0a6e063acf7173b231021b2d301e31ded9 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Maneyrol <[email protected]>
Date: Mon, 27 May 2024 15:01:17 +0000
Subject: [PATCH] iio: imu: inv_mpu6050: stabilized timestamping in interrupt
Use IRQ ONESHOT flag to ensure the timestamp is not updated in the hard handler during the thread handler. And use a fixed value of 1 sample that correspond to this first timestamp.
This way we can ensure the timestamp is always corresponding to the value used by the timestamping mechanism. Otherwise, it is possible that between FIFO count read and FIFO processing the timestamp is overwritten in the hard handler.
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c +2 -2
@@ -100,8 +100,8 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p) goto end_session;/* Each FIFO data contains all sensors, so same number for FIFO and sensor data */ fifo_period =NSEC_PER_SEC /INV_MPU6050_DIVIDER_TO_FIFO_RATE (st->chip_config.divider); -inv_sensors_timestamp_interrupt (&st->timestamp, nb, pf->timestamp); -inv_sensors_timestamp_apply_odr (&st->timestamp, fifo_period, nb,0 ); +inv_sensors_timestamp_interrupt (&st->timestamp,1 , pf->timestamp); +inv_sensors_timestamp_apply_odr (&st->timestamp, fifo_period,1 ,0 );/* clear internal data buffer for avoiding kernel data leak */ memset (data,0 ,sizeof (data));
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +1 -0
@@ -300,6 +300,7 @@ int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev, int irq_type)if (!st->trig)return -ENOMEM ; + irq_type |=IRQF_ONESHOT ; ret = devm_request_threaded_irq(&indio_dev->dev, st->irq, &inv_mpu6050_interrupt_timestamp, &inv_mpu6050_interrupt_handle,