summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorVishwaroop A <va@nvidia.com>2026-10-26 11:14:10 +0000
committerMark Brown <broonie@kernel.org>2026-11-09 10:51:47 +0000
commit543a83912fed1b2933bfa6f3fc2f242d487065c1 (patch)
tree6925a919d69373ae5cf6ad02769f6156a09b932b /tools/perf/scripts/python/bin
parent7475ea8b58616b33c04afb976cf0fbaad9dd63fb (diff)
spi: tegra210-quad: don't overwrite refreshed status with lost-IRQ snapshot
tegra_qspi_handle_timeout() captures a "lost IRQ" FIFO status snapshot when the ISR cache is empty on entry but QSPI_TRANS_STATUS shows the transfer completed. After masking the controller IRQ and draining the workqueue with cancel_work_sync(), it re-loads the ISR cache with smp_load_acquire(): if the drain observed a real ISR completion, the refreshed cache holds ISR-published status_reg, tx_status and rx_status that reflect the true hardware error state at IRQ time. However, when both cache and snapshot are set, the code keeps the refreshed value in the local status variable but then unconditionally publishes the pre-drain lost_fifo_status / lost_tx_status / lost_rx_status snapshot into tqspi->status_reg / tx_status / rx_status via the lost_irq_snapshot branch. That snapshot is racy: if the ISR fires on another CPU between our live QSPI_TRANS_STATUS read and our live QSPI_FIFO_STATUS snapshot, the ISR W1Cs the hardware error bits before we sample them, so the snapshot may contain zeroed error fields. Overwriting the ISR-published values with these zeros makes the manual completion handler downstream silently accept a transfer that actually reported a FIFO error. Clear lost_irq_snapshot when the refreshed cache is non-zero, so the ISR-published status wins over the pre-drain snapshot in that case. The lost-IRQ path (refreshed == 0 && live QSPI_RDY set) is unaffected. Fixes: 1ff82c13ea94 ("spi: tegra210-quad: Cache TRANS_STATUS in ISR for timeout handler") Reported-by: Carol Soto <csoto@nvidia.com> Link: https://github.com/NVIDIA/NV-Kernels/pull/579 Signed-off-by: Vishwaroop A <va@nvidia.com> Reviewed-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20261026111412.3843954-2-va@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions