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:
@@ -44,11 +44,11 @@ void __flush_wback_region(void *start, int size)
|
||||
|
||||
for (v = begin; v < end; v+=L1_CACHE_BYTES) {
|
||||
unsigned long addrstart = CACHE_OC_ADDRESS_ARRAY;
|
||||
for (j = 0; j < cpu_data->dcache.ways; j++) {
|
||||
for (j = 0; j < current_cpu_data.dcache.ways; j++) {
|
||||
unsigned long data, addr, p;
|
||||
|
||||
p = __pa(v);
|
||||
addr = addrstart | (v & cpu_data->dcache.entry_mask);
|
||||
addr = addrstart | (v & current_cpu_data.dcache.entry_mask);
|
||||
local_irq_save(flags);
|
||||
data = ctrl_inl(addr);
|
||||
|
||||
@@ -60,7 +60,7 @@ void __flush_wback_region(void *start, int size)
|
||||
break;
|
||||
}
|
||||
local_irq_restore(flags);
|
||||
addrstart += cpu_data->dcache.way_incr;
|
||||
addrstart += current_cpu_data.dcache.way_incr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void __flush_purge_region(void *start, int size)
|
||||
|
||||
data = (v & 0xfffffc00); /* _Virtual_ address, ~U, ~V */
|
||||
addr = CACHE_OC_ADDRESS_ARRAY |
|
||||
(v & cpu_data->dcache.entry_mask) | SH_CACHE_ASSOC;
|
||||
(v & current_cpu_data.dcache.entry_mask) | SH_CACHE_ASSOC;
|
||||
ctrl_outl(data, addr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user