diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-01-08 17:31:45 -0600 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-02-06 19:46:04 +1100 |
commit | bd067f83b0840e798328d14133ce4542d3bf9e71 (patch) | |
tree | 70dab2041cd93996f8deab65b6027498fdf63385 /arch/powerpc/include | |
parent | f9e473f1aa7597affff87bc6a599cf0aa389f0c1 (diff) |
powerpc/64: Fix naming of cache block vs. cache line
In a number of places we called "cache line size" what is actually
the cache block size, which in the powerpc architecture, means the
effective size to use with cache management instructions (it can
be different from the actual cache line size).
We fix the naming across the board and properly retrieve both
pieces of information when available in the device-tree.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/cache.h | 12 | ||||
-rw-r--r-- | arch/powerpc/include/asm/page_64.h | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 7657aa897a38..25ee433a8261 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -33,12 +33,14 @@ struct ppc64_caches { u32 dsize; /* L1 d-cache size */ u32 dline_size; /* L1 d-cache line size */ - u32 log_dline_size; - u32 dlines_per_page; + u32 dblock_size; /* L1 d-cache block size */ + u32 log_dblock_size; + u32 dblocks_per_page; u32 isize; /* L1 i-cache size */ - u32 iline_size; /* L1 i-cache line size */ - u32 log_iline_size; - u32 ilines_per_page; + u32 iline_size; /* L1 d-cache line size */ + u32 iblock_size; /* L1 i-cache block size */ + u32 log_iblock_size; + u32 iblocks_per_page; }; extern struct ppc64_caches ppc64_caches; diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h index dd5f0712afa2..c50a666308dd 100644 --- a/arch/powerpc/include/asm/page_64.h +++ b/arch/powerpc/include/asm/page_64.h @@ -47,14 +47,14 @@ static inline void clear_page(void *addr) unsigned long iterations; unsigned long onex, twox, fourx, eightx; - iterations = ppc64_caches.dlines_per_page / 8; + iterations = ppc64_caches.dblocks_per_page / 8; /* * Some verisions of gcc use multiply instructions to * calculate the offsets so lets give it a hand to * do better. */ - onex = ppc64_caches.dline_size; + onex = ppc64_caches.dblock_size; twox = onex << 1; fourx = onex << 2; eightx = onex << 3; |