Jetson Thor ttyAMA10 PL011 RX DMA causes repeated kernel panic and reboot

Environment:

  • Board: Jetson Thor custom DV sample
  • Jetson Linux kernel: 6.8.12-rt-tegra #1 SMP PREEMPT_RT
  • Kernel build date: Aug 6, 2026
  • Device tree compatible: cowa,cowa+p3834-0000
  • UART: ttyAMA10
  • UART MMIO: 0x810c540000
  • IRQ: 72
  • PL011 peripheral ID: 0x00051011
  • GPCDMA RX channel: CH12
  • GPCDMA TX channel: CH22
  • GPCDMA/SMMU stream ID: 0x80c
  • Baud rate: 115200

Issue:
During a long-duration DV test, the system repeatedly panics and reboots.
The capture lasted approximately 6 days 21 hours and recorded 8 kernel panics.

All panics occur in the PL011 RX DMA receive path:

__memcpy
pl011_dma_rx_chars
pl011_dma_rx_irq
or:

__memcpy
pl011_dma_rx_chars
pl011_dma_rx_callback
vchan_complete

Six crashes run in irq/72-uart-pl0 and two run in irq/139-gpcdma.

Typical errors before the panic include:

  • tegra-gpcdma: cookie is not found
  • GPCDMA CH12 mc slave error
  • arm-smmu-v3 event 0x10
  • tegra-mc: gpcdmaw non-secure write … EMEM address decode error
  • Unable to handle kernel paging request at virtual address ffff8000…

The invalid address is used as the source of a 0x700-byte memcpy in
pl011_dma_rx_chars(). The PTE for the address is empty.

The UART is used by an IMU614 module through /dev/ttyAMA10. However, we have not yet proven that the user-space IMU test is the sole trigger. The same UART/DMA path remains enabled in the device tree.

Questions:

  1. Is this a known PL011/GPCDMA issue on Jetson Thor?

  2. Is the RX/TX DMA configuration below correct for UART10?

    dmas = <&gpcdma 12 12 TEGRA264_GPCDMA_SID_UART10>,
    <&gpcdma 12 22 TEGRA264_GPCDMA_SID_UART10>;
    dma-names = “rx”, “tx”;
    iommus = <&smmu1_mmu TEGRA264_GPCDMA_SID_UART10>;

  3. Should dmaengine_terminate_sync() or dmaengine_synchronize() be used before freeing the PL011 RX DMA buffers?

  4. Is there a known fix for a possible race between pl011_dma_rx_callback(), UART IRQ handling, and pl011_dma_shutdown()?

  5. Could the NVIDIA MMIS register mapping in amba-pl011.c be incorrect?

  6. Is this fixed in a newer Jetson Linux/JetPack release?

We can provide:

  • Full serial console log
  • Full dmesg
  • Runtime extracted device tree
  • Kernel config
  • Relevant kernel source

The repeated failures in pl011_dma_rx_chars(), together with preceding GPCDMA/SMMU errors, warrant checking both RX buffer lifetime and DMA descriptor state. The invalid memcpy
source alone does not establish a shutdown race.

Please provide the full log starting before the first DMA error, exact L4T release, running device tree, kernel configuration and matching PL011/GPCDMA sources.

Your RX/TX channel numbers appear consistent with UART10, and using the UART-specific stream ID follows the previously confirmed correction. Please verify the effective runtime
DT, including the GPCDMA controller’s per-channel IOMMU configuration, rather than only the source DTS.

For isolation, please compare:

• DMA versus PIO operation at the same baud rate and workload.
• Continuous UART operation versus repeated open/close cycles.
• PREEMPT_RT versus the corresponding non-RT kernel.

For the PIO test, remove dmas and dma-names from the effective UART node and confirm DMA is no longer used when the port opens.

Regarding teardown, the DMAengine API requires transfers and callbacks to finish before their buffers are freed. dmaengine_terminate_sync() provides that synchronization in a
sleepable context; alternatively, use dmaengine_terminate_async() followed by dmaengine_synchronize(). Do not substitute synchronous termination inside a callback or while holding
the UART spinlock, because it can deadlock. UART IRQ and polling-timer access must also be quiesced before buffer release. DMAengine documentation (https://docs.kernel.org/driver-
api/dmaengine/client.html)

Please instrument buffer allocation/free, DMA cookies, status/residue, buffer selection and shutdown entry. Validate the copy range before using it, particularly after DMA errors
or a missing cookie. This should help distinguish a stale buffer from invalid transfer accounting.

The supplied evidence does not yet establish an MMIS mapping defect or confirm that a newer release fixes this particular panic.

log_and_source.zip (806.3 KB)

Thanks for uploading log_and_source.zip. We will review the log from before the first GPCDMA/SMMU error, plus the runtime device tree, kernel config, and PL011/GPCDMA sources.

On the original questions:

  1. This is not a confirmed Thor-wide PL011/GPCDMA issue from the evidence so far. The panic is in pl011_dma_rx_chars() after GPCDMA cookie/MC errors and an SMMU translation fault on UART10 RX (CH12). That points to RX buffer / DMA descriptor state, not to UART electrical setup at 115200.

  2. UART10 RX/TX channel numbers CH12/CH22 and stream ID TEGRA264_GPCDMA_SID_UART10 (0x80c) are consistent with the Thor UART10 binding. Please still dump the runtime node, not only the source DTS:

ls /proc/device-tree/bus@0/serial@810c540000/
cat /proc/device-tree/bus@0/serial@810c540000/dmas | xxd
cat /proc/device-tree/bus@0/serial@810c540000/dma-names
cat /proc/device-tree/bus@0/serial@810c540000/iommus | xxd
ls /proc/device-tree/bus@0/serial@810c540000/dma-coherent

Also check the GPCDMA controller’s per-channel IOMMU settings. Confirm dma-coherent is present on the live UART10 node.

  1. Yes. DMA buffers must not be freed until outstanding transfers and callbacks have finished. Use dmaengine_terminate_sync() in a sleepable context, or dmaengine_terminate_async() followed by dmaengine_synchronize(). Do not call synchronous terminate from a DMA callback or while holding the UART spinlock. UART IRQ and any RX polling timer must be quiesced before buffer release.

  2. A teardown race is possible, but the empty-PTE memcpy alone does not prove pl011_dma_shutdown() is the trigger. The preceding “cookie is not found” / SMMU event 0x10 / MC decode error means the DMA path was already invalid. The 0x700-byte copy also looks like an in-range length with a stale dbuf->buf, not a residue overflow.

  3. The current logs do not show an MMIS register-mapping defect in amba-pl011.c.

  4. We cannot confirm that a newer Jetson Linux / JetPack release fixes this panic.

Please run these isolation tests on the same IMU load and baud rate:

  • PIO: remove dmas and dma-names from the effective UART10 node, reboot, and confirm the port opens without DMA. If PIO is stable, the UART PHY/wiring can be ruled out.
  • Open/close: compare one long-lived ttyAMA10 session versus the IMU daemon repeatedly opening and closing the port.
  • RT vs non-RT: run the same test on the corresponding non-PREEMPT_RT kernel.

If possible, also note whether /dev/ttyAMA10 stays open across the 6–7 day run, and capture dmesg from the first tegra-gpcdma: cookie is not found (or SMMU event 0x10) through the first panic.

According to the suggestions you provided, we will conduct a DMA/PIO comparison experiment using a set of equipment. We will run DMA for a certain period of time a few days ago, and then switch to PIO for the same duration.