sh: Fixup cpu_data references for the non-boot CPUs.
There are a lot of bogus cpu_data-> references that only end up working for the boot CPU, convert these to current_cpu_data to fixup SMP. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -32,9 +32,9 @@ static inline void cache_wback_all(void)
|
||||
{
|
||||
unsigned long ways, waysize, addrstart;
|
||||
|
||||
ways = cpu_data->dcache.ways;
|
||||
waysize = cpu_data->dcache.sets;
|
||||
waysize <<= cpu_data->dcache.entry_shift;
|
||||
ways = current_cpu_data.dcache.ways;
|
||||
waysize = current_cpu_data.dcache.sets;
|
||||
waysize <<= current_cpu_data.dcache.entry_shift;
|
||||
|
||||
addrstart = CACHE_OC_ADDRESS_ARRAY;
|
||||
|
||||
@@ -43,7 +43,7 @@ static inline void cache_wback_all(void)
|
||||
|
||||
for (addr = addrstart;
|
||||
addr < addrstart + waysize;
|
||||
addr += cpu_data->dcache.linesz) {
|
||||
addr += current_cpu_data.dcache.linesz) {
|
||||
unsigned long data;
|
||||
int v = SH_CACHE_UPDATED | SH_CACHE_VALID;
|
||||
|
||||
@@ -53,7 +53,7 @@ static inline void cache_wback_all(void)
|
||||
ctrl_outl(data & ~v, addr);
|
||||
}
|
||||
|
||||
addrstart += cpu_data->dcache.way_incr;
|
||||
addrstart += current_cpu_data.dcache.way_incr;
|
||||
} while (--ways);
|
||||
}
|
||||
|
||||
@@ -93,9 +93,9 @@ static void __flush_dcache_page(unsigned long phys)
|
||||
local_irq_save(flags);
|
||||
jump_to_P2();
|
||||
|
||||
ways = cpu_data->dcache.ways;
|
||||
waysize = cpu_data->dcache.sets;
|
||||
waysize <<= cpu_data->dcache.entry_shift;
|
||||
ways = current_cpu_data.dcache.ways;
|
||||
waysize = current_cpu_data.dcache.sets;
|
||||
waysize <<= current_cpu_data.dcache.entry_shift;
|
||||
|
||||
addrstart = CACHE_OC_ADDRESS_ARRAY;
|
||||
|
||||
@@ -104,7 +104,7 @@ static void __flush_dcache_page(unsigned long phys)
|
||||
|
||||
for (addr = addrstart;
|
||||
addr < addrstart + waysize;
|
||||
addr += cpu_data->dcache.linesz) {
|
||||
addr += current_cpu_data.dcache.linesz) {
|
||||
unsigned long data;
|
||||
|
||||
data = ctrl_inl(addr) & (0x1ffffC00 | SH_CACHE_VALID);
|
||||
@@ -114,7 +114,7 @@ static void __flush_dcache_page(unsigned long phys)
|
||||
}
|
||||
}
|
||||
|
||||
addrstart += cpu_data->dcache.way_incr;
|
||||
addrstart += current_cpu_data.dcache.way_incr;
|
||||
} while (--ways);
|
||||
|
||||
back_to_P1();
|
||||
|
Reference in New Issue
Block a user