Yong Wu
1ff9b17ced
iommu/mediatek: Limit the physical address in 32bit for v7s
...
The ARM short descriptor has already limited the physical address
to 32bit after the commit <76557391433c> ("iommu/io-pgtable: Sanitise
map/unmap addresses"). But in MediaTek 4GB mode, the physical address
is from 0x1_0000_0000 to 0x1_ffff_ffff. this will cause:
WARNING: CPU: 4 PID: 3900 at
xxx/drivers/iommu/io-pgtable-arm-v7s.c:482 arm_v7s_map+0x40/0xf8
Modules linked in:
CPU: 4 PID: 3900 Comm: weston Tainted: G S W 4.9.44 #1
Hardware name: MediaTek MT2712m1v1 board (DT)
task: ffffffc0eaa5b280 task.stack: ffffffc0e9858000
PC is at arm_v7s_map+0x40/0xf8
LR is at mtk_iommu_map+0x64/0x90
pc : [<ffffff80085b09e8>] lr : [<ffffff80085b29fc>] pstate: 000001c5
sp : ffffffc0e985b920
x29: ffffffc0e985b920 x28: 0000000127d00000
x27: 0000000000100000 x26: ffffff8008f9e000
x25: 0000000000000003 x24: 0000000000100000
x23: 0000000127d00000 x22: 00000000ff800000
x21: ffffffc0f7ec8ce0 x20: 0000000000000003
x19: 0000000000000003 x18: 0000000000000002
x17: 0000007f7e5d72c0 x16: ffffff80082b0f08
x15: 0000000000000001 x14: 000000000000003f
x13: 0000000000000000 x12: 0000000000000028
x11: 0088000000000000 x10: 0000000000000000
x9 : ffffff80092fa000 x8 : ffffffc0e9858000
x7 : ffffff80085b29d8 x6 : 0000000000000000
x5 : ffffff80085b09a8 x4 : 0000000000000003
x3 : 0000000000100000 x2 : 0000000127d00000
x1 : 00000000ff800000 x0 : 0000000000000001
...
Call trace:
[<ffffff80085b09e8>] arm_v7s_map+0x40/0xf8
[<ffffff80085b29fc>] mtk_iommu_map+0x64/0x90
[<ffffff80085ab5f8>] iommu_map+0x100/0x3a0
[<ffffff80085ab99c>] default_iommu_map_sg+0x104/0x168
[<ffffff80085aead8>] iommu_dma_alloc+0x238/0x3f8
[<ffffff8008098b30>] __iommu_alloc_attrs+0xa8/0x260
[<ffffff80085f364c>] mtk_drm_gem_create+0xac/0x180
[<ffffff80085f3894>] mtk_drm_gem_dumb_create+0x54/0xc8
[<ffffff80085d576c>] drm_mode_create_dumb_ioctl+0xa4/0xd8
[<ffffff80085cb2a0>] drm_ioctl+0x1c0/0x490
In order to satify this, Limit the physical address to 32bit.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2017-09-27 16:58:28 +02:00
..
2017-09-09 15:03:24 -07:00
2017-09-09 15:03:24 -07:00
2017-09-09 15:03:24 -07:00
2017-09-09 15:03:24 -07:00
2017-09-09 15:03:24 -07:00
2017-08-15 17:34:48 +02:00
2017-08-16 17:27:28 +01:00
Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next
2017-09-01 11:31:42 +02:00
2017-07-12 10:00:04 -07:00
2017-09-19 11:44:46 +02:00
2017-08-30 15:13:54 +02:00
Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next
2017-09-01 11:31:42 +02:00
2017-08-23 16:28:09 +02:00
Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next
2017-09-01 11:31:42 +02:00
2017-08-23 16:28:09 +02:00
2017-07-12 10:00:04 -07:00
2017-09-09 15:03:24 -07:00
2017-09-09 15:03:24 -07:00
2017-09-27 16:56:17 +02:00
2017-07-20 10:30:28 +01:00
2016-04-05 15:34:29 +02:00
2017-07-20 10:30:27 +01:00
2017-08-15 13:58:48 +02:00
Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next
2017-09-01 11:31:42 +02:00
2017-08-15 18:23:52 +02:00
2017-08-30 15:10:53 +02:00
2016-04-13 11:37:41 +02:00
2015-06-12 11:33:52 +02:00
2017-09-19 15:30:41 +02:00
2017-08-15 17:34:49 +02:00
2017-08-10 00:03:50 +02:00
2017-02-10 13:44:57 +01:00
2017-05-17 14:51:54 +02:00
2017-09-27 16:58:28 +02:00
2017-08-22 16:37:59 +02:00
2017-09-22 12:05:43 +02:00
2016-04-05 17:53:20 +02:00
2017-08-04 11:59:29 +02:00
2017-08-04 11:59:29 +02:00
2015-08-03 16:04:42 +02:00
2017-08-28 11:24:52 +02:00
Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next
2017-09-01 11:31:42 +02:00
2017-08-30 17:53:29 +02:00
2017-08-17 16:31:34 +02:00
2017-08-30 17:28:32 +02:00