changeset 930:1b624a2ec4bc

6309433 gcc and dr don't get along 6309468 gcc and cvc,cvcredir don't get along 6309745 gcc and tazmo envctrl don't get along 6309752 gcc and littleneck pcf8574 don't get along 6309967 gcc and esp don't get along
author mathue
date Tue, 15 Nov 2005 22:21:35 -0800
parents e9eba56e751c
children 92fdf4004904
files usr/src/uts/sun/io/scsi/adapters/esp.c usr/src/uts/sun4u/io/sbd.c usr/src/uts/sun4u/littleneck/io/pcf8574_lneck.c usr/src/uts/sun4u/ngdr/io/dr.c usr/src/uts/sun4u/ngdr/io/dr_io.c usr/src/uts/sun4u/ngdr/io/dr_mem.c usr/src/uts/sun4u/ngdr/io/dr_quiesce.c usr/src/uts/sun4u/ngdr/io/dr_util.c usr/src/uts/sun4u/starcat/io/cvcredir.c usr/src/uts/sun4u/starfire/cvc/cvc.c usr/src/uts/sun4u/starfire/cvcredir/cvcredir.c usr/src/uts/sun4u/starfire/io/drmach.c
diffstat 12 files changed, 61 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/sun/io/scsi/adapters/esp.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun/io/scsi/adapters/esp.c	Tue Nov 15 22:21:35 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -3058,9 +3058,6 @@
 	tag_slots = esp->e_tagQ[slot];
 	if (tag_slots != NULL) {
 		tag = (esp->e_tagQ[slot]->e_tags)++;
-		if (esp->e_tagQ[slot]->e_tags >= NTAGS) {
-			esp->e_tagQ[slot]->e_tags = 0;
-		}
 		EPRINTF1("tagged cmd, tag = %d\n", tag);
 
 		/* Validate tag, should never fail. */
@@ -3108,9 +3105,7 @@
 					EPRINTF1("found free tag %d\n", tag);
 					break;
 				}
-				if (++(esp->e_tagQ[slot]->e_tags) >= NTAGS) {
-					esp->e_tagQ[slot]->e_tags = 0;
-				}
+				++(esp->e_tagQ[slot]->e_tags);
 				EPRINTF1("found in use tag %d\n", tag);
 			}
 
@@ -4882,6 +4877,7 @@
 	}
 	_NOTE(NOT_REACHED)
 	/* NOTREACHED */
+	return (ACTION_FINSEL);
 }
 
 /*
@@ -10474,7 +10470,7 @@
 	for (x = 1; x <= NPHASE; x++) {
 		short y;
 
-		z = --z & (NPHASE - 1);
+		z = (z - 1) & (NPHASE - 1);
 		y = esp->e_phase[z].e_save_state;
 		if (y == STATE_FREE)
 			break;
--- a/usr/src/uts/sun4u/io/sbd.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/io/sbd.c	Tue Nov 15 22:21:35 2005 -0800
@@ -496,7 +496,7 @@
 	static fn_t	f = "sbd_ioctl";
 	int		dr_avail;
 
-	PR_BYP("sbd_ioctl cmd=%x, arg=%x\n", cmd, arg);
+	PR_BYP("sbd_ioctl cmd=%x, arg=%lx\n", cmd, arg);
 
 	/* Note: this must also be changed in tandem with sbd_ioctl.h */
 	switch (cmd) {
@@ -1618,12 +1618,12 @@
 			&cmdp->cmd_cm.c_id.c_name[0], OBP_MAXPROPNAME);
 		cmdp->cmd_cm.c_flags = scmd32.cmd_cm.c_flags;
 		cmdp->cmd_cm.c_len = scmd32.cmd_cm.c_len;
