openrisc: use scratch regs in atomic syscall
authorJonas Bonn <jonas@southpole.se>
Wed, 18 Apr 2012 10:23:39 +0000 (12:23 +0200)
committerJonas Bonn <jonas@southpole.se>
Tue, 8 May 2012 09:43:59 +0000 (11:43 +0200)
commit207e715ff17b42e022df107210dc8c736a703eb3
tree284b3b25fe53905286444ad0beacbba0663771f8
parent7b903e6c021a5462e26ea7a8f014fa60b6782bdb
openrisc: use scratch regs in atomic syscall

The function sys_or1k_atomic was using call-saved registers without
restoring their value before returning.  This is a faux pas: either
we need to restore their values or use scratch regs; the latter is
less code so that's the route this patch takes.

Thanks to David Hennerström for doing most of the heavy-lifting in
tracking this one down.

Reported-by: Davd Hennerström <david.hennerstrom@aacmicrotec.com>
Signed-off-by: Jonas Bonn <jonas@southpole.se>
arch/openrisc/kernel/entry.S