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:
parent
86b5c43667
commit
3803a97f84
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315422
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user