Marek Szyprowski
957e6f437d
drm/exynos: Fix cleanup of IOMMU related objects
[ Upstream commit 07dc3678ba ]
Store the IOMMU mapping created by the device core of each Exynos DRM
sub-device and restore it when the Exynos DRM driver is unbound. This
fixes IOMMU initialization failure for the second time when a deferred
probe is triggered from the bind() callback of master's compound DRM
driver. This also fixes the following issue found using kmemleak
detector:
unreferenced object 0xc2137640 (size 64):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
50 a3 14 c2 80 a2 14 c2 01 00 00 00 20 00 00 00 P........... ...
00 10 00 00 00 80 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
[<8cd12507>] 0x0
unreferenced object 0xc214a280 (size 128):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
00 a0 ec ed 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
[<8cd12507>] 0x0
unreferenced object 0xedeca000 (size 4096):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
[<8cd12507>] 0x0
unreferenced object 0xc214a300 (size 128):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
00 a3 14 c2 00 a3 14 c2 00 40 18 c2 00 80 18 c2 .........@......
02 00 02 00 ad 4e ad de ff ff ff ff ff ff ff ff .....N..........
backtrace:
[<08cbd8bc>] iommu_domain_alloc+0x24/0x50
[<b835abee>] arm_iommu_create_mapping+0xe4/0x134
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-01 11:01:53 +02:00
..
2020-04-01 11:01:53 +02:00
2020-01-17 19:49:05 +01:00
2019-08-14 18:31:10 +02:00
2019-08-14 19:27:26 +02:00
2019-09-19 16:24:24 -07:00
2020-02-11 04:35:36 -08:00
2019-08-06 09:20:58 +02:00
2020-03-25 08:25:59 +01:00
2019-10-29 18:12:24 +01:00
2020-04-01 11:01:53 +02:00
2019-08-10 15:41:48 +02:00
2020-02-24 08:36:22 +01:00
2020-03-12 13:00:26 +01:00
2019-08-14 18:30:52 +02:00
2019-12-13 08:42:56 +01:00
2020-03-18 07:17:56 +01:00
2019-08-27 16:52:12 +10:00
2020-02-24 08:36:36 +01:00
2019-09-19 16:24:24 -07:00
2020-01-09 10:19:41 +01:00
2020-03-25 08:25:42 +01:00
2019-12-31 16:43:09 +01:00
2019-12-21 11:04:54 +01:00
2020-03-12 13:00:12 +01:00
2019-08-13 09:09:30 +02:00
2020-02-28 17:22:21 +01:00
2019-10-03 09:59:29 +02:00
2020-02-24 08:36:33 +01:00
2020-03-12 13:00:26 +01:00
2019-08-09 09:15:05 +02:00
2020-02-24 08:36:22 +01:00
2019-07-17 12:52:55 +02:00
2020-03-05 16:43:43 +01:00
2020-01-26 10:01:04 +01:00
2020-01-26 10:01:04 +01:00
2019-12-31 16:44:20 +01:00
2020-03-12 13:00:11 +01:00
2019-07-15 18:11:31 +02:00
2019-08-07 13:54:17 +02:00
2019-07-25 12:00:09 +02:00
2020-03-12 13:00:27 +01:00
2019-07-17 12:52:55 +02:00
2020-01-17 19:48:23 +01:00
2019-09-30 19:24:47 +03:00
2019-10-10 15:15:51 +02:00
2019-12-31 16:43:00 +01:00
2019-07-15 18:11:30 +02:00
2019-07-17 12:52:55 +02:00
2019-10-23 20:57:05 +02:00
2019-08-18 12:52:52 +02:00
2019-12-31 16:42:12 +01:00
2020-02-19 19:53:04 +01:00
2019-09-24 15:54:08 -07:00
2020-03-12 13:00:32 +01:00
2019-07-15 18:11:30 +02:00
2020-02-24 08:36:49 +01:00
2019-10-12 14:11:21 -07:00
2019-07-22 21:24:10 +02:00
2019-07-19 23:24:16 +02:00
2019-07-16 11:25:02 +02:00
2019-11-06 13:00:21 -05:00
2019-09-18 18:43:36 +02:00
2019-09-18 18:42:57 +02:00
2019-09-23 15:31:53 +08:00
2019-07-15 19:04:27 -07:00
2020-03-25 08:25:50 +01:00
2019-08-01 15:01:29 +02:00
2019-08-12 10:16:39 -04:00
2019-08-16 15:50:27 +03:00
2019-12-13 08:42:55 +01:00
2020-02-24 08:36:44 +01:00
2019-07-16 11:25:02 +02:00
2019-07-25 16:39:35 -04:00
2019-07-17 12:45:30 -04:00
2020-02-11 04:35:53 -08:00
2019-09-18 11:27:18 +02:00
2019-08-07 11:56:48 -04:00
2019-12-31 16:42:34 +01:00
2020-01-14 20:08:25 +01:00
2019-07-22 16:04:53 -04:00
2019-08-13 09:09:30 +02:00
2019-08-28 10:02:39 -05:00
2019-08-06 08:21:54 +02:00
2019-08-13 09:09:30 +02:00
2019-08-06 13:18:42 +05:30
2019-07-22 21:24:10 +02:00
2019-09-18 18:42:21 +02:00
2019-08-22 10:41:06 +03:00
2020-03-25 08:25:56 +01:00
2019-07-16 11:25:02 +02:00
2019-07-16 11:25:02 +02:00
2019-07-16 11:25:02 +02:00
2020-02-24 08:36:25 +01:00
2019-07-30 13:07:41 +02:00
2019-09-18 11:27:18 +02:00
2020-03-12 13:00:11 +01:00
2019-07-16 12:21:41 -07:00
2019-08-10 15:41:48 +02:00
2019-07-31 10:19:23 +02:00
2020-01-04 19:18:43 +01:00
2020-02-11 04:35:36 -08:00
2019-07-16 11:25:02 +02:00
2019-11-06 13:00:21 -05:00
2019-08-12 16:58:52 +02:00
2019-08-06 13:16:54 +05:30
2019-12-31 16:43:50 +01:00
2019-07-16 11:25:02 +02:00
2019-09-23 15:32:53 +08:00
2019-08-09 16:04:31 +10:00
2019-08-27 10:09:12 -05:00