powerpc/64: Clean up ppc64_caches using a struct per cache

We have two set of identical struct members for the I and D sides
and mostly identical bunches of code to parse the device-tree to
populate them. Instead make a ppc_cache_info structure with one
copy for I and one for D

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Benjamin Herrenschmidt
2017-01-08 17:31:47 -06:00
committed by Michael Ellerman
parent 5d451a87e5
commit e2827fe5c1
6 changed files with 118 additions and 121 deletions

View File

@@ -204,7 +204,7 @@ static int emulate_dcbz(struct pt_regs *regs, unsigned char __user *addr)
int i, size;
#ifdef __powerpc64__
size = ppc64_caches.dblock_size;
size = ppc64_caches.l1d.block_size;
#else
size = L1_CACHE_BYTES;
#endif