Skip to content

Commit 6ec8030

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/pci: add missing EX_TABLE entries to __pcistg_mio_inuser()/__pcilg_mio_inuser()
For some exception types the instruction address points behind the instruction that caused the exception. Take that into account and add the missing exception table entry. Cc: <[email protected]> Fixes: f058599 ("s390/pci: Fix s390_mmio_read/write with MIO") Reviewed-by: Niklas Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent a262d3a commit 6ec8030

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/s390/pci/pci_mmio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ static inline int __pcistg_mio_inuser(
6464
asm volatile (
6565
" sacf 256\n"
6666
"0: llgc %[tmp],0(%[src])\n"
67-
" sllg %[val],%[val],8\n"
67+
"4: sllg %[val],%[val],8\n"
6868
" aghi %[src],1\n"
6969
" ogr %[val],%[tmp]\n"
7070
" brctg %[cnt],0b\n"
7171
"1: .insn rre,0xb9d40000,%[val],%[ioaddr_len]\n"
7272
"2: ipm %[cc]\n"
7373
" srl %[cc],28\n"
7474
"3: sacf 768\n"
75-
EX_TABLE(0b, 3b) EX_TABLE(1b, 3b) EX_TABLE(2b, 3b)
75+
EX_TABLE(0b, 3b) EX_TABLE(4b, 3b) EX_TABLE(1b, 3b) EX_TABLE(2b, 3b)
7676
:
7777
[src] "+a" (src), [cnt] "+d" (cnt),
7878
[val] "+d" (val), [tmp] "=d" (tmp),
@@ -215,10 +215,10 @@ static inline int __pcilg_mio_inuser(
215215
"2: ahi %[shift],-8\n"
216216
" srlg %[tmp],%[val],0(%[shift])\n"
217217
"3: stc %[tmp],0(%[dst])\n"
218-
" aghi %[dst],1\n"
218+
"5: aghi %[dst],1\n"
219219
" brctg %[cnt],2b\n"
220220
"4: sacf 768\n"
221-
EX_TABLE(0b, 4b) EX_TABLE(1b, 4b) EX_TABLE(3b, 4b)
221+
EX_TABLE(0b, 4b) EX_TABLE(1b, 4b) EX_TABLE(3b, 4b) EX_TABLE(5b, 4b)
222222
:
223223
[ioaddr_len] "+&d" (ioaddr_len.pair),
224224
[cc] "+d" (cc), [val] "=d" (val),

0 commit comments

Comments
 (0)