diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2016-10-13 14:43:52 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-11-14 11:11:51 +1100 |
commit | f4329f2ecb149282fdfdd8830a936a56b1497a05 (patch) | |
tree | 437623c6fe2f44a63a62e754fb423b84bd62967a /arch/powerpc/include/asm/cache.h | |
parent | fda0440d82d38e603cd713e997fdfedb97e0ef0c (diff) | |
download | op-kernel-dev-f4329f2ecb149282fdfdd8830a936a56b1497a05.zip op-kernel-dev-f4329f2ecb149282fdfdd8830a936a56b1497a05.tar.gz |
powerpc/64s: Reduce exception alignment
Exception handlers are aligned to 128 bytes (L1 cache) on 64s, which is
overkill. It can reduce the icache footprint of any individual exception
path. However taken as a whole, the expansion in icache footprint seems
likely to be counter-productive and cause more total misses.
Create IFETCH_ALIGN_SHIFT/BYTES, which should give optimal ifetch
alignment with much more reasonable alignment. This saves 1792 bytes
from head_64.o text with an allmodconfig build.
Other subarchitectures should define appropriate IFETCH_ALIGN_SHIFT
values if this becomes more widely used.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index ffbafbf..7657aa8 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -20,12 +20,15 @@ #endif #else /* CONFIG_PPC64 */ #define L1_CACHE_SHIFT 7 +#define IFETCH_ALIGN_SHIFT 4 /* POWER8,9 */ #endif #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) #define SMP_CACHE_BYTES L1_CACHE_BYTES +#define IFETCH_ALIGN_BYTES (1 << IFETCH_ALIGN_SHIFT) + #if defined(__powerpc64__) && !defined(__ASSEMBLY__) struct ppc64_caches { u32 dsize; /* L1 d-cache size */ |