summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2017-03-05 10:54:34 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2017-03-06 21:44:09 +1100
commit6ba422c75facb1b1e0e206c464ee121b8073f7e0 (patch)
tree5ab7573657019a678a3607d59a913be3cc86caa3 /arch/powerpc/include/asm
parent014d02cbf16b3106dc8e93281d2a9c189751ed5e (diff)
downloadop-kernel-dev-6ba422c75facb1b1e0e206c464ee121b8073f7e0.zip
op-kernel-dev-6ba422c75facb1b1e0e206c464ee121b8073f7e0.tar.gz
powerpc/64: Avoid panic during boot due to divide by zero in init_cache_info()
I see a panic in early boot when building with a recent gcc toolchain. The issue is a divide by zero, which is undefined. Older toolchains let us get away with it: int foo(int a) { return a / 0; } foo: li 9,0 divw 3,3,9 extsw 3,3 blr But newer ones catch it: foo: trap Add a check to avoid the divide by zero. Fixes: e2827fe5c156 ("powerpc/64: Clean up ppc64_caches using a struct per cache") Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud