Skip to contentSkip to conversation

RM7k cache_flush_sigtramp

PATCH Fuxin Zhang 2 participants 3 messages Jul 31, 2003 MIPS

lore
Share & tools
lore
#0 lore raw

hi,

r4k_cache_flush_sigtrap seems not enough for RM7000 cpus because there is a writebuffer between L1 dcache & L2 cache,so the written back block may not be seen by icache. This small patch fixes crashes of my Xserver
on ev64240.

r4kcache.h 2003-07-31 09:51:57.000000000 +0800 renamed from r4kcache.h.ori 2003-07-31 09:51:01.000000000 +0800 +0 -0
@@ -94,6 +94,9 @@

".set noreorder\n\t"
".set mips3\n"
"1:\tcache %0,(%1)\n"
+#ifdef CONFIG_CPU_RM7000
+ "sync\n\t"
+#endif
"2:\t.set mips0\n\t"
".set reorder\n\t"
".section\t__ex_table,\"a\"\n\t"

#1 lore raw
Quoted 3 lines · Fuxin Zhang

Date: Thu, 31 Jul 2003 09:56:08 +0800
From: Fuxin Zhang <[email protected]>
To: MAKE FUN PRANK CALLS <[email protected]>

        ^^^^^^^^^^^^^^^^^^^^

Funny name for the list :-)

Quoted 4 lines

r4k_cache_flush_sigtrap seems not enough for RM7000 cpus because there is a writebuffer between L1 dcache & L2 cache,so the written back block may not be seen by icache. This small patch fixes crashes of my Xserver on ev64240.

It would seem a similar fix is also needed in other places then?

Ralf

#2 lore raw
Quoted 14 lines · Ralf Baechle
Quoted 5 lines · Fuxin Zhang

Date: Thu, 31 Jul 2003 09:56:08 +0800
From: Fuxin Zhang <[email protected]>
To: MAKE FUN PRANK CALLS <[email protected]>

       ^^^^^^^^^^^^^^^^^^^^

Funny name for the list :-)

Quoted 9 lines
Quoted 6 lines

r4k_cache_flush_sigtrap seems not enough for RM7000 cpus because there is a writebuffer between L1 dcache & L2 cache,so the written back block may not be seen by icache. This small patch fixes crashes of my Xserver on ev64240.

It would seem a similar fix is also needed in other places then?

I have not thought about it further. But
1. I implement wb_flush for this board,using sync and uncached read.
Just in case
so many buffer on the cpu and system bridge will surprise me.
2. There are still occasionally oops, especially with IO
activities,e.g.,when fscking a disk.

What would should suggest to look at? Some flushes will go through all levels of cache, I think they should be safe. Will check later.

Thanks.

Quoted 7 lines

Ralf