FAILED: patch "[PATCH] media: microchip-isc: synchronize the IRQ before disabling clocks on stop" failed to apply to 5.10-stable tree
Subsystems (3)
Sasha Levin
maintainerThe patch below does not apply to the 5.10-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-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 19fa5407da5ef3e605cacfcd90f70d8b2c121cd7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 19fa5407da5ef3e605cacfcd90f70d8b2c121cd7 Mon Sep 17 00:00:00 2001
From: Balakrishnan Sambath <[email protected]>
Date: Mon, 17 Aug 2026 12:22:00 +0530
Subject: [PATCH] media: microchip-isc: synchronize the IRQ before disabling
clocks on stop
isc_stop_streaming() masks the DMA interrupt and then drops the runtime PM reference, which disables the ISC clocks. microchip_isc_interrupt() may still be executing on another CPU at that point; it reads ISC_INTSR over regmap, and touching the unclocked registers triggers an external abort.
Store the IRQ number at probe and call synchronize_irq() after masking the interrupt, before dropping the PM reference.
--- drivers/media/platform/microchip/microchip-isc-base.c | 3 +++ drivers/media/platform/microchip/microchip-isc.h | 1 + drivers/media/platform/microchip/microchip-sama5d2-isc.c | 2 ++ drivers/media/platform/microchip/microchip-sama7g5-isc.c | 2 ++ 4 files changed, 8 insertions(+)
drivers/media/platform/microchip/microchip-isc-base.c +3 -0
@@ -425,6 +425,9 @@ static void isc_stop_streaming(struct vb2_queue *vq)/* Disable DMA interrupt */ regmap_write (isc->regmap,ISC_INTDIS ,ISC_INT_DDONE ); +/* let a running IRQ handler finish before the clock is disabled */ +synchronize_irq (isc->irq); +pm_runtime_put_sync (isc->dev);/* Disable stream on the sub device */
drivers/media/platform/microchip/microchip-isc.h +1 -0
@@ -287,6 +287,7 @@ struct isc_device {u32 dcfg;struct device *dev; +int irq;struct v4l2_device v4l2_dev;struct video_device video_dev;
drivers/media/platform/microchip/microchip-sama5d2-isc.c +2 -0
@@ -448,6 +448,8 @@ static int microchip_isc_probe(struct platform_device *pdev)if (irq <0 )return irq; + isc->irq = irq; + ret =devm_request_irq (dev, irq, microchip_isc_interrupt,0 ,"microchip-sama5d2-isc" , isc);if (ret <0 ) {
drivers/media/platform/microchip/microchip-sama7g5-isc.c +2 -0
@@ -437,6 +437,8 @@ static int microchip_xisc_probe(struct platform_device *pdev)if (irq <0 )return irq; + isc->irq = irq; + ret =devm_request_irq (dev, irq, microchip_isc_interrupt,0 ,"microchip-sama7g5-xisc" , isc);if (ret <0 ) {
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/1 media: microchip-isc: synchronize the IRQ before disabling clocks on stop
From: Balakrishnan Sambath <[email protected]>
[ Upstream commit 19fa5407da5ef3e605cacfcd90f70d8b2c121cd7 ]
isc_stop_streaming() masks the DMA interrupt and then drops the runtime PM reference, which disables the ISC clocks. microchip_isc_interrupt() may still be executing on another CPU at that point; it reads ISC_INTSR over regmap, and touching the unclocked registers triggers an external abort.
Store the IRQ number at probe and call synchronize_irq() after masking the interrupt, before dropping the PM reference.
--- drivers/media/platform/atmel/atmel-isc-base.c | 3 +++ drivers/media/platform/atmel/atmel-isc.h | 1 + drivers/media/platform/atmel/atmel-sama5d2-isc.c | 2 ++ 3 files changed, 6 insertions(+)
drivers/media/platform/atmel/atmel-isc-base.c +3 -0
@@ -870,6 +870,9 @@ static void isc_stop_streaming(struct vb2_queue *vq)/* Disable DMA interrupt */ regmap_write (isc->regmap,ISC_INTDIS ,ISC_INT_DDONE ); +/* let a running IRQ handler finish before the clock is disabled */ +synchronize_irq (isc->irq); +pm_runtime_put_sync (isc->dev);/* Disable stream on the sub device */
drivers/media/platform/atmel/atmel-isc.h +1 -0
@@ -194,6 +194,7 @@ struct isc_device {struct isc_clk isc_clks[2 ];struct device *dev; +int irq;struct v4l2_device v4l2_dev;struct video_device video_dev;
drivers/media/platform/atmel/atmel-sama5d2-isc.c +2 -0
@@ -163,6 +163,8 @@ static int atmel_isc_probe(struct platform_device *pdev)if (irq <0 )return irq; + isc->irq = irq; + ret =devm_request_irq (dev, irq, isc_interrupt,0 ,ATMEL_ISC_NAME , isc);if (ret <0 ) {
Signature · 1 line
2.53.0