1 |
From: Josh Grebe <squash@g.o> |
2 |
Date: Wed, 29 Jun 2005 12:34:27 -0500 |
3 |
|
4 |
> I'm sorry to say that I still crash reliably with this patch. Just |
5 |
> to recap, it is a netra 1405, 4x440, 1G ram. Crashed after about 30 |
6 |
> minutes of running my disk-loading crashme.sh. |
7 |
|
8 |
Thanks for testing... |
9 |
|
10 |
Hmmm, so what else fundamentally changed in 2.6.x vs. 2.4.x |
11 |
sparc64 wise? One thing that sticks out is that we do batched |
12 |
TLB flushing now. That's kind of tricky to get right because |
13 |
UltraSPARC requires that one does a "membar #Sync" or |
14 |
"flush" after any internal cpu register store before any |
15 |
subsequent non-internal load or store is performed. |
16 |
|
17 |
We're slightly violating that in the new batched TLB flushing |
18 |
code. So it's worth trying the patch below out. |
19 |
|
20 |
This goes on top of the membar patch, and the UltraSPARC-III |
21 |
fix for the membar patch. If there are some rejects, they'll |
22 |
be minor and easy to fix up. |
23 |
|
24 |
Let me know if this patch makes any difference. |
25 |
|
26 |
[SPARC64]: Add missing "membar #Sync" to flush_tlb_pending(). |
27 |
|
28 |
flush_tlb_pending() (both the spitfire and cheetah variants) |
29 |
need to do a membar after writing the context register, before |
30 |
we load the first PTE entry in the batch array. |
31 |
|
32 |
Signed-off-by: David S. Miller <davem@×××××××××.net> |
33 |
|
34 |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S |
35 |
--- a/arch/sparc64/mm/ultra.S |
36 |
+++ b/arch/sparc64/mm/ultra.S |
37 |
@@ -57,6 +57,7 @@ __flush_tlb_pending: |
38 |
mov SECONDARY_CONTEXT, %o4 |
39 |
ldxa [%o4] ASI_DMMU, %g2 |
40 |
stxa %o0, [%o4] ASI_DMMU |
41 |
+ membar #Sync |
42 |
1: sub %o1, (1 << 3), %o1 |
43 |
ldx [%o2 + %o1], %o3 |
44 |
andcc %o3, 1, %g0 |
45 |
@@ -250,7 +251,7 @@ __cheetah_flush_tlb_mm: /* 15 insns */ |
46 |
retl |
47 |
wrpr %g7, 0x0, %pstate |
48 |
|
49 |
-__cheetah_flush_tlb_pending: /* 23 insns */ |
50 |
+__cheetah_flush_tlb_pending: /* 24 insns */ |
51 |
/* %o0 = context, %o1 = nr, %o2 = vaddrs[] */ |
52 |
rdpr %pstate, %g7 |
53 |
sllx %o1, 3, %o1 |
54 |
@@ -260,6 +261,7 @@ __cheetah_flush_tlb_pending: /* 23 insns |
55 |
mov PRIMARY_CONTEXT, %o4 |
56 |
ldxa [%o4] ASI_DMMU, %g2 |
57 |
stxa %o0, [%o4] ASI_DMMU |
58 |
+ membar #Sync |
59 |
1: sub %o1, (1 << 3), %o1 |
60 |
ldx [%o2 + %o1], %o3 |
61 |
andcc %o3, 1, %g0 |
62 |
@@ -318,7 +320,7 @@ cheetah_patch_cachetlbops: |
63 |
sethi %hi(__cheetah_flush_tlb_pending), %o1 |
64 |
or %o1, %lo(__cheetah_flush_tlb_pending), %o1 |
65 |
call cheetah_patch_one |
66 |
- mov 23, %o2 |
67 |
+ mov 24, %o2 |
68 |
|
69 |
#ifdef DCACHE_ALIASING_POSSIBLE |
70 |
sethi %hi(__flush_dcache_page), %o0 |
71 |
@@ -367,6 +369,7 @@ xcall_flush_tlb_pending: |
72 |
mov PRIMARY_CONTEXT, %g4 |
73 |
ldxa [%g4] ASI_DMMU, %g2 |
74 |
stxa %g5, [%g4] ASI_DMMU |
75 |
+ membar #Sync |
76 |
1: sub %g1, (1 << 3), %g1 |
77 |
ldx [%g7 + %g1], %g5 |
78 |
andcc %g5, 0x1, %g0 |
79 |
-- |
80 |
gentoo-sparc@g.o mailing list |