powerpc/mmu: Don't use the cache instructions to zero pages

A page (even physmem) can be marked as cache-inhibited.  Attempting to use
'dcbz' to zero a page mapped cache-inhibited triggers an alignment
exception, which is fatal in kernel.  This was seen when testing hardware
acceleration with X on POWER9.

At some point in the future, this should be changed to a more straight
forward zero loop instead of bzero(), and a similar change be made to the
other pmaps.

Reported by:	pkubaj@
This commit is contained in:
Justin Hibbits 2020-05-19 01:06:31 +00:00
parent 2fdbcbea76
commit 1da3138f68
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361232

View File

@ -909,10 +909,8 @@ static void
pagezero(vm_offset_t va)
{
va = trunc_page(va);
int off;
for (off = 0; off < PAGE_SIZE; off += cacheline_size)
__asm __volatile("dcbz 0,%0" :: "r"(va + off));
bzero((void *)va, PAGE_SIZE);
}
static uint64_t