From owner-freebsd-arm@FreeBSD.ORG Fri Mar 27 10:20:31 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E3D1FB6 for ; Fri, 27 Mar 2015 10:20:31 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CAC18F8 for ; Fri, 27 Mar 2015 10:20:31 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RAKVYf081645 for ; Fri, 27 Mar 2015 10:20:31 GMT (envelope-from root@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t2RAKVx8081644; Fri, 27 Mar 2015 10:20:31 GMT (envelope-from root) Date: Fri, 27 Mar 2015 10:20:31 +0000 To: freebsd-arm@freebsd.org From: "zbb (Zbigniew Bodek)" Subject: [Differential] [Request, 6 lines] D2155: Fix bug in xrefinfo_find() for 64-bit platforms Message-ID: X-Priority: 3 Thread-Topic: D2155: Fix bug in xrefinfo_find() for 64-bit platforms X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Thread-Index: ZjFiMWU3OWFlYzhmYzVkYWIzMjQxMjUzYTM4 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 10:20:31 -0000 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 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