]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xtensa: fix access to THREAD_RA/THREAD_SP/THREAD_DS
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 27 Jul 2014 03:23:41 +0000 (07:23 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:52:13 +0000 (14:52 -0700)
commit3d28d45feabfe49445ff47601d512efaa393e422
treee7be5a306c162619707ce3282cf1d35e28e542a2
parentba93d7c0214647c1ffbcfb5786e817a867c1f28c
xtensa: fix access to THREAD_RA/THREAD_SP/THREAD_DS

commit 52247123749cc3cbc30168b33ad8c69515c96d23 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: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/include/asm/uaccess.h
arch/xtensa/kernel/entry.S