]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: Default l1d_size to 64K in RFI fallback flush
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Wed, 17 Jan 2018 19:03:36 +0000 (00:33 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 17 Apr 2018 09:29:04 +0000 (19:29 +1000)
commit5e93219443a8457fc9ee49a34a4503568998a481
tree6ace136dd4a34d4d260e5d1f8f0b5d99f3e398f6
parentafffd84f2cae2a21fcc9d80dd9eddea45fe6217d
powerpc/64s: Default l1d_size to 64K in RFI fallback flush

If there is no d-cache-size property in the device tree, l1d_size could
be zero. We don't actually expect that to happen, it's only been seen
on mambo (simulator) in some configurations.

A zero-size l1d_size leads to the loop in the asm wrapping around to
2^64-1, and then walking off the end of the fallback area and
eventually causing a page fault which is fatal.

Just default to 64K which is correct on some CPUs, and sane enough to
not cause a crash on others.

Fixes: 9b148f09d4da2 ('powerpc/64s: Add support for RFI flush of L1-D cache')
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
[mpe: Rewrite comment and change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/setup_64.c