]> err.no Git - linux-2.6/commit
[SPARC64]: Fix lockdep, particularly on SMP.
authorDavid S. Miller <davem@sunset.davemloft.net>
Sun, 16 Sep 2007 18:51:15 +0000 (11:51 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 16 Sep 2007 18:51:15 +0000 (11:51 -0700)
commit301feb652441a7168b59256fc44918075dcab0d5
tree68721bebf1375659be165c4810bb439785d6e96f
parent58ea1aa07e3cb4674ab0261b45aa1ba68282a79d
[SPARC64]: Fix lockdep, particularly on SMP.

As noted by Al Viro, when we try to call prom_set_trap_table()
in the SMP trampoline code we try to take the PROM call spinlock
which doesn't work because the current thread pointer isn't
valid yet and lockdep depends upon that being correct.

Furthermore, we cannot set the current thread pointer register
because it can't be properly dereferenced until we return from
prom_set_trap_table().  Kernel TLB misses only work after that
call.

So do the PROM call to set the trap table directly instead of
going through the OBP library C code, and thus avoid the lock
altogether.

These calls are guarenteed to be serialized fully.

Since there are now no calls to the prom_set_trap_table{_sun4v}()
library functions, they can be deleted.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/head.S
arch/sparc64/kernel/trampoline.S
arch/sparc64/prom/misc.c
include/asm-sparc64/oplib.h