[Differential] [Request, 6 lines] D2155: Fix bug in xrefinfo_find() for 64-bit platforms
zbb (Zbigniew Bodek)
phabric-noreply at FreeBSD.org
Fri Mar 27 10:20:31 UTC 2015
zbb created this revision.
zbb added reviewers: ian, nwhitehorn.
zbb added subscribers: freebsd-arm, freebsd-mips, PowerPC.
REVISION SUMMARY
uintptr_t may be 64-bit on some platforms, therefore when
finding xrefinfo by pointer to device the high word is being
cut off due to cast to phandle_t which is 32-bit long by definition.
Due to that we loose the high word of the address to compare with
xi->dev's address.
To fix that, first argument of xrefinfo_find() is extended to
uintptr_t and is being cast to appropriate type (phandle_t)
when compared.
Submitted by: Zbigniew Bodek <zbb at semihalf.com>
Obtained from: Semihalf
REVISION DETAIL
https://reviews.freebsd.org/D2155
AFFECTED FILES
sys/dev/ofw/openfirm.c
To: zbb, ian, nwhitehorn
Cc: sson, jhibbits, rpaulo, freebsd-mips, freebsd-arm
More information about the freebsd-arm
mailing list