Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Mar 2012 21:22:52 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233521 - head/sys/cddl/dev/dtrace
Message-ID:  <201203262122.q2QLMqbl050709@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Mon Mar 26 21:22:51 2012
New Revision: 233521
URL: http://svn.freebsd.org/changeset/base/233521

Log:
  Properly cast 64-bit dofhp_dof to pointer.
  
  For i386 this change is no-op. For AMD64 it was tested with DTrace test
  suite: results are the same from the test run before the change and after

Modified:
  head/sys/cddl/dev/dtrace/dtrace_ioctl.c

Modified: head/sys/cddl/dev/dtrace/dtrace_ioctl.c
==============================================================================
--- head/sys/cddl/dev/dtrace/dtrace_ioctl.c	Mon Mar 26 19:23:57 2012	(r233520)
+++ head/sys/cddl/dev/dtrace/dtrace_ioctl.c	Mon Mar 26 21:22:51 2012	(r233521)
@@ -39,11 +39,7 @@ dtrace_ioctl_helper(struct cdev *dev, u_
 	case DTRACEHIOC_ADDDOF:
 		dhp = (dof_helper_t *)addr;
 		/* XXX all because dofhp_dof is 64 bit */
-#ifdef __i386
-		addr = (caddr_t)(uint32_t)dhp->dofhp_dof;
-#else
-		addr = (caddr_t)dhp->dofhp_dof;
-#endif
+		addr = (caddr_t)(vm_offset_t)dhp->dofhp_dof;
 		/* FALLTHROUGH */
 	case DTRACEHIOC_ADD:
 		dof = dtrace_dof_copyin((intptr_t)addr, &rval);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203262122.q2QLMqbl050709>