aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/prom
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-09-16 14:51:15 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-09-16 14:51:15 -0400
commit301feb652441a7168b59256fc44918075dcab0d5 (patch)
tree68721bebf1375659be165c4810bb439785d6e96f /arch/sparc64/prom
parent58ea1aa07e3cb4674ab0261b45aa1ba68282a79d (diff)
[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>
Diffstat (limited to 'arch/sparc64/prom')
-rw-r--r--arch/sparc64/prom/misc.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index 68c83ad04ad9..bbec7522826c 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -143,22 +143,6 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes)
143 return 0xff; 143 return 0xff;
144} 144}
145 145
146/* Install Linux trap table so PROM uses that instead of its own. */
147void prom_set_trap_table(unsigned long tba)
148{
149 p1275_cmd("SUNW,set-trap-table",
150 (P1275_ARG(0, P1275_ARG_IN_64B) |
151 P1275_INOUT(1, 0)), tba);
152}
153
154void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa)
155{
156 p1275_cmd("SUNW,set-trap-table",
157 (P1275_ARG(0, P1275_ARG_IN_64B) |
158 P1275_ARG(1, P1275_ARG_IN_64B) |
159 P1275_INOUT(2, 0)), tba, mmfsa);
160}
161
162int prom_get_mmu_ihandle(void) 146int prom_get_mmu_ihandle(void)
163{ 147{
164 int node, ret; 148 int node, ret;