Asad Kamal and Alex Deucher
f9e5f51549
drm/amdgpu: fix aperture iounmap skipped on device removal
...
amdgpu_pci_remove() calls drm_dev_unplug() before invoking the fini
routines. After drm_dev_unplug() the drm_dev_enter() guard in
amdgpu_ttm_fini() always returns false, so iounmap() for
aper_base_kaddr is silently skipped. On connected_to_cpu hardware
ioremap_cache() maps the aperture as WB; when iounmap() is skipped the
stale WB PAT entry persists. On reload IP discovery's
memremap(MEMREMAP_WC) on the same aperture range hits a WB/WC conflict,
producing an ioremap error and failing re-probe.
Remove the drm_dev_enter() guard and call iounmap() unconditionally.
The aperture mapping is plain MMIO and does not require device-presence
protection. Surprise-removal cleanup of aper_base_kaddr is already
handled unconditionally by amdgpu_device_unmap_mmio().
Fixes: 62d5f9f711 ("drm/amdgpu: Unmap MMIO mappings when device is not unplugged")
Signed-off-by: Asad Kamal <asad.kamal@amd.com >
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
(cherry picked from commit fb3f68af9f6fce9343a2bd13b4d68a1c02d283df)
Cc: stable@vger.kernel.org
2026-08-06 14:34:02 -04:00
..
2026-07-01 13:00:26 -04:00
2026-05-19 11:51:39 -04:00
2026-07-28 19:59:22 -04:00
2026-05-11 15:55:55 -04:00
2026-07-28 19:59:22 -04:00
2026-06-17 18:24:38 -04:00
2026-06-17 18:24:38 -04:00
2026-05-19 11:52:03 -04:00
2026-07-17 17:39:00 -04:00
2026-04-17 15:24:12 -04:00
2026-05-19 11:49:25 -04:00
2026-08-06 14:32:33 -04:00
2026-06-17 18:26:40 -04:00
2026-06-04 15:24:29 -04:00
2026-07-28 20:01:06 -04:00
2026-08-06 14:32:54 -04:00
2026-08-06 14:32:54 -04:00
2026-08-06 14:33:46 -04:00
2026-07-28 19:59:44 -04:00
2026-04-24 10:57:16 -04:00
2026-07-28 20:00:49 -04:00
2026-05-25 10:45:38 +02:00
2026-05-11 16:15:31 -04:00
2026-06-03 13:50:42 -04:00
2026-06-03 14:02:04 -04:00
2026-07-01 13:01:05 -04:00
2026-06-17 18:13:35 -04:00
2026-06-03 13:59:29 -04:00
2026-07-01 13:01:48 -04:00
2026-06-03 13:53:46 -04:00
2026-06-17 18:27:50 -04:00
2026-07-01 13:01:05 -04:00
2026-04-24 10:58:38 -04:00
2026-04-24 10:58:16 -04:00
2026-06-17 18:36:38 -04:00
2026-04-17 14:43:29 +02:00
2026-04-17 14:43:29 +02:00
2026-07-28 20:01:06 -04:00
2026-08-06 14:32:11 -04:00
2026-06-04 15:24:22 -04:00
2026-06-03 13:58:57 -04:00
2026-06-04 15:25:46 -04:00
2026-07-01 13:01:35 -04:00
2026-04-24 10:44:52 -04:00
2026-04-28 14:28:52 -04:00
2026-04-28 14:28:52 -04:00
2026-07-17 17:38:33 -04:00
2026-05-19 11:45:42 -04:00
2026-07-28 19:59:44 -04:00
2026-07-28 19:37:26 -04:00
2026-06-03 13:52:57 -04:00
2026-06-03 13:59:29 -04:00
2026-06-03 13:59:29 -04:00
2026-06-04 15:24:13 -04:00
2026-04-28 14:28:58 -04:00
2026-05-11 15:55:56 -04:00
2026-05-05 09:56:28 -04:00
2026-06-03 13:57:32 -04:00
2026-05-11 16:15:31 -04:00
2026-05-11 16:15:31 -04:00
2026-06-03 13:53:00 -04:00
2026-06-03 13:57:24 -04:00
2026-04-17 14:43:29 +02:00
2026-08-06 14:34:02 -04:00
2026-07-01 13:02:00 -04:00
2026-05-19 11:45:41 -04:00
2026-06-04 15:24:40 -04:00
2026-05-11 16:08:42 -04:00
2026-08-06 14:32:23 -04:00
2026-06-03 13:55:33 -04:00
2026-07-01 12:58:25 -04:00
2026-07-01 12:58:30 -04:00
2026-05-11 16:15:39 -04:00
2026-06-03 13:55:41 -04:00
2026-06-03 13:55:41 -04:00
2026-05-07 09:50:50 +10:00
2026-04-28 14:42:22 -04:00
2026-05-19 11:54:32 -04:00
2026-05-07 09:50:50 +10:00
2026-07-28 19:59:08 -04:00
2026-07-01 13:00:54 -04:00
2026-06-03 13:50:46 -04:00
2026-05-11 16:15:55 -04:00
2026-05-06 10:12:25 +10:00
2026-06-04 15:24:22 -04:00
2026-07-28 19:59:22 -04:00
2026-06-03 13:50:32 -04:00
2026-05-19 11:51:56 -04:00
2026-05-19 11:51:56 -04:00
2026-04-17 15:41:12 -04:00
2026-04-24 11:10:05 -04:00
2026-04-21 16:51:28 -04:00
2026-07-01 12:57:46 -04:00
2026-07-01 12:57:49 -04:00
2026-07-01 12:57:52 -04:00
2026-07-08 16:37:12 -04:00
2026-07-01 13:01:48 -04:00
2026-08-06 14:31:42 -04:00
2026-04-24 10:57:13 -04:00
2026-07-01 13:02:32 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-07-01 13:01:48 -04:00
2026-06-03 13:53:51 -04:00
2026-08-06 14:33:02 -04:00
2026-06-17 18:36:31 -04:00
2026-04-24 10:58:38 -04:00
2026-07-01 13:01:48 -04:00
2026-04-24 10:58:33 -04:00
2026-04-28 15:51:17 -04:00
2026-04-28 15:51:18 -04:00
2026-04-28 15:51:18 -04:00
2026-07-01 13:02:53 -04:00
2026-08-06 14:31:27 -04:00
2026-04-28 15:51:18 -04:00
2026-08-06 14:31:13 -04:00
2026-07-01 13:00:58 -04:00
2026-04-28 15:51:18 -04:00
2026-08-06 14:31:34 -04:00
2026-05-18 18:07:34 -04:00
2026-06-04 15:24:22 -04:00
2026-07-28 19:59:08 -04:00
2026-07-01 13:01:48 -04:00
2026-07-01 13:01:29 -04:00
2026-07-01 13:01:29 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:28 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:10 -04:00
2026-06-04 15:24:13 -04:00
2026-07-28 19:59:44 -04:00
2026-04-24 10:57:02 -04:00
2026-04-24 10:56:58 -04:00
2026-04-28 14:28:58 -04:00
2026-07-28 19:37:26 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-04-17 15:41:14 -04:00
2026-07-28 19:59:44 -04:00
2026-04-17 15:41:12 -04:00
2026-04-17 15:41:12 -04:00
2026-05-05 09:56:51 -04:00
2026-07-01 12:58:01 -04:00
2026-07-01 12:58:03 -04:00
2026-07-01 12:58:05 -04:00
2026-07-01 12:58:07 -04:00
2026-07-01 12:58:09 -04:00
2026-07-01 12:58:11 -04:00
2026-04-17 15:41:12 -04:00
2026-04-28 14:28:58 -04:00
2026-07-28 19:59:59 -04:00
2026-07-01 12:57:39 -04:00
2026-04-28 14:28:58 -04:00
2026-05-27 10:50:11 -04:00
2026-04-24 11:09:58 -04:00
2026-05-18 18:17:54 -04:00
2026-05-18 18:18:01 -04:00
2026-05-18 18:19:05 -04:00
2026-04-28 15:51:17 -04:00
2026-04-28 15:51:17 -04:00
2026-04-28 15:51:18 -04:00
2026-05-11 16:15:31 -04:00
2026-04-28 15:51:17 -04:00
2026-07-01 12:58:28 -04:00
2026-07-28 19:37:26 -04:00
2026-05-11 16:15:31 -04:00
2026-04-28 15:51:17 -04:00
2026-06-03 13:50:46 -04:00
2026-05-11 16:15:55 -04:00