[PowerPC] Fix atomic_cmpset_masked().

A recent kernel change caused the previously unused atomic_cmpset_masked() to
be used.

It had a typo in it.

Instead of reading the old value from an uninitialized variable, read it
from the passed-in pointer as intended.

This fixes crashes on 64 bit Book-E.

Obtained from:	jhibbits
This commit is contained in:
Brandon Bergren 2020-05-26 19:03:45 +00:00
parent d75038a0af
commit 9941cb0657
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361535

View File

@ -621,7 +621,7 @@ atomic_cmpset_masked(uint32_t *p, uint32_t cmpval, uint32_t newval,
uint32_t tmp;
__asm __volatile (
"1:\tlwarx %2, 0, %2\n\t" /* load old value */
"1:\tlwarx %2, 0, %3\n\t" /* load old value */
"and %0, %2, %7\n\t"
"cmplw %4, %0\n\t" /* compare */
"bne- 2f\n\t" /* exit if not equal */