SUPERH platform development
 help / color / mirror / Atom feed
* SH2a Write-back cache issue
@ 2011-11-22 13:15 Andrea Baldini
  2011-11-22 14:21 ` Fabio Giovagnini
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrea Baldini @ 2011-11-22 13:15 UTC (permalink / raw)
  To: linux-sh

Hi,

I'm working on a sh7203 board and I'm currently using a 2.6.28 kernel with a 
write-back cache mode configuration.
When this configuration is set I got some issues when the flush_icache_range is 
involved.

/* O-Cache writeback */
for (way = 0; way < 4; way++) {
unsigned long data =  ctrl_inl(CACHE_OC_ADDRESS_ARRAY | addr | (way << 11));
	if ((data & CACHE_PHYSADDR_MASK) = (v & CACHE_PHYSADDR_MASK)) {
		data &= ~SH_CACHE_UPDATED;
		ctrl_outl(data, CACHE_OC_ADDRESS_ARRAY | addr | (way << 11));
	}
}

When the O-cache writeback is performed all system interrupts are missed, 
including the timer one.
This occurs, for instance, when a flat binary is loaded in memory ( 
load_flat_file() ) or when a signal is handled ( when setting up a frame ).

This is an unacceptable behaviour for the system. 
A workaround is setting a write-through configuration to the kernel and flushing 
just the instruction cache entries.

I've seen the recent kernel releases but it seems this part hasn't been 
modified yet.
Anyway i tried a 2.6.35 kernel version some time ago and i got the same 
problems.

Is anybody here working on this issue?
Is it possible to use the write-back configuration?

Regards

Andrea

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

end of thread, other threads:[~2011-11-24  9:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 13:15 SH2a Write-back cache issue Andrea Baldini
2011-11-22 14:21 ` Fabio Giovagnini
2011-11-23 10:52 ` Andrea Baldini
2011-11-23 11:01 ` Federico Fuga
2011-11-24  9:43 ` Andrea Baldini

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