Linux MIPS Architecture development
 help / color / mirror / Atom feed
* RE: RM7k cache_flush_sigtramp
@ 2003-07-31 16:50 Adam Kiepul
  2003-08-01  0:40 ` Fuxin Zhang
  2003-08-01  7:51 ` Dominic Sweetman
  0 siblings, 2 replies; 22+ messages in thread
From: Adam Kiepul @ 2003-07-31 16:50 UTC (permalink / raw)
  To: 'Ralf Baechle', Fuxin Zhang; +Cc: MAKE FUN PRANK CALLS

Hi,

If this is just to ensure the I Cache coherency for modified code then the following should be sufficient:

cache Hit_Writeback_D, offset(base_register)
cache Hit_Invalidate_I, offset(base_register)

The ordering does matter however since the Hit_Invalidate_I makes sure the write buffer is flushed.

Kind Regards,

_______________________________

Adam Kiepul
Sr. Applications Engineer

PMC-Sierra, Microprocessor Division
Mission Towers One
3975 Freedom Circle
Santa Clara, CA 95054, USA
Direct: 408 239 8124
Fax: 408 492 9462



-----Original Message-----
From: Ralf Baechle [mailto:ralf@linux-mips.org]
Sent: Thursday, July 31, 2003 4:47 AM
To: Fuxin Zhang
Cc: MAKE FUN PRANK CALLS
Subject: Re: RM7k cache_flush_sigtramp


On Thu, Jul 31, 2003 at 09:56:08AM +0800, Fuxin Zhang wrote:
> Date:	Thu, 31 Jul 2003 09:56:08 +0800
> From:	Fuxin Zhang <fxzhang@ict.ac.cn>
> To:	MAKE FUN PRANK CALLS <linux-mips@linux-mips.org>
        ^^^^^^^^^^^^^^^^^^^^

Funny name for the list :-)

> 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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: RM7k cache_flush_sigtramp
@ 2003-08-01 15:42 Adam Kiepul
  2003-08-04  3:38 ` Fuxin Zhang
  2003-08-06 11:00 ` Fuxin Zhang
  0 siblings, 2 replies; 22+ messages in thread
From: Adam Kiepul @ 2003-08-01 15:42 UTC (permalink / raw)
  To: 'Fuxin Zhang', Ralf Baechle; +Cc: MAKE FUN PRANK CALLS

Hi Fuxin,

Could you please provide me with the _original_ Kernel code disassembly snippet around the point where your SYNC patch applies?
Also, can you check what RM7000 part revision is on your board? You can find it out by reading the PrID register.

I will check if there is an erratum that the code could trigger.

By the way, are you aware of any other ev64240 board that would exhibit the same behavior?

I would be quite careful drawing any conclusions at the moment since we can not preclude the possibility that it is simply a "bad CPU on the board" case. Please note that the SYNC instruction changes a lot in the manner things physically happen in the CPU so it can often mask off various problems, such as a bad part.

Thank you,

Adam


-----Original Message-----
From: Fuxin Zhang [mailto:fxzhang@ict.ac.cn]
Sent: Thursday, July 31, 2003 9:59 PM
To: Ralf Baechle
Cc: Adam Kiepul; MAKE FUN PRANK CALLS
Subject: Re: RM7k cache_flush_sigtramp


I am using a slightly modified 2.4.21-pre4,based on cvs of early this 
month(?).
We have merged with latest cvs, I will run it and report the result tonight.


Ralf Baechle wrote:

>Adam,
>
>On Fri, Aug 01, 2003 at 08:40:14AM +0800, Fuxin Zhang wrote:
>
>  
>
>>Current linux code does exactly this. But I was seeing all kinds of 
>>faults occuring around the
>>sigreturn point on the stack without a sync? And a sync does greatly 
>>improve the stablity.
>>
>>    
>>
>>>The ordering does matter however since the Hit_Invalidate_I makes sure the 
>>>write buffer is flushed.
>>>      
>>>
>
>could there be an errata explaining Fuxin's findings?
>
>Fuxin, what version are you running?
>
>  Ralf
>
>
>  
>

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RM7k cache_flush_sigtramp
@ 2003-07-31  1:56 Fuxin Zhang
  2003-07-31 11:46 ` Ralf Baechle
  0 siblings, 1 reply; 22+ messages in thread
From: Fuxin Zhang @ 2003-07-31  1:56 UTC (permalink / raw)
  To: MAKE FUN PRANK CALLS

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.ori 2003-07-31 09:51:01.000000000 +0800
+++ r4kcache.h 2003-07-31 09:51:57.000000000 +0800
@@ -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"

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2003-08-06 22:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-31 16:50 RM7k cache_flush_sigtramp Adam Kiepul
2003-08-01  0:40 ` Fuxin Zhang
2003-08-01  3:01   ` Ralf Baechle
2003-08-01  4:59     ` Fuxin Zhang
2003-08-01  7:51 ` Dominic Sweetman
2003-08-01  7:51   ` Dominic Sweetman
2003-08-01  9:26   ` Ralf Baechle
2003-08-01 14:18     ` Fuxin Zhang
2003-08-02 17:02       ` Ralf Baechle
2003-08-04  8:45     ` Dominic Sweetman
2003-08-04 11:51       ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
2003-08-01 15:42 Adam Kiepul
2003-08-04  3:38 ` Fuxin Zhang
2003-08-06 11:00 ` Fuxin Zhang
2003-08-06 11:55   ` Ralf Baechle
2003-08-06 12:52     ` Fuxin Zhang
2003-08-06 14:45       ` Ralf Baechle
2003-08-06 15:04         ` Fuxin Zhang
2003-08-06 22:30           ` Ralf Baechle
2003-07-31  1:56 Fuxin Zhang
2003-07-31 11:46 ` Ralf Baechle
2003-07-31 12:57   ` Fuxin Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox