Use __LP64__ to detect presence of suword64() to fix linking and

loading of the LinuxKPI on 32-bit platforms.

Reported by:		lwhsu @
MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2017-03-16 20:39:31 +00:00
parent 86b5c43667
commit 3803a97f84
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315422

View File

@ -524,8 +524,15 @@ linux_clear_user(void *_uaddr, size_t _len)
/* zero 8 bytes at a time */
while (len > 7) {
#ifdef __LP64__
if (suword64(uaddr, 0))
return (_len);
#else
if (suword32(uaddr, 0))
return (_len);
if (suword32(uaddr + 4, 0))
return (_len);
#endif
uaddr += 8;
len -= 8;
}