The first argument of dcbz interprets r0 as a literal zero, not the second.

This worked before by accident.

MFC after:	1 week
This commit is contained in:
Nathan Whitehorn 2009-12-03 20:55:09 +00:00
parent 4f17d481ed
commit 9fbbaac0bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200083

View File

@ -374,7 +374,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
for (cacheline_size = 0; cacheline_size < 0x100; cacheline_size++)
cache_check[cacheline_size] = 0xff;
__asm __volatile("dcbz %0,0":: "r" (cache_check) : "memory");
__asm __volatile("dcbz 0,%0":: "r" (cache_check) : "memory");
/* Find the first byte dcbz did not zero to get the cache line size */
for (cacheline_size = 0; cacheline_size < 0x100 &&