diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-08 01:13:05 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:11:56 -0500 |
commit | 8b11bd12aff76e02cdc2cbc9e439bba88d281223 (patch) | |
tree | 903ab8830616bfbe5a821e4359f642842c8060a4 /arch/sparc64/kernel/setup.c | |
parent | 481295f982b21b1dbe71cbf41d3a93028fee30d1 (diff) |
[SPARC64]: Patch up mmu context register writes for sun4v.
sun4v uses ASI_MMU instead of ASI_DMMU
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/setup.c')
-rw-r--r-- | arch/sparc64/kernel/setup.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 6d6178efd587..2d64320d3a4d 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -189,26 +189,30 @@ int prom_callback(long *args) | |||
189 | } | 189 | } |
190 | 190 | ||
191 | if ((va >= KERNBASE) && (va < (KERNBASE + (4 * 1024 * 1024)))) { | 191 | if ((va >= KERNBASE) && (va < (KERNBASE + (4 * 1024 * 1024)))) { |
192 | extern unsigned long sparc64_kern_pri_context; | 192 | if (tlb_type == spitfire) { |
193 | 193 | extern unsigned long sparc64_kern_pri_context; | |
194 | /* Spitfire Errata #32 workaround */ | 194 | |
195 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 195 | /* Spitfire Errata #32 workaround */ |
196 | "flush %%g6" | 196 | __asm__ __volatile__( |
197 | : /* No outputs */ | 197 | "stxa %0, [%1] %2\n\t" |
198 | : "r" (sparc64_kern_pri_context), | 198 | "flush %%g6" |
199 | "r" (PRIMARY_CONTEXT), | 199 | : /* No outputs */ |
200 | "i" (ASI_DMMU)); | 200 | : "r" (sparc64_kern_pri_context), |
201 | "r" (PRIMARY_CONTEXT), | ||
202 | "i" (ASI_DMMU)); | ||
203 | } | ||
201 | 204 | ||
202 | /* | 205 | /* |
203 | * Locked down tlb entry. | 206 | * Locked down tlb entry. |
204 | */ | 207 | */ |
205 | 208 | ||
206 | if (tlb_type == spitfire) | 209 | if (tlb_type == spitfire) { |
207 | tte = spitfire_get_dtlb_data(SPITFIRE_HIGHEST_LOCKED_TLBENT); | 210 | tte = spitfire_get_dtlb_data(SPITFIRE_HIGHEST_LOCKED_TLBENT); |
208 | else if (tlb_type == cheetah || tlb_type == cheetah_plus) | 211 | res = PROM_TRUE; |
212 | } else if (tlb_type == cheetah || tlb_type == cheetah_plus) { | ||
209 | tte = cheetah_get_ldtlb_data(CHEETAH_HIGHEST_LOCKED_TLBENT); | 213 | tte = cheetah_get_ldtlb_data(CHEETAH_HIGHEST_LOCKED_TLBENT); |
210 | 214 | res = PROM_TRUE; | |
211 | res = PROM_TRUE; | 215 | } |
212 | goto done; | 216 | goto done; |
213 | } | 217 | } |
214 | 218 | ||