-		cmdp->cmd_cm.c_opts = (caddr_t)scmd32.cmd_cm.c_opts;
+		cmdp->cmd_cm.c_opts = (caddr_t)(uintptr_t)scmd32.cmd_cm.c_opts;
 
 		if (cmd == SBD_CMD_PASSTHRU) {
-			PR_BYP("passthru copyin: iap=%p, sz=%d", iap,
+			PR_BYP("passthru copyin: iap=%p, sz=%ld", iap,
 				sizeof (sbd_cmd32_t));
-			PR_BYP("passthru copyin: c_opts=%p, c_len=%d",
+			PR_BYP("passthru copyin: c_opts=%x, c_len=%d",
 				scmd32.cmd_cm.c_opts,
 				scmd32.cmd_cm.c_len);
 		}
@@ -1632,7 +1632,7 @@
 		case SBD_CMD_STATUS:
 			cmdp->cmd_stat.s_nbytes = scmd32.cmd_stat.s_nbytes;
 			cmdp->cmd_stat.s_statp =
-				(caddr_t)scmd32.cmd_stat.s_statp;
+				(caddr_t)(uintptr_t)scmd32.cmd_stat.s_statp;
 			break;
 		default:
 			break;
--- a/usr/src/uts/sun4u/littleneck/io/pcf8574_lneck.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/littleneck/io/pcf8574_lneck.c	Tue Nov 15 22:21:35 2005 -0800
@@ -20,8 +20,8 @@
  * CDDL HEADER END
  */
 /*
- * Copyright (c) 2000-2001 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
  */
 
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
@@ -384,7 +384,7 @@
 			break;
 		}
 
-		if ((ioctl_bit.bit_num < 0) && (ioctl_bit.bit_num > 7)) {
+		if (ioctl_bit.bit_num > 7) {
 			D2CMN_ERR((CE_WARN, "%s: In I2C_GET_BIT bit num"
 					" was not between 0 and 7\n",
 					unitp->pcf8574_name));
@@ -426,7 +426,7 @@
 			break;
 		}
 
-		if ((ioctl_bit.bit_num < 0) && (ioctl_bit.bit_num > 7)) {
+		if (ioctl_bit.bit_num > 7) {
 			D2CMN_ERR((CE_WARN, "%s: I2C_SET_BIT: bit_num sent"
 					" in was not between 0 and 7",
 					unitp->pcf8574_name));
@@ -519,7 +519,7 @@
 	}
 
 	(void) snprintf(unitp->pcf8574_name, sizeof (unitp->pcf8574_name),
-			"%sd", ddi_node_name(dip), instance);
+			"%s%d", ddi_node_name(dip), instance);
 
 
 	if (ddi_create_minor_node(dip, "pcf8574", S_IFCHR, instance,
--- a/usr/src/uts/sun4u/ngdr/io/dr.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/ngdr/io/dr.c	Tue Nov 15 22:21:35 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -884,7 +884,7 @@
 		break;
 
 	case DDI_INFO_DEVT2INSTANCE:
-		*result = (void *)instance;
+		*result = (void *)(uintptr_t)instance;
 		break;
 
 	default:
@@ -929,13 +929,13 @@
 			&scp->cmd_cm.c_id.c_name[0], OBP_MAXPROPNAME);
 		scp->cmd_cm.c_flags = scmd32.cmd_cm.c_flags;
 		scp->cmd_cm.c_len = scmd32.cmd_cm.c_len;
-		scp->cmd_cm.c_opts = (caddr_t)scmd32.cmd_cm.c_opts;
+		scp->cmd_cm.c_opts = (caddr_t)(uintptr_t)scmd32.cmd_cm.c_opts;
 
 		switch (hp->h_cmd) {
 		case SBD_CMD_STATUS:
 			scp->cmd_stat.s_nbytes = scmd32.cmd_stat.s_nbytes;
 			scp->cmd_stat.s_statp =
-				(caddr_t)scmd32.cmd_stat.s_statp;
+				(caddr_t)(uintptr_t)scmd32.cmd_stat.s_statp;
 			break;
 		default:
 			break;
@@ -983,7 +983,7 @@
 
 		scmd32.cmd_cm.c_flags = scp->cmd_cm.c_flags;
 		scmd32.cmd_cm.c_len = scp->cmd_cm.c_len;
-		scmd32.cmd_cm.c_opts = (caddr32_t)scp->cmd_cm.c_opts;
+		scmd32.cmd_cm.c_opts = (caddr32_t)(uintptr_t)scp->cmd_cm.c_opts;
 
 		switch (hp->h_cmd) {
 		case SBD_CMD_GETNCM:
@@ -1075,7 +1075,7 @@
 	cmd = hp->h_cmd;
 	devset = shp->h_devset;
 
-	PR_ALL("%s (cmd = %s)...\n", f, (uint_t)SBD_CMD_STR(cmd));
+	PR_ALL("%s (cmd = %s)...\n", f, SBD_CMD_STR(cmd));
 
 	hp->h_err = drmach_pre_op(cmd, bp->b_id, &hp->h_opts);
 	if (hp->h_err != NULL) {
@@ -1138,7 +1138,7 @@
 
 	cmd = hp->h_cmd;
 
-	PR_ALL("%s (cmd = %s)...\n", f, (uint_t)SBD_CMD_STR(cmd));
+	PR_ALL("%s (cmd = %s)...\n", f, SBD_CMD_STR(cmd));
 
 	/* errors should have been caught by now */
 	ASSERT(hp->h_err == NULL);
@@ -1625,7 +1625,7 @@
 	list = kmem_zalloc(len, KM_SLEEP);
 
 	/* record length of storage in first element */
-	*list++ = (dr_common_unit_t *)len;
+	*list++ = (dr_common_unit_t *)(uintptr_t)len;
 
 	/* get bit array signifying which units are to be involved */
 	uset = DEVSET_GET_UNITSET(hp->h_devset, type);
@@ -1711,7 +1711,7 @@
 
 	/* free list */
 	list -= 1;
-	len = (int)list[0];
+	len = (int)(uintptr_t)list[0];
 	kmem_free(list, len);
 }
 
@@ -2342,7 +2342,7 @@
 
 		/* Alignment Paranoia */
 		if ((ulong_t)dstat32p & 0x1) {
-			PR_ALL("%s: alignment: sz=0x%x dstat32p=0x%x\n",
+			PR_ALL("%s: alignment: sz=0x%lx dstat32p=0x%p\n",
 				f, sizeof (sbd_stat32_t), dstat32p);
 			DR_OP_INTERNAL_ERROR(hp);
 			rv = EINVAL;
@@ -3031,7 +3031,7 @@
 		break;
 
 	default:
-		PR_ALL("%s: unexpected nodetype(%d) for id 0x%x\n",
+		PR_ALL("%s: unexpected nodetype(%d) for id 0x%p\n",
 			f, cp->sbdev_type, cp->sbdev_id);
 		rv = -1;
 		break;
--- a/usr/src/uts/sun4u/ngdr/io/dr_io.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/ngdr/io/dr_io.c	Tue Nov 15 22:21:35 2005 -0800
@@ -188,7 +188,7 @@
 			reftotal += ref;
 		} else {
 			PR_IO("%s: NO dip for id (0x%x)\n",
-				f, (uint_t)ip->sbi_cm.sbdev_id);
+				f, (uint_t)(uintptr_t)ip->sbi_cm.sbdev_id);
 		}
 	}
 
--- a/usr/src/uts/sun4u/ngdr/io/dr_mem.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/ngdr/io/dr_mem.c	Tue Nov 15 22:21:35 2005 -0800
@@ -391,13 +391,13 @@
 		dst_pa = ml->address;
 		if (ml->address & PAGEOFFSET)
 			cmn_err(CE_WARN,
-				"%s: address (0x%llx) not on "
+				"%s: address (0x%lx) not on "
 				"page boundary", f, ml->address);
 
 		nbytes = ml->size;
 		if (ml->size & PAGEOFFSET)
 			cmn_err(CE_WARN,
-				"%s: size (0x%llx) not on "
+				"%s: size (0x%lx) not on "
 				"page boundary", f, ml->size);
 
 		/*LINTED*/
@@ -1199,8 +1199,8 @@
 	    &s_new_basepa);
 	ASSERT(err == NULL);
 
-	PR_MEM("%s:s_old_basepa: 0x%llx\n", f, s_old_basepa);
-	PR_MEM("%s:s_new_basepa: 0x%llx\n", f, s_new_basepa);
+	PR_MEM("%s:s_old_basepa: 0x%lx\n", f, s_old_basepa);
+	PR_MEM("%s:s_new_basepa: 0x%lx\n", f, s_new_basepa);
 
 	if (t_mp != NULL) {
 		struct memlist *s_copy_mlist;
@@ -1210,8 +1210,8 @@
 		    &t_new_basepa);
 		ASSERT(err == NULL);
 
-		PR_MEM("%s:t_old_basepa: 0x%llx\n", f, t_old_basepa);
-		PR_MEM("%s:t_new_basepa: 0x%llx\n", f, t_new_basepa);
+		PR_MEM("%s:t_old_basepa: 0x%lx\n", f, t_old_basepa);
+		PR_MEM("%s:t_new_basepa: 0x%lx\n", f, t_new_basepa);
 
 		/*
 		 * Construct copy list with original source addresses.
@@ -1386,7 +1386,7 @@
 		/* reduce target size if new PAs go past end of usable slice */
 		if (t_new_smallsize > 0) {
 			t_mp->sbm_npages = _b64top(t_new_smallsize);
-			PR_MEM("%s: target new size 0x%llx bytes\n",
+			PR_MEM("%s: target new size 0x%lx bytes\n",
 				f, t_new_smallsize);
 		}
 	}
@@ -2009,7 +2009,7 @@
 
 	lgrp_plat_config(LGRP_CONFIG_MEM_ADD, (uintptr_t)&umb);
 
-	PR_MEM("%s: %s (basepfn = 0x%x, npgs = %d)\n",
+	PR_MEM("%s: %s (basepfn = 0x%lx, npgs = %ld)\n",
 		f, mp->sbm_cm.sbdev_path, mp->sbm_basepfn, mp->sbm_npages);
 }
 
@@ -2655,11 +2655,11 @@
 	s_mp->sbm_flags &= ~DR_MFLAG_MEMRESIZE;
 	if (c_mp->sbm_npages > s_mp->sbm_npages) {
 		s_mp->sbm_flags |= DR_MFLAG_MEMUPSIZE;
-		PR_MEM("%s: upsize detected (source=%d < target=%d)\n",
+		PR_MEM("%s: upsize detected (source=%ld < target=%ld)\n",
 			f, s_mp->sbm_npages, c_mp->sbm_npages);
 	} else if (c_mp->sbm_npages < s_mp->sbm_npages) {
 		s_mp->sbm_flags |= DR_MFLAG_MEMDOWNSIZE;
-		PR_MEM("%s: downsize detected (source=%d > target=%d)\n",
+		PR_MEM("%s: downsize detected (source=%ld > target=%ld)\n",
 			f, s_mp->sbm_npages, c_mp->sbm_npages);
 	}
 
--- a/usr/src/uts/sun4u/ngdr/io/dr_quiesce.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/ngdr/io/dr_quiesce.c	Tue Nov 15 22:21:35 2005 -0800
@@ -624,7 +624,7 @@
 					    f, p->p_user.u_psargs, p->p_pid);
 
 					PR_QR("%s: failed to stop thread: "
-					    "process=%s, pid=%d, t_id=0x%lx, "
+					    "process=%s, pid=%d, t_id=0x%p, "
 					    "t_state=0x%x, t_proc_flag=0x%x, "
 					    "t_schedflag=0x%x\n",
 					    f, p->p_user.u_psargs, p->p_pid,
@@ -1081,10 +1081,10 @@
 					"%s, ", dname);
 			} else {
 				n = snprintf(&buf[buf_idx], buf_avail,
-					"major %llu, ", arr[i]);
+					"major %lu, ", arr[i]);
 			}
 		} else {
-			n = snprintf(&buf[buf_idx], buf_avail, "%llu, ",
+			n = snprintf(&buf[buf_idx], buf_avail, "%lu, ",
 				arr[i]);
 		}
 
--- a/usr/src/uts/sun4u/ngdr/io/dr_util.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/ngdr/io/dr_util.c	Tue Nov 15 22:21:35 2005 -0800
@@ -20,8 +20,8 @@
  * CDDL HEADER END
  */
 /*
- * Copyright (c) 2000 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
  */
 
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
@@ -257,6 +257,6 @@
 	if (mlist == NULL)
 		printf("memlist> EMPTY\n");
 	else for (ml = mlist; ml; ml = ml->next)
-		printf("memlist> 0x%llx, 0x%llx\n", ml->address, ml->size);
+		printf("memlist> 0x%lx, 0x%lx\n", ml->address, ml->size);
 }
 #endif
--- a/usr/src/uts/sun4u/starcat/io/cvcredir.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/starcat/io/cvcredir.c	Tue Nov 15 22:21:35 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -213,7 +213,7 @@
 	 * cvcd which has us open and is reading console data.
 	 */
 	if (cvc_register(RD(q)) == -1) {
-		cmn_err(CE_WARN, "cvcr_open: cvc_register failed for q = 0x%x",
+		cmn_err(CE_WARN, "cvcr_open: cvc_register failed for q = 0x%p",
 			q);
 	}
 	return (0);
--- a/usr/src/uts/sun4u/starfire/cvc/cvc.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/starfire/cvc/cvc.c	Tue Nov 15 22:21:35 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -450,7 +450,7 @@
 			freemsg(mp);
 			break;
 		default:
-			cmn_err(CE_WARN, "cvc_wput: illegal mblk = 0x%x", mp);
+			cmn_err(CE_WARN, "cvc_wput: illegal mblk = 0x%p", mp);
 			cmn_err(CE_WARN, "cvc_wput: type = 0x%x",
 				mp->b_datap->db_type);
 			/* FALLTHROUGH */
@@ -709,7 +709,7 @@
 		if (cvcoutput_q == q)
 			cmn_err(CE_WARN, "cvc_register: duplicate q!");
 		else
-			cmn_err(CE_WARN, "cvc_register: nondup q = 0x%x",
+			cmn_err(CE_WARN, "cvc_register: nondup q = 0x%p",
 				q);
 		return (error);
 	}
@@ -743,7 +743,7 @@
 		cvcoutput_q = NULL;
 	} else {
 		rw_exit(&cvclock);
-		cmn_err(CE_WARN, "cvc_unregister: q = 0x%x not registered", q);
+		cmn_err(CE_WARN, "cvc_unregister: q = 0x%p not registered", q);
 		return;
 	}
 
--- a/usr/src/uts/sun4u/starfire/cvcredir/cvcredir.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/starfire/cvcredir/cvcredir.c	Tue Nov 15 22:21:35 2005 -0800
@@ -20,7 +20,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -209,7 +209,7 @@
 	 * cvcd which has us open and is reading console data.
 	 */
 	if (cvc_register(RD(q)) == -1) {
-		cmn_err(CE_WARN, "cvcr_open: cvc_register failed for q = 0x%x",
+		cmn_err(CE_WARN, "cvcr_open: cvc_register failed for q = 0x%p",
 			q);
 	}
 	return (0);
--- a/usr/src/uts/sun4u/starfire/io/drmach.c	Tue Nov 15 19:50:27 2005 -0800
+++ b/usr/src/uts/sun4u/starfire/io/drmach.c	Tue Nov 15 22:21:35 2005 -0800
@@ -366,7 +366,7 @@
 static pnode_t
 drmach_node_obp_get_dnode(drmach_node_t *np)
 {
-	return ((pnode_t)np->here);
+	return ((pnode_t)(uintptr_t)np->here);
 }
 
 static int
@@ -384,7 +384,7 @@
 	nodeid = prom_childnode(prom_rootnode());
 
 	/* save our new position with in the tree */
-	np->here = (void *)nodeid;
+	np->here = (void *)(uintptr_t)nodeid;
 
 	rv = 0;
 	while (nodeid != OBP_NONODE) {
@@ -395,7 +395,7 @@
 		nodeid = prom_nextnode(nodeid);
 
 		/* save our new position with in the tree */
-		np->here = (void *)nodeid;
+		np->here = (void *)(uintptr_t)nodeid;
 	}
 
 	return (rv);
@@ -1450,15 +1450,15 @@
 
 		DRMACH_PR("mc idle register address list:");
 		isp = (drmach_mc_idle_script_t *)buf;
-		DRMACH_PR("source mc idle addr 0x%llx, mem id %p",
+		DRMACH_PR("source mc idle addr 0x%lx, mem id %p",
 			isp[0].idle_addr, isp[0].mem);
-		DRMACH_PR("target mc idle addr 0x%llx, mem id %p",
+		DRMACH_PR("target mc idle addr 0x%lx, mem id %p",
 			isp[1].idle_addr, isp[1].mem);
 		ASSERT(isp[2].idle_addr == 0);
 
 		DRMACH_PR("copy-rename script:");
 		for (j = 0; j < m; j++) {
-			DRMACH_PR("0x%llx = 0x%08x",
+			DRMACH_PR("0x%lx = 0x%08x",
 				rsp[j].masr_addr, rsp[j].masr);
 		}
 
@@ -1669,11 +1669,11 @@
 	while (x_ml->next != NULL)
 		x_ml = x_ml->next;
 
-	DRMACH_PR("source copy span: base pa 0x%llx, end pa 0x%llx\n",
+	DRMACH_PR("source copy span: base pa 0x%lx, end pa 0x%lx\n",
 		s_copybasepa,
 		s_copybasepa + x_ml->address + x_ml->size);
 
-	DRMACH_PR("target copy span: base pa 0x%llx, end pa 0x%llx\n",
+	DRMACH_PR("target copy span: base pa 0x%lx, end pa 0x%lx\n",
 		t_copybasepa,
 		t_copybasepa + x_ml->address + x_ml->size);
 
@@ -1689,9 +1689,9 @@
 	err = drmach_mem_get_size(t_id, &t_size);
 	ASSERT(err == NULL);
 
-	DRMACH_PR("current source base pa 0x%llx, size 0x%llx\n",
+	DRMACH_PR("current source base pa 0x%lx, size 0x%lx\n",
 		s_basepa, s_size);
-	DRMACH_PR("current target base pa 0x%llx, size 0x%llx\n",
+	DRMACH_PR("current target base pa 0x%lx, size 0x%lx\n",
 		t_basepa, t_size);
 
 	ASSERT(s_copybasepa + x_ml->address + x_ml->size <= s_basepa + s_size);
@@ -3012,7 +3012,7 @@
 	rv = kcage_range_add(basepfn, npages, 1);
 	kcage_range_unlock();
 	if (rv == ENOMEM) {
-		cmn_err(CE_WARN, "%lld megabytes not available to kernel cage",
+		cmn_err(CE_WARN, "%ld megabytes not available to kernel cage",
 			(size == 0 ? 0 : size / MBYTE));
 	} else if (rv != 0) {
 		/* catch this in debug kernels */