diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-01-09 00:31:47 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-02-06 09:46:04 +0100 |
commit | e2827fe5c1566f66a922dd7493cbe4522c50580a (patch) | |
tree | 49c4d659ade2f43d88a8b7a62f3c14f21aafef0c /arch/powerpc/include/asm/cache.h | |
parent | powerpc/64: Retrieve number of L1 cache sets from device-tree (diff) | |
download | linux-e2827fe5c1566f66a922dd7493cbe4522c50580a.tar.xz linux-e2827fe5c1566f66a922dd7493cbe4522c50580a.zip |
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>
Diffstat (limited to 'arch/powerpc/include/asm/cache.h')
-rw-r--r-- | arch/powerpc/include/asm/cache.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 1fa364340146..823750fa6e66 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -30,19 +30,19 @@ #define IFETCH_ALIGN_BYTES (1 << IFETCH_ALIGN_SHIFT) #if defined(__powerpc64__) && !defined(__ASSEMBLY__) + +struct ppc_cache_info { + u32 size; + u32 line_size; + u32 block_size; /* L1 only */ + u32 log_block_size; + u32 blocks_per_page; + u32 sets; +}; + struct ppc64_caches { - u32 dsize; /* L1 d-cache size */ - u32 dline_size; /* L1 d-cache line size */ - u32 dblock_size; /* L1 d-cache block size */ - u32 log_dblock_size; - u32 dblocks_per_page; - u32 dsets; - u32 isize; /* L1 i-cache size */ - u32 iline_size; /* L1 d-cache line size */ - u32 iblock_size; /* L1 i-cache block size */ - u32 log_iblock_size; - u32 iblocks_per_page; - u32 isets; + struct ppc_cache_info l1d; + struct ppc_cache_info l1i; }; extern struct ppc64_caches ppc64_caches; |