Skip to content

Commit

Permalink
microblaze: nommu: Don't clobber R11 on syscalls
Browse files Browse the repository at this point in the history
The noMMU syscall trap has a bug that causes R11 to be zero on return to
userland. Remove the extra "save" of R11 responsible for the bug.

Remove reloading of mode indicator because r11 already contains it.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
steve@digidescorp.com authored and Michal Simek committed Dec 14, 2009
1 parent 233eb92 commit 825c9a3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/microblaze/kernel/entry-nommu.S
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ ENTRY(_user_exception)
lwi r1, r1, TS_THREAD_INFO /* get the thread info */
/* calculate kernel stack pointer */
addik r1, r1, THREAD_SIZE - PT_SIZE
swi r11, r0, PER_CPU(R11_SAVE) /* temporarily save r11 */
lwi r11, r0, PER_CPU(KM) /* load mode indicator */
2:
swi r11, r1, PT_MODE /* store the mode */
lwi r11, r0, PER_CPU(R11_SAVE) /* reload r11 */
Expand Down

0 comments on commit 825c9a3

Please sign in to comment.