Small BAR not working
[ 1962.904087] ------------[ cut here ]------------
[ 1962.904094] ioremap on RAM at 0x0000000000000000 - 0x0000000003bfffff
[ 1962.904103] WARNING: CPU: 3 PID: 1445 at arch/x86/mm/ioremap.c:211 __ioremap_caller.constprop.0+0x340/0x370
[ 1962.904117] Modules linked in: xe(+) drm_ttm_helper ttm video gpu_sched i2c_algo_bit drm_suballoc_helper drm_display_helper drm_kms_helper syscopyarea sysfillrect sysimgblt drm_buddy drm drm_panel_orientation_quirks cfbfillrect cfbimgblt cfbcopyarea fb fbdev fuse xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_filter br_netfilter xt_REDIRECT iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 n
f_defrag_ipv4 overlay x86_pkg_temp_thermal coretemp mei_pxp kvm_intel mei_hdcp wmi_bmof mxm_wmi btusb btrtl kvm btbcm irqbypass btintel crct10dif_pclmul crc32_pclmul bluetooth ecdh_generic ghash_clmulni_intel ecc mei_me mei wmi ip_tables x_tables e1000e ptp i2c_i801 pps_core i2c_smbus [last unloaded: drm_panel_orientation_quirks]
[ 1962.904413] CPU: 3 PID: 1445 Comm: modprobe Tainted: G U 6.1.0-xe-demarchi+ #2
[ 1962.904422] Hardware name: Gigabyte Technology Co., Ltd. GB-Z390 Garuda/GB-Z390 Garuda-CF, BIOS IG1b 09/10/2019
[ 1962.904428] RIP: 0010:__ioremap_caller.constprop.0+0x340/0x370
[ 1962.904439] Code: 01 80 3d c8 6c 90 02 00 75 f0 48 8d 54 24 68 48 8d b4 24 88 00 00 00 48 c7 c7 80 eb 84 82 c6 05 ab 6c 90 02 01 e8 39 1d 29 01 <0f> 0b eb cc bf 02 00 00 00 e8 a2 c4 ff ff 48 09 44 24 10 e9 62 fe
[ 1962.904447] RSP: 0018:ffff888140e0f530 EFLAGS: 00010286
[ 1962.904458] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ 1962.904464] RDX: 0000000000000001 RSI: ffffffff81156574 RDI: ffffed10281c1e96
[ 1962.904471] RBP: 0000000003bfffff R08: 0000000000000001 R09: ffff88885d9b77eb
[ 1962.904477] R10: ffffed110bb36efd R11: 0000000000000001 R12: 0000000003c00000
[ 1962.904484] R13: 0000000000000001 R14: 1ffff110281c1eab R15: ffff88811b51c0d0
[ 1962.904491] FS: 00007f9d68a72740(0000) GS:ffff88885d980000(0000) knlGS:0000000000000000
[ 1962.904498] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1962.904504] CR2: 000056337e356448 CR3: 000000014ae6e001 CR4: 00000000003706e0
[ 1962.904511] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1962.904517] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1962.904524] Call Trace:
[ 1962.904529] <TASK>
[ 1962.904535] ? devm_ioremap_wc+0x44/0x90
[ 1962.904552] ? iounmap+0xe0/0xe0
[ 1962.904568] ? devm_ioremap_wc+0x31/0x90
[ 1962.904578] ? rcu_read_lock_sched_held+0x3f/0x70
[ 1962.904588] ? trace_kmalloc+0x33/0xe0
[ 1962.904596] ? __kmalloc_node_track_caller+0x70/0xb0
[ 1962.904609] ? devm_of_iomap+0x10/0x10
[ 1962.904626] devm_ioremap_wc+0x44/0x90
[ 1962.904640] xe_ttm_stolen_mgr_init+0x3c0/0x670 [xe]
[ 1962.904905] ? xe_ttm_stolen_inaccessible+0x40/0x40 [xe]
[ 1962.905221] ? xe_device_mem_access_put+0x5a/0x90 [xe]
[ 1962.905472] xe_device_probe+0x27c/0x350 [xe]
[ 1962.905718] xe_pci_probe+0x8aa/0xa10 [xe]
[ 1962.906027] pci_device_probe+0xf9/0x200
[ 1962.906060] really_probe+0x13b/0x530
[ 1962.906079] __driver_probe_device+0xca/0x210
[ 1962.906095] driver_probe_device+0x4a/0xf0
[ 1962.906108] __driver_attach+0x135/0x290
[ 1962.906122] ? __device_attach_driver+0x160/0x160
[ 1962.906132] bus_for_each_dev+0xf9/0x160
[ 1962.906143] ? subsys_dev_iter_exit+0x10/0x10
[ 1962.906171] bus_add_driver+0x29c/0x2f0
[ 1962.906191] driver_register+0x10d/0x1a0
[ 1962.906203] ? xe_hw_fence_module_init+0x35/0x35 [xe]
[ 1962.906443] do_one_initcall+0xce/0x3f0
[ 1962.906455] ? trace_event_raw_event_initcall_level+0x170/0x170
[ 1962.906483] ? kasan_unpoison+0x23/0x50
[ 1962.906503] do_init_module+0xe4/0x320
[ 1962.906523] load_module+0x331e/0x3560
[ 1962.906580] ? module_frob_arch_sections+0x20/0x20
[ 1962.906603] ? kernel_read_file+0x2fe/0x3f0
[ 1962.906668] ? __do_sys_finit_module+0x10d/0x1b0
[ 1962.906679] __do_sys_finit_module+0x10d/0x1b0
[ 1962.906692] ? __do_sys_init_module+0x1f0/0x1f0
[ 1962.906736] ? mark_held_locks+0x24/0x90
[ 1962.906751] ? lockdep_hardirqs_on_prepare+0x124/0x230
[ 1962.906762] ? syscall_enter_from_user_mode+0x1c/0x50
[ 1962.906782] do_syscall_64+0x37/0x90
[ 1962.906793] entry_SYSCALL_64_after_hwframe+0x63/0xcd
That is pointing to:
0x48490 is in xe_ttm_stolen_mgr_init (../drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c:154).
149
150 drm_dbg_kms(&xe->drm, "Initialized stolen memory support with %llu bytes\n",
151 stolen_size);
152
153 if (!xe_ttm_stolen_inaccessible(xe))
154 mgr->mapping = devm_ioremap_wc(&pdev->dev, mgr->io_base, stolen_size);
155 }
156
157 u64 xe_ttm_stolen_io_offset(struct xe_bo *bo, u32 offset)
This is happening on a CFL with DG2 (not possible to enable Resizable BAR). Tested on commit fe93b2c0 ("drm/xe/rtp: Support multiple actions per entry")