]> git.hungrycats.org Git - linux/commit
xtensa: add fixup for double exception raised in window overflow
authorMax Filippov <jcmvbkbc@gmail.com>
Sat, 24 May 2014 17:48:28 +0000 (21:48 +0400)
committerJiri Slaby <jslaby@suse.cz>
Tue, 19 Aug 2014 12:23:39 +0000 (14:23 +0200)
commite0a37035c42e82250492cce9a914f78a3a8c036a
treed3f62b355344243c3add472cf3d2c2729fffe57b
parent3516cca653f2c410b8f736a73daf8089f7a18628
xtensa: add fixup for double exception raised in window overflow

commit 17290231df16eeee5dfc198dbf5ee4b419996dcd upstream.

There are two FIXMEs in the double exception handler 'for the extremely
unlikely case'. This case gets hit by gcc during kernel build once in
a few hours, resulting in an unrecoverable exception condition.

Provide missing fixup routine to handle this case. Double exception
literals now need 8 more bytes, add them to the linker script.

Also replace bbsi instructions with bbsi.l as we're branching depending
on 8th and 7th LSB-based bits of exception address.

This may be tested by adding the explicit DTLB invalidation to window
overflow handlers, like the following:

#    --- a/arch/xtensa/kernel/vectors.S
#    +++ b/arch/xtensa/kernel/vectors.S
#    @@ -592,6 +592,14 @@ ENDPROC(_WindowUnderflow4)
#     ENTRY_ALIGN64(_WindowOverflow8)
#
#     s32e a0, a9, -16
#    + bbsi.l a9, 31, 1f
#    + rsr a0, ccount
#    + bbsi.l a0, 4, 1f
#    + pdtlb a0, a9
#    + idtlb a0
#    + movi a0, 9
#    + idtlb a0
#    +1:
#     l32e    a0, a1, -12
#     s32e    a2, a9,  -8
#     s32e    a1, a9, -12

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/xtensa/kernel/vectors.S
arch/xtensa/kernel/vmlinux.lds.S