sh: Prepare for dynamic PMB support

To allow the MMU to be switched between 29bit and 32bit mode at runtime
some constants need to swapped for functions that return a runtime
value.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Matt Fleming
2009-10-06 21:22:25 +00:00
committed by Paul Mundt
parent 8bd642b17b
commit 1f69b6af91
7 changed files with 43 additions and 10 deletions

View File

@@ -88,12 +88,12 @@ static inline void flush_cache_4096(unsigned long start,
unsigned long flags, exec_offset = 0;
/*
* All types of SH-4 require PC to be in P2 to operate on the I-cache.
* Some types of SH-4 require PC to be in P2 to operate on the D-cache.
* All types of SH-4 require PC to be uncached to operate on the I-cache.
* Some types of SH-4 require PC to be uncached to operate on the D-cache.
*/
if ((boot_cpu_data.flags & CPU_HAS_P2_FLUSH_BUG) ||
(start < CACHE_OC_ADDRESS_ARRAY))
exec_offset = 0x20000000;
exec_offset = cached_to_uncached;
local_irq_save(flags);
__flush_cache_4096(start | SH_CACHE_ASSOC,