Commit aadce492 authored by Zheng Chongzhen's avatar Zheng Chongzhen Committed by guzitao
Browse files

sw64: iommu: fix iommu interrupt handler

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I56OSP



--------------------------------

When porting ZX200 chipset driver on SW64 platform, we meet an IOMMU
exception show as follows:

iommu_interrupt, iommu_status = 0xc8014000dffe0000, devid 0xa00, dva 0xdffe0000,
1Unable to handle kernel paging request at virtual address 0000000000000040
CPU 0 swapper/0(0): Oops 0
pc = [<ffffffff81424b80>]  ra = [<ffffffff81424b24>]  ps = 0001    Not tainted
pc is at iommu_interrupt+0x140/0x3e0
ra is at iommu_interrupt+0xe4/0x3e0
v0 = 0000000000000051  t0 = c8014000dffe0000  t1 = 0000000000000000
t2 = 0000000000000000  t3 = 0000000000000000  t4 = 0000000000000001
t5 = 0000000000000001  t6 = 0000000000000000  t7 = ffffffff82948000
s0 = fff00003ffff0400  s1 = 0000000000000001  s2 = 0000000000000a00
s3 = 0000000000000a00  s4 = 00000000dffe0000  s5 = fff0000100680e80
s6 = ffffffff8294ba70
a0 = 0000000000000001  a1 = 0000000000000001  a2 = ffffffff8294b790
a3 = ffffffff8294b7a8  a4 = 0000000000000000  a5 = ffffffff82c5fb7a
t8 = 0000000000000001  t9 = fffffffffffcac48  t10 = 0000000000000000
t11= 0000000000000000  pv = ffffffff809f4f10  at = ffffffff82bff6c0
gp = ffffffff82c1f510  sp = (____ptrval____)

The root cause is that the device which raises iommu exception is not in the
device list, then reference a null sdev will cause a page fualt. To work
around this problem, we apply this patch by just clearing IOMMUEXCPT_STATUS
and then go on.

BTW, why the device raise IOMMU exception is not a valid device ID, it's a
puzzling problem.

Signed-off-by: default avatarZheng Chongzhen <zhengchongzhen@wxiat.com>

Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent e41f34b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment