Skip to content

Commit 69e6048

Browse files
committed
Merge: gpu: host1x: Set up device DMA parameters
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6280 JIRA: https://issues.redhat.com/browse/RHEL-71795 ## Summary of Changes NVidia Jetson AGX Orin systems have one of their driver oops during boot: ``` [ 11.945544] ------------[ cut here ]------------ [ 11.945688] WARNING: CPU: 6 PID: 1054 at include/linux/dma-mapping.h:529 host1x_memory_context_list_init+0x234/0x2d0 [host1x] [ 11.945716] Modules linked in: nvme_core(+) mmc_core phy_tegra_xusb(+) spi_tegra114(+) host1x(+) lm90 nvme_auth tegra186_gpc_dma(+) virt_dma lrw dm_crypt trusted asn1_encoder tee dm_round_robin dm_multipath dm_snapshot dm_bufio dm_mirror dm_region_hash dm_log dm_zero dm_mod linear raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid6_pq libcrc32c raid1 raid0 squashfs be2iscsi cxgb4i cxgb4 tls libcxgbi libcxgb qla4xxx iscsi_boot_sysfs iscsi_tcp libiscsi_tcp rpcrdma sunrpc rdma_ucm ib_uverbs ib_srpt ib_isert iscsi_target_mod target_core_mod ib_iser libiscsi scsi_transport_iscsi rdma_cm ib_umad ib_ipoib iw_cm ib_cm ib_core [ 11.945772] CPU: 6 PID: 1054 Comm: systemd-udevd Tainted: G X ------- --- 5.14.0-539.el9.aarch64 #1 [ 11.945774] Hardware name: NVIDIA NVIDIA Jetson AGX Orin Developer Kit/Jetson, BIOS 36.4.0-gcid-37537400 09/13/2024 [ 11.945776] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 11.945779] pc : host1x_memory_context_list_init+0x234/0x2d0 [host1x] [ 11.945792] lr : host1x_memory_context_list_init+0x108/0x2d0 [host1x] [ 11.945803] sp : ffff80008313b7f0ith-tls transport module. [ 11.945804] x29: ffff80008313b810 x28: ffff000093e54018 x27: 0000000000000328 [ 11.945807] x26: ffffd04fce5a7be0 x25: ffffd04ff1d431b0 x24: ffffd04fce5f35b0 [ 11.945809] x23: ffff000fa2bd4100 x22: 0000003fffffffff x21: ffff000091329080 [ 11.945811] x20: ffff000091329250 x19: ffff000093e54000 x18: ffffffffffffffff [ 11.945813] x17: 0000000000000000 x16: ffffd04ff00c6130 x15: ffff000083308c4d [ 11.945816] x14: ffffffffffffffff x13: ffff000083308c4b x12: 0000000000000156 [ 11.945818] x11: 0000000000000000 x10: ffff000fa2afdff0 x9 : ffffd04fefb826d8ained in a future major release and may be disabled [ 11.945820] x8 : ffff80008313b7f0 x7 : 2e7874632d783174 x6 : 0000000000000030 [ 11.945822] x5 : 0000000000000000 x4 : 0000000000000030 x3 : 0000000000000000 [ 11.945824] x2 : 0000000000000000 x1 : ffff000083e39500 x0 : 0000000000000000gbi v0.9.1-ko (Apr. 2015) [ 11.945827] Call trace:T6 iSCSI Driver cxgb4i v0.9.5-ko (Apr. 2015) [ 11.945830] host1x_memory_context_list_init+0x234/0x2d0 [host1x] [ 11.945840] host1x_probe+0x204/0x510 [host1x]csi) [ 11.945853] platform_probe+0x6c/0xe0t=00000000835d597b [ 11.945861] really_probe+0xc4/0x3dc [ 11.945866] __driver_probe_device+0x108/0x160 [ 11.945869] driver_probe_device+0x44/0x11431) Phillip Lougher [ 11.945872] __driver_attach+0xcc/0x1f0nda-modprobe: Module edd not found [ 11.945875] bus_for_each_dev+0x7c/0xe0nda-modprobe: Module iscsi_ibft not found [ 11.945878] driver_attach+0x28/0x30 and using algorithm neonx8 [ 11.945880] bus_add_driver+0xbc/0x210 algorithm [ 11.945882] driver_register+0x70/0x120async) [ 11.945885] __platform_register_drivers+0x70/0x140_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log. [ 11.945887] tegra_host1x_init+0x44/0x1000 [host1x] [ 11.945899] do_one_initcall+0x4c/0x2e00-ioctl (2023-03-01) initialised: dm-devel@lists.linux.dev [ 11.945903] do_init_module+0x5c/0x214ound-robin: version 1.2.0 loaded [ 11.945907] load_module+0x6e0/0x7e0 [ 11.945909] __do_sys_init_module+0xe8/0x160 Events and Files... [ 11.945912] __arm64_sys_init_module+0x20/0x30ents and Files. [ 11.945914] invoke_syscall.constprop.0+0x7c/0xd0 [ 11.945918] do_el0_svc+0xb4/0xd0 hook. [ 11.945920] el0_svc+0xf0/0x200v Devices... [ 11.945925] el0t_64_sync_handler+0x134/0x150 [ 11.945927] el0t_64_sync+0x17c/0x180 [ 11.945928] ---[ end trace 0000000000000000 ]--- ``` This MR backports [fix from mainline kernel](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/host1x/context.c?id=eb0c062161cf5f98556a906c48b0cfc019d9e89c): ``` gpu: host1x: Set up device DMA parameters In order to store device DMA parameters, the DMA framework depends on the device's dma_parms field to point at a valid memory location. Add backing storage for this in struct host1x_memory_context and point to it. Reported-by: Jonathan Hunter <jonathanh@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240916133320.368620-1-thierry.reding@gmail.com (cherry picked from commit b4ad4ef) Signed-off-by: Thierry Reding <treding@nvidia.com> ``` This is my first MR for RHEL/CS9 kernel so sorry if I missed something. Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com> Approved-by: Mika Penttilä <mpenttil@redhat.com> Approved-by: Charles Mirabile <cmirabil@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Patrick Talbert <ptalbert@redhat.com>
2 parents aee396a + 6fe23c5 commit 69e6048

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/gpu/host1x/context.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ int host1x_memory_context_list_init(struct host1x *host1x)
5858
ctx->dev.parent = host1x->dev;
5959
ctx->dev.release = host1x_memory_context_release;
6060

61+
ctx->dev.dma_parms = &ctx->dma_parms;
6162
dma_set_max_seg_size(&ctx->dev, UINT_MAX);
6263

6364
err = device_add(&ctx->dev);

include/linux/host1x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ struct host1x_memory_context {
466466
refcount_t ref;
467467
struct pid *owner;
468468

469+
struct device_dma_parameters dma_parms;
469470
struct device dev;
470471
u64 dma_mask;
471472
u32 stream_id;

0 commit comments

Comments
 (0)