• Max Filippov's avatar
    xtensa: fix access to THREAD_RA/THREAD_SP/THREAD_DS · 2ca6012d
    Max Filippov authored
    commit 52247123 upstream.
    
    With SMP and a lot of debug options enabled task_struct::thread gets out
    of reach of s32i/l32i instructions with base pointing at task_struct,
    breaking build with the following messages:
    
      arch/xtensa/kernel/entry.S: Assembler messages:
      arch/xtensa/kernel/entry.S:1002: Error: operand 3 of 'l32i.n' has invalid value '1048'
      arch/xtensa/kernel/entry.S:1831: Error: operand 3 of 's32i.n' has invalid value '1040'
      arch/xtensa/kernel/entry.S:1832: Error: operand 3 of 's32i.n' has invalid value '1044'
    
    Change base to point to task_struct::thread in such cases.
    Don't use a10 in _switch_to to save/restore prev pointer as a2 is not
    clobbered.
    Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    2ca6012d
entry.S 43.9 KB