From owner-svn-src-all@FreeBSD.ORG Sun May 26 22:11:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 70F44B08; Sun, 26 May 2013 22:11:14 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 47561F5A; Sun, 26 May 2013 22:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4QMBERY099731; Sun, 26 May 2013 22:11:14 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4QMBDkv099729; Sun, 26 May 2013 22:11:13 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201305262211.r4QMBDkv099729@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 26 May 2013 22:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251013 - head/sys/dev/aacraid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2013 22:11:14 -0000 Author: marcel Date: Sun May 26 22:11:13 2013 New Revision: 251013 URL: http://svnweb.freebsd.org/changeset/base/251013 Log: Unbreak ia64 tinderbox: 64-bit support was made conditional upon __amd64__, and thus limited. Eliminate 2 trivial conditionals by casting the 64-bit integral, holding an address, via (uintptr_t) to (void *) and replace the last remaining check for __amd64__ with a check for __LP64__ instead. Modified: head/sys/dev/aacraid/aacraid.c Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Sun May 26 18:57:59 2013 (r251012) +++ head/sys/dev/aacraid/aacraid.c Sun May 26 22:11:13 2013 (r251013) @@ -2522,7 +2522,7 @@ aac_ioctl_send_raw_srb(struct aac_softc srb_sg_address = (u_int64_t)sgp->SgAddress; } else if (fibsize == (sizeof(struct aac_srb) + srbcmd->sg_map.SgCount * sizeof(struct aac_sg_entry64))) { -#ifdef __amd64__ +#ifdef __LP64__ struct aac_sg_entry64 *sgp = (struct aac_sg_entry64 *)srbcmd->sg_map.SgEntry; srb_sg_bytecount = sgp->SgByteCount; @@ -2576,12 +2576,7 @@ aac_ioctl_send_raw_srb(struct aac_softc cm->cm_flags |= AAC_CMD_DATAOUT; if (srbcmd->flags & AAC_SRB_FLAGS_DATA_OUT) { - if ((error = copyin( -#ifdef __amd64__ - (void *)srb_sg_address, -#else - (void *)(u_int32_t)srb_sg_address, -#endif + if ((error = copyin((void *)(uintptr_t)srb_sg_address, cm->cm_data, cm->cm_datalen)) != 0) goto out; /* sync required for bus_dmamem_alloc() alloc. mem.? */ @@ -2624,12 +2619,8 @@ aac_ioctl_send_raw_srb(struct aac_softc /* copy data */ if (transfer_data && (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN)) { - if ((error = copyout(cm->cm_data, -#ifdef __amd64__ - (void *)srb_sg_address, -#else - (void *)(u_int32_t)srb_sg_address, -#endif + if ((error = copyout(cm->cm_data, + (void *)(uintptr_t)srb_sg_address, cm->cm_datalen)) != 0) goto out; /* sync required for bus_dmamem_alloc() allocated mem.? */