summaryrefslogtreecommitdiffstats
path: root/sys/dev/aacraid
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2013-05-26 22:11:13 +0000
committermarcel <marcel@FreeBSD.org>2013-05-26 22:11:13 +0000
commit9d137ef1b18b9050c5b89741b955c53c094d415f (patch)
treed7692d65fe43ea6a0824ee00c0a03b66bb316b40 /sys/dev/aacraid
parent990e8e483cb065d0483ca797ff914ff528925ef0 (diff)
downloadFreeBSD-src-9d137ef1b18b9050c5b89741b955c53c094d415f.zip
FreeBSD-src-9d137ef1b18b9050c5b89741b955c53c094d415f.tar.gz
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.
Diffstat (limited to 'sys/dev/aacraid')
-rw-r--r--sys/dev/aacraid/aacraid.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/dev/aacraid/aacraid.c b/sys/dev/aacraid/aacraid.c
index 6f52a25..22a3644 100644
--- a/sys/dev/aacraid/aacraid.c
+++ b/sys/dev/aacraid/aacraid.c
@@ -2522,7 +2522,7 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t arg)
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 *sc, caddr_t arg)
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 *sc, caddr_t arg)
/* 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.? */
OpenPOWER on IntegriCloud