Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Mar 2015 10:20:31 +0000
From:      "zbb (Zbigniew Bodek)" <phabric-noreply@FreeBSD.org>
To:        freebsd-arm@freebsd.org
Subject:   [Differential] [Request, 6 lines] D2155: Fix bug in xrefinfo_find() for 64-bit platforms
Message-ID:  <differential-rev-PHID-DREV-lvqnbj3x2uxuzryndkot-req@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-lvqnbj3x2uxuzryndkot-req>