]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:57:29 +0000 (14:57 +0200)
commitd44c7cbaa26fcbc9df0f37c1942a9e13f4e5afdf
tree68e36c73d3388be15fc1772988509a8b26343991
parentbb3c084389ea5df53922096a62596d69d346aaa2
powerpc/64s: Default l1d_size to 64K in RFI fallback flush

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 9dfbf78e4114fcaf4ef61c49885c3ab5bad40d0b ]

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: aa8a5e0062ac9 ('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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/powerpc/kernel/setup_64.c