Browse Source

fixfmt: kernel now cleaned

fixfmt: fixed vga (mouse not working)
fixfmt: fixed mouse and last details in kernel cleaned
Elbing Miss 7 years ago
parent
commit
f91dfdcba2

+ 6 - 6
sys/src/9/386/ether8169.c

@@ -416,7 +416,7 @@ rtl8169mii(Ctlr* ctlr)
 		ctlr->mii = nil;
 		return -1;
 	}
-	print("oui %#ux phyno %d, macv = %#8.8ux phyv = %#4.4ux\n",
+	print("oui %#x phyno %d, macv = %#8.8x phyv = %#4.4x\n",
 		phy->oui, phy->phyno, ctlr->macv, ctlr->phyv);
 
 	miiane(ctlr->mii, ~0, ~0, ~0);
@@ -577,8 +577,8 @@ rtl8169ifstat(Ether* edev, void* a, int32_t n, uint32_t offset)
 	l += snprint(p+l, READSTR-l, "punlc: %u\n", ctlr->punlc);
 	l += snprint(p+l, READSTR-l, "fovw: %u\n", ctlr->fovw);
 
-	l += snprint(p+l, READSTR-l, "tcr: %#8.8ux\n", ctlr->tcr);
-	l += snprint(p+l, READSTR-l, "rcr: %#8.8ux\n", ctlr->rcr);
+	l += snprint(p+l, READSTR-l, "tcr: %#8.8x\n", ctlr->tcr);
+	l += snprint(p+l, READSTR-l, "rcr: %#8.8x\n", ctlr->rcr);
 	l += snprint(p+l, READSTR-l, "multicast: %u\n", ctlr->mcast);
 
 	if(ctlr->mii != nil && ctlr->mii->curphy != nil){
@@ -721,7 +721,7 @@ rtl8169init(Ether* edev)
 	cplusc |= /*Rxchksum|*/Mulrw;
 	switch(ctlr->macv){
 	default:
-		panic("ether8169: unknown macv %#08ux for vid %#ux did %#ux",
+		panic("ether8169: unknown macv %#08x for vid %#x did %#x",
 			ctlr->macv, ctlr->pcidev->vid, ctlr->pcidev->did);
 	case Macv01:
 		break;
@@ -1098,7 +1098,7 @@ rtl8169interrupt(Ureg *u, void* arg)
 		 * Some of the reserved bits get set sometimes...
 		 */
 		if(isr & (Serr|Timeout|Tdu|Fovw|Punlc|Rdu|Ter|Tok|Rer|Rok))
-			panic("rtl8169interrupt: imr %#4.4ux isr %#4.4ux",
+			panic("rtl8169interrupt: imr %#4.4x isr %#4.4x",
 				csr16r(ctlr, Imr), isr);
 	}
 }
@@ -1163,7 +1163,7 @@ rtl8169pci(void)
 
 		port = p->mem[0].bar & ~0x01;
 		if(ioalloc(port, p->mem[0].size, 0, "rtl8169") < 0){
-			print("rtl8169: port %#ux in use\n", port);
+			print("rtl8169: port %#x in use\n", port);
 			continue;
 		}
 		ctlr = malloc(sizeof(Ctlr));

+ 5 - 5
sys/src/9/386/ether82557.c

@@ -299,7 +299,7 @@ command(Ctlr* ctlr, int c, int v)
 	if(timeo >= 100){
 		ctlr->command = -1;
 		iunlock(&ctlr->rlock);
-		iprint("i82557: command %#ux %#ux timeout\n", c, v);
+		iprint("i82557: command %#x %#x timeout\n", c, v);
 		return;
 	}
 
@@ -537,7 +537,7 @@ txstart(Ether* ether)
 			ctlr->action = 0;
 		}
 		else{
-			print("#l%d: action %#ux\n", ether->ctlrno, ctlr->action);
+			print("#l%d: action %#x\n", ether->ctlrno, ctlr->action);
 			ctlr->action = 0;
 			break;
 		}
@@ -768,7 +768,7 @@ interrupt(Ureg* ureg, void* arg)
 		}
 
 		if(status & (StatCX|StatFR|StatCNA|StatRNR|StatMDI|StatSWI))
-			panic("#l%d: status %#ux\n", ether->ctlrno, status);
+			panic("#l%d: status %#x\n", ether->ctlrno, status);
 	}
 }
 
@@ -978,7 +978,7 @@ i82557pci(void)
 		 */
 		port = p->mem[1].bar & ~0x01;
 		if(ioalloc(port, p->mem[1].size, 0, "i82557") < 0){
-			print("i82557: port %#ux in use\n", port);
+			print("i82557: port %#x in use\n", port);
 			continue;
 		}
 
@@ -1115,7 +1115,7 @@ reset(Ether* ether)
 		sum += x;
 	}
 	if(sum != 0xBABA)
-		print("#l%d: EEPROM checksum - %#4.4ux\n", ether->ctlrno, sum);
+		print("#l%d: EEPROM checksum - %#4.4x\n", ether->ctlrno, sum);
 
 	/*
 	 * Eeprom[6] indicates whether there is a PHY and whether

+ 2 - 2
sys/src/9/386/etherigbe.c

@@ -1996,13 +1996,13 @@ igbepci(void)
 
 		mem = vmap(p->mem[0].bar & ~0x0F, p->mem[0].size);
 		if(mem == nil){
-			print("igbe: can't map %8.8luX\n", p->mem[0].bar);
+			print("igbe: can't map %8.8lX\n", p->mem[0].bar);
 			continue;
 		}
 		cls = pcicfgr8(p, PciCLS);
 		switch(cls){
 		default:
-			print("igbe: p->cls %#ux, setting to 0x10\n", p->cls);
+			print("igbe: p->cls %#x, setting to 0x10\n", p->cls);
 			p->cls = 0x10;
 			pcicfgw8(p, PciCLS, p->cls);
 			break;

+ 4 - 4
sys/src/9/386/etherm10g.c

@@ -754,9 +754,9 @@ chkfw(Ctlr *c)
 	uint32_t type;
 
 	off = gbit32(c->ram+0x3c);
-	dprint("firmware %llux\n", (uint64_t)off);
+	dprint("firmware %llx\n", (uint64_t)off);
 	if((off&3) || off + sizeof *h > c->ramsz){
-		print("!m10g: bad firmware %llux\n", (uint64_t)off);
+		print("!m10g: bad firmware %llx\n", (uint64_t)off);
 		return -1;
 	}
 	h = (Fwhdr*)(c->ram + off);
@@ -847,10 +847,10 @@ setmem(Pcidev *p, Ctlr *c)
 	raddr = p->mem[0].bar & ~0x0F;
 	mem = vmap(raddr, p->mem[0].size);
 	if(mem == nil){
-		print("m10g: can't map %8.8lux\n", p->mem[0].bar);
+		print("m10g: can't map %8.8lx\n", p->mem[0].bar);
 		return -1;
 	}
-	dprint("%llux <- vmap(mem[0].size = %x)\n", raddr, p->mem[0].size);
+	dprint("%llx <- vmap(mem[0].size = %x)\n", raddr, p->mem[0].size);
 	c->port = raddr;
 	c->ram = mem;
 	c->cmd = malign(sizeof *c->cmd);

+ 4 - 4
sys/src/9/386/pci.c

@@ -404,7 +404,7 @@ pcirouting(void)
 	r = (Router *)p;
 
 	if(0)
-		print("PCI interrupt routing table version %d.%d at %.6llux\n",
+		print("PCI interrupt routing table version %d.%d at %.6llx\n",
 			r->version[0], r->version[1], (uintptr_t)r & 0xfffff);
 
 	tbdf = (BusPCI << 24)|(r->bus << 16)|(r->devfn << 8);
@@ -667,12 +667,12 @@ pcilhinv(Pcidev* p)
 		for(i = 0; i < nelem(p->mem); i++) {
 			if(t->mem[i].size == 0)
 				continue;
-			print("%d:%.8lux %d ", i, t->mem[i].bar, t->mem[i].size);
+			print("%d:%.8lx %d ", i, t->mem[i].bar, t->mem[i].size);
 		}
 		if(t->ioa.bar || t->ioa.size)
-			print("ioa:%.8lux %d ", t->ioa.bar, t->ioa.size);
+			print("ioa:%.8lx %d ", t->ioa.bar, t->ioa.size);
 		if(t->mema.bar || t->mema.size)
-			print("mema:%.8lux %d ", t->mema.bar, t->mema.size);
+			print("mema:%.8lx %d ", t->mema.bar, t->mema.size);
 		if(t->bridge)
 			print("->%d", BUSBNO(t->bridge->tbdf));
 		print("\n");

+ 33 - 33
sys/src/9/386/sdiahci.c

@@ -261,7 +261,7 @@ preg(unsigned char *reg, int n)
 static void
 dreg(char *s, Aport *p)
 {
-	dprint("ahci: %stask=%#lux; cmd=%#lux; ci=%#lux; is=%#lux\n",
+	dprint("ahci: %stask=%#lx; cmd=%#lx; ci=%#lx; is=%#lx\n",
 		s, p->task, p->cmd, p->ci, p->isr);
 }
 
@@ -423,7 +423,7 @@ smart(Aportc *pc, int n)
 	c[6] = 0xc2;
 	listsetup(pc, Lwrite);
 	if(ahciwait(pc, 1000) == -1 || pc->p->task & (1|32)){
-		dprint("ahci: smart fail %#lux\n", pc->p->task);
+		dprint("ahci: smart fail %#lx\n", pc->p->task);
 //		preg(pc->m->fis.r, 20);
 		return -1;
 	}
@@ -446,7 +446,7 @@ smartrs(Aportc *pc)
 
 	c = pc->pm->fis.r;
 	if(ahciwait(pc, 1000) == -1 || pc->p->task & (1|32)){
-		dprint("ahci: smart fail %#lux\n", pc->p->task);
+		dprint("ahci: smart fail %#lx\n", pc->p->task);
 		preg(c, 20);
 		return -1;
 	}
@@ -464,7 +464,7 @@ ahciflushcache(Aportc *pc)
 	c[2] = pc->pm->feat & Dllba? 0xea: 0xe7;
 	listsetup(pc, Lwrite);
 	if(ahciwait(pc, 60000) == -1 || pc->p->task & (1|32)){
-		dprint("ahciflushcache: fail %#lux\n", pc->p->task);
+		dprint("ahciflushcache: fail %#lx\n", pc->p->task);
 //		preg(pc->m->fis.r, 20);
 		return -1;
 	}
@@ -724,7 +724,7 @@ ahciwakeup(Aport *p)
 	if((s & Intpm) != Intslumber && (s & Intpm) != Intpartpwr)
 		return;
 	if((s & Devdet) != Devpresent){	/* not (device, no phy) */
-		iprint("ahci: slumbering drive unwakable %#ux\n", s);
+		iprint("ahci: slumbering drive unwakable %#x\n", s);
 		return;
 	}
 	p->sctl = 3*Aipm | 0*Aspd | Adet;
@@ -756,7 +756,7 @@ ahciconfigdrive(Drive *d)
 		name = nil;
 	if(p->sstatus & (Devphycomm|Devpresent) && h->cap & Hsss){
 		/* device connected & staggered spin-up */
-		dprint("ahci: configdrive: %s: spinning up ... [%#lux]\n",
+		dprint("ahci: configdrive: %s: spinning up ... [%#lx]\n",
 			name, p->sstatus);
 		p->cmd |= Apod|Asud;
 		asleep(1400);
@@ -953,7 +953,7 @@ updatedrive(Drive *d)
 	}
 	if(cause & Adhrs){
 		if(p->task & (1<<5|1)){
-			dprint("ahci: %s: Adhrs cause %#lux serr %#lux task %#lux\n",
+			dprint("ahci: %s: Adhrs cause %#lx serr %#lx task %#lx\n",
 				name, cause, serr, p->task);
 			d->portm.flag |= Ferror;
 			ewake = 1;
@@ -961,10 +961,10 @@ updatedrive(Drive *d)
 		pr = 0;
 	}
 	if(p->task & 1 && last != cause)
-		dprint("%s: err ca %#lux serr %#lux task %#lux sstat %#lux\n",
+		dprint("%s: err ca %#lx serr %#lx task %#lx sstat %#lx\n",
 			name, cause, serr, p->task, p->sstatus);
 	if(pr)
-		dprint("%s: upd %#lux ta %#lux\n", name, cause, p->task);
+		dprint("%s: upd %#lx ta %#lx\n", name, cause, p->task);
 
 	if(cause & (Aprcs|Aifs)){
 		s0 = d->state;
@@ -988,7 +988,7 @@ updatedrive(Drive *d)
 			d->state = Doffline;
 			break;
 		}
-		dprint("%s: %s → %s [Apcrs] %#lux\n", name,
+		dprint("%s: %s → %s [Apcrs] %#lx\n", name,
 			diskstates[s0], diskstates[d->state], p->sstatus);
 		/* print pulled message here. */
 		if(s0 == Dready && d->state != Dready)
@@ -1065,7 +1065,7 @@ resetdisk(Drive *d)
 	det = p->sctl & 7;
 	stat = p->sstatus & Devdet;
 	state = (p->cmd>>28) & 0xf;
-	dprint("ahci: resetdisk: icc %#ux  det %d sdet %d\n", state, det, stat);
+	dprint("ahci: resetdisk: icc %#x  det %d sdet %d\n", state, det, stat);
 
 	ilock(&d->Lock);
 	state = d->state;
@@ -1127,7 +1127,7 @@ newdrive(Drive *d)
 	setstate(d, Dready);
 	qunlock(&c->pm->ql);
 
-	idprint("%s: %sLBA %,llud sectors: %s %s %s %s\n", d->unit->SDperm.name,
+	idprint("%s: %sLBA %,llu sectors: %s %s %s %s\n", d->unit->SDperm.name,
 		(pm->feat & Dllba? "L": ""), d->sectors, d->model, d->firmware,
 		d->serial, d->mediachange? "[mediachange]": "");
 	return 0;
@@ -1144,7 +1144,7 @@ westerndigitalhung(Drive *d)
 {
 	if((d->portm.feat&Datapi) == 0 && d->active &&
 	    TK2MS(sys->ticks - d->intick) > 5000){
-		dprint("%s: drive hung; resetting [%#lux] ci %#lx\n",
+		dprint("%s: drive hung; resetting [%#lx] ci %#lx\n",
 			d->unit->SDperm.name, d->port->task, d->port->ci);
 		d->state = Dreset;
 	}
@@ -1164,7 +1164,7 @@ doportreset(Drive *d)
 	else
 		i = 0;
 	qunlock(&d->portm.ql);
-	dprint("ahci: doportreset: portreset → %s  [task %#lux]\n",
+	dprint("ahci: doportreset: portreset → %s  [task %#lx]\n",
 		diskstates[d->state], d->port->task);
 	return i;
 }
@@ -1210,7 +1210,7 @@ checkdrive(Drive *d, int i)
 	if(s)
 		d->lastseen = sys->ticks;
 	if(s != olds[i]){
-		dprint("%s: status: %06#ux -> %06#ux: %s\n",
+		dprint("%s: status: %06#x -> %06#x: %s\n",
 			name, olds[i], s, diskstates[d->state]);
 		olds[i] = s;
 		d->wait = 0;
@@ -1230,7 +1230,7 @@ checkdrive(Drive *d, int i)
 		case 0:			/* no device */
 			break;
 		default:
-			dprint("%s: unknown status %06#ux\n", name, s);
+			dprint("%s: unknown status %06#x\n", name, s);
 			/* fall through */
 		case Intactive:		/* active, no device */
 			if(++d->wait&Mphywait)
@@ -1250,7 +1250,7 @@ reset:
 			break;
 		case Intactive|Devphycomm|Devpresent:
 			if((++d->wait&Midwait) == 0){
-				dprint("%s: slow reset %06#ux task=%#lux; %d\n",
+				dprint("%s: slow reset %06#x task=%#lx; %d\n",
 					name, s, d->port->task, d->wait);
 				goto reset;
 			}
@@ -1270,7 +1270,7 @@ reset:
 		/* fallthrough */
 	case Derror:
 	case Dreset:
-		dprint("%s: reset [%s]: mode %d; status %06#ux\n",
+		dprint("%s: reset [%s]: mode %d; status %06#x\n",
 			name, diskstates[d->state], d->mode, s);
 		iunlock(&d->Lock);
 		resetdisk(d);
@@ -1281,7 +1281,7 @@ portreset:
 		if(d->wait++ & 0xff && (s & Intactive) == 0)
 			break;
 		/* device is active */
-		dprint("%s: portreset [%s]: mode %d; status %06#ux\n",
+		dprint("%s: portreset [%s]: mode %d; status %06#x\n",
 			name, diskstates[d->state], d->mode, s);
 		d->portm.flag |= Ferror;
 		clearci(d->port);
@@ -1324,7 +1324,7 @@ isctlrjabbering(Ctlr *c, uint32_t cause)
 	}
 	if (++c->intrs > Maxintrspertick) {
 		iprint("sdiahci: %lu intrs per tick for no serviced "
-			"drive; cause %#lux mport %d\n",
+			"drive; cause %#lx mport %d\n",
 			c->intrs, cause, c->mport);
 		c->intrs = 0;
 	}
@@ -1380,7 +1380,7 @@ iainterrupt(Ureg *u, void *a)
 	}
 	if (cause) {
 		isctlrjabbering(c, cause);
-		iprint("sdiachi: intr cause unserviced: %#lux\n", cause);
+		iprint("sdiachi: intr cause unserviced: %#lx\n", cause);
 	}
 	iunlock(&c->Lock);
 }
@@ -1719,7 +1719,7 @@ iariopkt(SDreq *r, Drive *d)
 	name = d->unit->SDperm.name;
 	p = d->port;
 
-	aprint("ahci: iariopkt: %04#ux %04#ux %c %d %p\n",
+	aprint("ahci: iariopkt: %04#x %04#x %c %d %p\n",
 		cmd[0], cmd[2], "rw"[r->write], r->dlen, r->data);
 	if(cmd[0] == 0x5a && (cmd[2] & 0x3f) == 0x3f)
 		return sdmodesense(r, cmd, d->info, d->infosz);
@@ -1811,7 +1811,7 @@ retry:
 	}
 	if(flag & Ferror){
 		if((task&Eidnf) == 0)
-			print("%s: i/o error task=%#ux\n", name, task);
+			print("%s: i/o error task=%#x\n", name, task);
 		r->status = SDcheck;
 		return SDcheck;
 	}
@@ -1858,7 +1858,7 @@ iario(SDreq *r)
 	}
 
 	if(*cmd != 0x28 && *cmd != 0x2a){
-		print("%s: bad cmd %.2#ux\n", name, cmd[0]);
+		print("%s: bad cmd %.2#x\n", name, cmd[0]);
 		r->status = SDcheck;
 		return SDcheck;
 	}
@@ -1934,7 +1934,7 @@ retry:
 			goto retry;
 		}
 		if(flag & Ferror){
-			print("%s: i/o error task=%#ux @%,lld\n",
+			print("%s: i/o error task=%#x @%,lld\n",
 				name, task, lba);
 			r->status = SDeio;
 			return SDeio;
@@ -1956,7 +1956,7 @@ retry:
 static int
 iaahcimode(Pcidev *p)
 {
-	dprint("iaahcimode: %#ux %#ux %#ux\n", pcicfgr8(p, 0x91), pcicfgr8(p, 92),
+	dprint("iaahcimode: %#x %#x %#x\n", pcicfgr8(p, 0x91), pcicfgr8(p, 92),
 		pcicfgr8(p, 93));
 	pcicfgw16(p, 0x92, pcicfgr16(p, 0x92) | 0x3f);	/* ports 0-5 */
 	return 0;
@@ -2000,7 +2000,7 @@ didtype(Pcidev *p)
 		break;
 	case Vatiamd:
 		if(p->did == 0x4380 || p->did == 0x4390 || p->did == 0x4391){
-			print("detected sb600 vid %#ux did %#ux\n", p->vid, p->did);
+			print("detected sb600 vid %#x did %#x\n", p->vid, p->did);
 			return Tsb600;
 		}
 		break;
@@ -2011,7 +2011,7 @@ didtype(Pcidev *p)
 		break;
 	}
 	if(p->ccrb == Pcibcstore && p->ccru == Pciscsata && p->ccrp == 1){
-		print("ahci: Tunk: vid %#4.4ux did %#4.4ux\n", p->vid, p->did);
+		print("ahci: Tunk: vid %#4.4x did %#4.4x\n", p->vid, p->did);
 		return Tunk;
 	}
 	return -1;
@@ -2098,7 +2098,7 @@ iapnp(void)
 		c->physio = (unsigned char *)io;
 		c->mmio = vmap(io, p->mem[Abar].size);
 		if(c->mmio == 0){
-			print("ahci: %s: address %#luX in use did=%#x\n",
+			print("ahci: %s: address %#lX in use did=%#x\n",
 				Tname(c), io, p->did);
 			continue;
 		}
@@ -2188,8 +2188,8 @@ print("iarctl: nil u->dev->ctlr\n");
 	}else
 		p = seprint(p, e, "no disk present [%s]\n", diskstates[d->state]);
 	serrstr(o->serror, buf, buf + sizeof buf - 1);
-	p = seprint(p, e, "reg\ttask %#lux cmd %#lux serr %#lux %s ci %#lux "
-		"is %#lux; sig %#lux sstatus %06#lux\n",
+	p = seprint(p, e, "reg\ttask %#lx cmd %#lx serr %#lx %s ci %#lx "
+		"is %#lx; sig %#lx sstatus %06#lx\n",
 		o->task, o->cmd, o->serror, buf,
 		o->ci, o->isr, o->sig, o->sstatus);
 	if(d->unit == nil)
@@ -2293,7 +2293,7 @@ iawctl(SDunit *u, Cmdbuf *cmd)
 		i = strtoul(f[1]? f[1]: "0", 0, 0);
 		if(i > 0xff)
 			i = 0;
-		dprint("ahci: %04d %#ux\n", i, d->info[i]);
+		dprint("ahci: %04d %#x\n", i, d->info[i]);
 	}else if(strcmp(f[0], "mode") == 0)
 		forcemode(d, f[1]? f[1]: "satai");
 	else if(strcmp(f[0], "nop") == 0){
@@ -2397,7 +2397,7 @@ iartopctl(SDev *sdev, char *p, char *e)
 	has(Hsxs, "sxs");
 	portr(pr, pr + sizeof pr, hba->pi);
 	return seprint(p, e,
-		"iss %ld ncs %ld np %ld; ghc %#lux isr %#lux pi %#lux %s ver %#lux\n",
+		"iss %ld ncs %ld np %ld; ghc %#lx isr %#lx pi %#lx %s ver %#lx\n",
 		(cap>>20) & 0xf, (cap>>8) & 0x1f, 1 + (cap & 0x1f),
 		hba->ghc, hba->isr, hba->pi, pr, hba->ver);
 #undef has

+ 8 - 8
sys/src/9/amd64/archamd64.c

@@ -180,7 +180,7 @@ cpuidhz(uint32_t *info0, uint32_t *info1)
 			hz = ((hz/100)+5)/10;
 			break;
 		}
-		DBG("cpuidhz: 0x2a: %#llux hz %lld\n", rdmsr(0x2a), hz);
+		DBG("cpuidhz: 0x2a: %#llx hz %lld\n", rdmsr(0x2a), hz);
 	}
 	else if(memcmp(&info0[1], "AuthcAMDenti", 12) == 0){
 		switch(info1[0] & 0x0fff0ff0){
@@ -215,7 +215,7 @@ cpuidhz(uint32_t *info0, uint32_t *info1)
 			hz = (((msr & 0x3f)+0x10)*100000000ll)/(1<<r);
 			break;
 		}
-		DBG("cpuidhz: %#llux hz %lld\n", msr, hz);
+		DBG("cpuidhz: %#llx hz %lld\n", msr, hz);
 	}
 	else
 		return 0;
@@ -237,12 +237,12 @@ cpuiddump(void)
 
 	for(i = 0; i < machp()->CPU.ncpuinfos; i++){
 		cpuid(i, 0, info);
-		DBG("eax = %#8.8ux: %8.8x %8.8x %8.8x %8.8x\n",
+		DBG("eax = %#8.8x: %8.8x %8.8x %8.8x %8.8x\n",
 			i, info[0], info[1], info[2], info[3]);
 	}
 	for(i = 0; i < machp()->CPU.ncpuinfoe; i++){
 		cpuid(0x80000000|i, 0, info);
-		DBG("eax = %#8.8ux: %8.8x %8.8x %8.8x %8.8x\n",
+		DBG("eax = %#8.8x: %8.8x %8.8x %8.8x %8.8x\n",
 			0x80000000|i, info[0], info[1], info[2], info[3]);
 	}
 }
@@ -331,7 +331,7 @@ fmtP(Fmt* f)
 	pa = va_arg(f->args, uintmem);
 
 	if(f->flags & FmtSharp)
-		return fmtprint(f, "%#16.16llux", pa);
+		return fmtprint(f, "%#16.16llx", pa);
 
 	return fmtprint(f, "%llu", pa);
 }
@@ -343,7 +343,7 @@ fmtL(Fmt* f)
 
 	pl = va_arg(f->args, Mpl);
 
-	return fmtprint(f, "%#16.16llux", pl);
+	return fmtprint(f, "%#16.16llx", pl);
 }
 
 static int
@@ -353,7 +353,7 @@ fmtR(Fmt* f)
 
 	r = va_arg(f->args, uint64_t);
 
-	return fmtprint(f, "%#16.16llux", r);
+	return fmtprint(f, "%#16.16llx", r);
 }
 
 /* virtual address fmt */
@@ -363,7 +363,7 @@ fmtW(Fmt *f)
 	uint64_t va;
 
 	va = va_arg(f->args, uint64_t);
-	return fmtprint(f, "%#ullx=0x[%ullx][%ullx][%ullx][%ullx][%ullx]", va,
+	return fmtprint(f, "%#llx=0x[%llx][%llx][%llx][%llx][%llx]", va,
 		PTLX(va, 3), PTLX(va, 2), PTLX(va, 1), PTLX(va, 0),
 		va & ((1<<PGSHFT)-1));
 

+ 2 - 2
sys/src/9/amd64/devarch.c

@@ -412,7 +412,7 @@ archread(Chan *c, void *a, int32_t n, int64_t offset)
 		for(map = iomap.map; n > 0 && map != nil; map = map->next){
 			if(offset-- > 0)
 				continue;
-			sprint(p, "%#8lux %#8lux %-12.12s\n", map->start, map->end-1, map->tag);
+			sprint(p, "%#8lx %#8lx %-12.12s\n", map->start, map->end-1, map->tag);
 			p += Linelen;
 			n--;
 		}
@@ -536,7 +536,7 @@ cputyperead(Chan* c, void *a, int32_t n, int64_t off)
 	if(k > 4)
 		k = 4;
 	for(i = 0; i < k; i++)
-		s = seprint(s, e, "%#8.8ux %#8.8ux %#8.8ux %#8.8ux\n",
+		s = seprint(s, e, "%#8.8x %#8.8x %#8.8x %#8.8x\n",
 			machp()->CPU.cpuinfo[i][0], machp()->CPU.cpuinfo[i][1],
 			machp()->CPU.cpuinfo[i][2], machp()->CPU.cpuinfo[i][3]);
 	return readstr(off, a, n, buf);

+ 17 - 17
sys/src/9/amd64/ether8139.c

@@ -322,7 +322,7 @@ rtl8139ifstat(Ether* edev, void* a, int32_t n, uint32_t offset)
 	p = malloc(READSTR);
 	if(p == nil)
 		error(Enomem);
-	l = snprint(p, READSTR, "rcr %#8.8ux\n", ctlr->rcr);
+	l = snprint(p, READSTR, "rcr %#8.8x\n", ctlr->rcr);
 	l += snprint(p+l, READSTR-l, "multicast %u\n", ctlr->mcast);
 	l += snprint(p+l, READSTR-l, "ierrs %d\n", ctlr->ierrs);
 	l += snprint(p+l, READSTR-l, "etxth %d\n", ctlr->etxth);
@@ -335,20 +335,20 @@ rtl8139ifstat(Ether* edev, void* a, int32_t n, uint32_t offset)
 	ctlr->rec += csr16r(ctlr, Rec);
 	l += snprint(p+l, READSTR-l, "rec %d\n", ctlr->rec);
 
-	l += snprint(p+l, READSTR-l, "Tcr %#8.8lux\n", csr32r(ctlr, Tcr));
-	l += snprint(p+l, READSTR-l, "Config0 %#2.2ux\n", csr8r(ctlr, Config0));
-	l += snprint(p+l, READSTR-l, "Config1 %#2.2ux\n", csr8r(ctlr, Config1));
-	l += snprint(p+l, READSTR-l, "Msr %#2.2ux\n", csr8r(ctlr, Msr));
-	l += snprint(p+l, READSTR-l, "Config3 %#2.2ux\n", csr8r(ctlr, Config3));
-	l += snprint(p+l, READSTR-l, "Config4 %#2.2ux\n", csr8r(ctlr, Config4));
-
-	l += snprint(p+l, READSTR-l, "Bmcr %#4.4ux\n", csr16r(ctlr, Bmcr));
-	l += snprint(p+l, READSTR-l, "Bmsr %#4.4ux\n", csr16r(ctlr, Bmsr));
-	l += snprint(p+l, READSTR-l, "Anar %#4.4ux\n", csr16r(ctlr, Anar));
-	l += snprint(p+l, READSTR-l, "Anlpar %#4.4ux\n", csr16r(ctlr, Anlpar));
-	l += snprint(p+l, READSTR-l, "Aner %#4.4ux\n", csr16r(ctlr, Aner));
-	l += snprint(p+l, READSTR-l, "Nwaytr %#4.4ux\n", csr16r(ctlr, Nwaytr));
-	snprint(p+l, READSTR-l, "Cscr %#4.4ux\n", csr16r(ctlr, Cscr));
+	l += snprint(p+l, READSTR-l, "Tcr %#8.8lx\n", csr32r(ctlr, Tcr));
+	l += snprint(p+l, READSTR-l, "Config0 %#2.2x\n", csr8r(ctlr, Config0));
+	l += snprint(p+l, READSTR-l, "Config1 %#2.2x\n", csr8r(ctlr, Config1));
+	l += snprint(p+l, READSTR-l, "Msr %#2.2x\n", csr8r(ctlr, Msr));
+	l += snprint(p+l, READSTR-l, "Config3 %#2.2x\n", csr8r(ctlr, Config3));
+	l += snprint(p+l, READSTR-l, "Config4 %#2.2x\n", csr8r(ctlr, Config4));
+
+	l += snprint(p+l, READSTR-l, "Bmcr %#4.4x\n", csr16r(ctlr, Bmcr));
+	l += snprint(p+l, READSTR-l, "Bmsr %#4.4x\n", csr16r(ctlr, Bmsr));
+	l += snprint(p+l, READSTR-l, "Anar %#4.4x\n", csr16r(ctlr, Anar));
+	l += snprint(p+l, READSTR-l, "Anlpar %#4.4x\n", csr16r(ctlr, Anlpar));
+	l += snprint(p+l, READSTR-l, "Aner %#4.4x\n", csr16r(ctlr, Aner));
+	l += snprint(p+l, READSTR-l, "Nwaytr %#4.4x\n", csr16r(ctlr, Nwaytr));
+	snprint(p+l, READSTR-l, "Cscr %#4.4x\n", csr16r(ctlr, Cscr));
 	n = readstr(offset, a, n, p);
 	free(p);
 
@@ -716,7 +716,7 @@ rtl8139interrupt(Ureg *ureg, void* arg)
 		 * other than try to reinitialise the chip?
 		 */
 		if((isr & (Serr|Timerbit)) != 0){
-			iprint("rtl8139interrupt: imr %#4.4ux isr %#4.4ux\n",
+			iprint("rtl8139interrupt: imr %#4.4x isr %#4.4x\n",
 				csr16r(ctlr, Imr), isr);
 			if(isr & Timerbit)
 				csr32w(ctlr, TimerInt, 0);
@@ -748,7 +748,7 @@ rtl8139match(Ether* edev, int id)
 			continue;
 
 		if(ioalloc(port, p->mem[0].size, 0, "rtl8139") < 0){
-			print("rtl8139: port %#ux in use\n", port);
+			print("rtl8139: port %#x in use\n", port);
 			continue;
 		}
 

+ 9 - 9
sys/src/9/amd64/ioapic.c

@@ -183,7 +183,7 @@ ioapicdump(void)
 			lock(&apic->Ioapic.l);
 			rtblget(apic, n, &hi, &lo);
 			unlock(&apic->Ioapic.l);
-			print(" rdt %2.2d %#8.8ux %#8.8ux\n", n, hi, lo);
+			print(" rdt %2.2d %#8.8x %#8.8x\n", n, hi, lo);
 		}
 	}
 	for(i = 0; i < Nbus; i++){
@@ -192,7 +192,7 @@ ioapicdump(void)
 		print("iointr bus %d:\n", i);
 		for(; rbus != nil; rbus = rbus->next){
 			rdt = rbus->rdt;
-			print(" apic %ld devno %#ux (%d %d) intin %d lo %#ux ref %d\n",
+			print(" apic %ld devno %#x (%d %d) intin %d lo %#x ref %d\n",
 				rdt->apic-xioapic, rbus->devno, rbus->devno>>2,
 				rbus->devno & 0x03, rdt->intin, rdt->lo, rdt->ref);
 		}
@@ -322,7 +322,7 @@ intrenablemsi(Vctl* v, Pcidev *p)
 	v->type = "msi";
 	v->mask = msimask;
 
-	DBG("msiirq: %T: enabling %.16llux %s irq %d vno %d\n", p->tbdf, msivec, v->name, v->Vkey.irq, vno);
+	DBG("msiirq: %T: enabling %.16llx %s irq %d vno %d\n", p->tbdf, msivec, v->name, v->Vkey.irq, vno);
 	return vno;
 }
 
@@ -376,19 +376,19 @@ ioapicintrenable(Vctl* v)
 
 		busno = BUSBNO(v->Vkey.tbdf);
 		if((pcidev = pcimatchtbdf(v->Vkey.tbdf)) == nil)
-			panic("no PCI dev for tbdf %#8.8ux\n", v->Vkey.tbdf);
+			panic("no PCI dev for tbdf %#8.8x\n", v->Vkey.tbdf);
 		if((vecno = intrenablemsi(v, pcidev)) != -1)
 			return vecno;
 		disablemsi(v, pcidev);
 		if((devno = pcicfgr8(pcidev, PciINTP)) == 0)
-			panic("no INTP for tbdf %#8.8ux\n", v->Vkey.tbdf);
+			panic("no INTP for tbdf %#8.8x\n", v->Vkey.tbdf);
 		devno = BUSDNO(v->Vkey.tbdf)<<2|(devno-1);
-		DBG("ioapicintrenable: tbdf %#8.8ux busno %d devno %d\n",
+		DBG("ioapicintrenable: tbdf %#8.8x busno %d devno %d\n",
 			v->Vkey.tbdf, busno, devno);
 	}
 	else{
 		SET(busno); SET(devno);
-		panic("unknown tbdf %#8.8ux\n", v->Vkey.tbdf);
+		panic("unknown tbdf %#8.8x\n", v->Vkey.tbdf);
 	}
 
 	rdt = nil;
@@ -414,7 +414,7 @@ ioapicintrenable(Vctl* v)
 				rdt = rbus->rdt;
 				break;
 			}
-		DBG("isa: tbdf %#8.8ux busno %d devno %d %#p\n",
+		DBG("isa: tbdf %#8.8x busno %d devno %d %#p\n",
 			v->Vkey.tbdf, busno, devno, rdt);
 	}
 	if(rdt == nil)
@@ -448,7 +448,7 @@ ioapicintrenable(Vctl* v)
 	vecno = lo & 0xff;
 	unlock(&rdt->apic->Ioapic.l);
 
-	DBG("busno %d devno %d hi %#8.8ux lo %#8.8ux vecno %d\n",
+	DBG("busno %d devno %d hi %#8.8x lo %#8.8x vecno %d\n",
 		busno, devno, hi, lo, vecno);
 	v->isr = apicisr;
 	v->eoi = apiceoi;

+ 20 - 20
sys/src/9/amd64/mmu.c

@@ -99,7 +99,7 @@ dumpptepg(int lvl, uintptr_t pa)
 	for(i = 0; i < PTSZ/sizeof(PTE); i++)
 		if(pte[i] & PteP){
 			tabs(tab);
-			print("l%d %#p[%#05x]: %#ullx\n", lvl, pa, i, pte[i]);
+			print("l%d %#p[%#05x]: %#llx\n", lvl, pa, i, pte[i]);
 
 			/* skip kernel mappings */
 			if((pte[i]&PteU) == 0){
@@ -122,11 +122,11 @@ dumpmmu(Proc *p)
 	for(i = 3; i > 0; i--){
 		print("mmuptp[%d]:\n", i);
 		for(pg = p->MMU.mmuptp[i]; pg != nil; pg = pg->next)
-			print("\tpg %#p = va %#ullx pa %#ullx"
-				" daddr %#ulx next %#p prev %#p\n",
+			print("\tpg %#p = va %#llx pa %#llx"
+				" daddr %#lx next %#p prev %#p\n",
 				pg, pg->va, pg->pa, pg->daddr, pg->next, pg->prev);
 	}
-	print("pml4 %#ullx\n", machp()->MMU.pml4->pa);
+	print("pml4 %#llx\n", machp()->MMU.pml4->pa);
 	if(0)dumpptepg(4, machp()->MMU.pml4->pa);
 }
 
@@ -138,13 +138,13 @@ dumpmmuwalk(uint64_t addr)
 
 	pml4 = UINT2PTR(machp()->MMU.pml4->va);
 	if((l = mmuwalk(pml4, addr, 3, &pte, nil)) >= 0)
-		print("cpu%d: mmu l%d pte %#p = %llux\n", machp()->machno, l, pte, *pte);
+		print("cpu%d: mmu l%d pte %#p = %llx\n", machp()->machno, l, pte, *pte);
 	if((l = mmuwalk(pml4, addr, 2, &pte, nil)) >= 0)
-		print("cpu%d: mmu l%d pte %#p = %llux\n", machp()->machno, l, pte, *pte);
+		print("cpu%d: mmu l%d pte %#p = %llx\n", machp()->machno, l, pte, *pte);
 	if((l = mmuwalk(pml4, addr, 1, &pte, nil)) >= 0)
-		print("cpu%d: mmu l%d pte %#p = %llux\n", machp()->machno, l, pte, *pte);
+		print("cpu%d: mmu l%d pte %#p = %llx\n", machp()->machno, l, pte, *pte);
 	if((l = mmuwalk(pml4, addr, 0, &pte, nil)) >= 0)
-		print("cpu%d: mmu l%d pte %#p = %llux\n", machp()->machno, l, pte, *pte);
+		print("cpu%d: mmu l%d pte %#p = %llx\n", machp()->machno, l, pte, *pte);
 }
 
 static Page mmuptpfreelist;
@@ -277,29 +277,29 @@ checkpte(uintmem ppn, void *a)
 	if((l = mmuwalk(pml4, addr, 3, &pte, nil)) < 0 || (*pte&PteP) == 0)
 		goto Panic;
 	s = seprint(buf, buf+sizeof buf,
-		"check3: l%d pte %#p = %llux\n",
+		"check3: l%d pte %#p = %llx\n",
 		l, pte, pte?*pte:~0);
 	if((l = mmuwalk(pml4, addr, 2, &pte, nil)) < 0 || (*pte&PteP) == 0)
 		goto Panic;
 	s = seprint(s, buf+sizeof buf,
-		"check2: l%d  pte %#p = %llux\n",
+		"check2: l%d  pte %#p = %llx\n",
 		l, pte, pte?*pte:~0);
 	if(*pte&PtePS)
 		return;
 	if((l = mmuwalk(pml4, addr, 1, &pte, nil)) < 0 || (*pte&PteP) == 0)
 		goto Panic;
 	seprint(s, buf+sizeof buf,
-		"check1: l%d  pte %#p = %llux\n",
+		"check1: l%d  pte %#p = %llx\n",
 		l, pte, pte?*pte:~0);
 	return;
 Panic:
 
 	seprint(s, buf+sizeof buf,
-		"checkpte: l%d addr %#p ppn %#ullx kaddr %#p pte %#p = %llux",
+		"checkpte: l%d addr %#p ppn %#llx kaddr %#p pte %#p = %llx",
 		l, a, ppn, KADDR(ppn), pte, pte?*pte:~0);
 	print("%s\n", buf);
-	seprint(buf, buf+sizeof buf, "start %#ullx unused %#ullx"
-		" unmap %#ullx end %#ullx\n",
+	seprint(buf, buf+sizeof buf, "start %#llx unused %#llx"
+		" unmap %#llx end %#llx\n",
 		sys->vmstart, sys->vmunused, sys->vmunmapped, sys->vmend);
 	panic("%s", buf);
 }
@@ -360,7 +360,7 @@ pteflags(uint attr)
 
 	flags = 0;
 	if(attr & ~(PTEVALID|PTEWRITE|PTERONLY|PTEUSER|PTEUNCACHED|PTENOEXEC))
-		panic("mmuput: wrong attr bits: %#ux\n", attr);
+		panic("mmuput: wrong attr bits: %#x\n", attr);
 	if(attr&PTEVALID)
 		flags |= PteP;
 	if(attr&PTEWRITE)
@@ -397,14 +397,14 @@ mmuput(uintptr_t va, Page *pg, uint attr)
 		panic("mmuput: zero pa");
 
 	if(DBGFLG){
-		snprint(buf, sizeof buf, "cpu%d: up %#p mmuput %#p %#P %#ux\n",
+		snprint(buf, sizeof buf, "cpu%d: up %#p mmuput %#p %#P %#x\n",
 			machp()->machno, up, va, pa, attr);
 		print("%s", buf);
 	}
 	assert(pg->pgszi >= 0);
 	pgsz = sys->pgsz[pg->pgszi];
 	if(pa & (pgsz-1))
-		panic("mmuput: pa offset non zero: %#ullx\n", pa);
+		panic("mmuput: pa offset non zero: %#llx\n", pa);
 	pa |= pteflags(attr);
 
 	pl = splhi();
@@ -475,7 +475,7 @@ mmuput(uintptr_t va, Page *pg, uint attr)
 	splx(pl);
 
 	if(DBGFLG){
-		snprint(buf, sizeof buf, "cpu%d: up %#p new pte %#p = %#llux\n",
+		snprint(buf, sizeof buf, "cpu%d: up %#p new pte %#p = %#llx\n",
 			machp()->machno, up, pte, pte?*pte:~0);
 		print("%s", buf);
 	}
@@ -774,7 +774,7 @@ mmuphysaddr(uintptr_t va)
 	mask = PGLSZ(l)-1;
 	pa = (*pte & ~mask) + (va & mask);
 
-	DBG("physaddr: l %d va %#p pa %#llux\n", l, va, pa);
+	DBG("physaddr: l %d va %#p pa %#llx\n", l, va, pa);
 
 	return pa;
 }
@@ -840,7 +840,7 @@ mmuinit(void)
 	sz = ROUNDUP(o, 4*MiB) - o;
 	pa = asmalloc(0, sz, 1, 0);
 	if(pa != o)
-		panic("mmuinit: pa %#llux memstart %#llux\n", pa, o);
+		panic("mmuinit: pa %#llx memstart %#llx\n", pa, o);
 	sys->pmstart += sz;
 
 	sys->vmstart = KSEG0;

+ 12 - 12
sys/src/9/amd64/mp.c

@@ -61,7 +61,7 @@ static void
 mpintrprint(char* s, uint8_t* p)
 {
 	char buf[128], *b, *e;
-	char format[] = " type %d flags %#ux bus %d IRQ %d APIC %d INTIN %d\n";
+	char format[] = " type %d flags %#x bus %d IRQ %d APIC %d INTIN %d\n";
 
 	b = buf;
 	e = b + sizeof(buf);
@@ -197,7 +197,7 @@ mpparse(PCMP* pcmp, int maxcores)
 		for(i = 0; p < e; i++){
 			if(i && ((i & 0x0f) == 0))
 				print("\n");
-			print(" %#2.2ux", *p);
+			print(" %#2.2x", *p);
 			p++;
 		}
 		print("\n");
@@ -210,7 +210,7 @@ mpparse(PCMP* pcmp, int maxcores)
 		 * CPU and identical for all. Indicate whether this is
 		 * the bootstrap processor (p[3] & 0x02).
 		 */
-		DBG("mpparse: cpu %d pa %#ux bp %d\n",
+		DBG("mpparse: cpu %d pa %#x bp %d\n",
 			p[1], l32get(pcmp->apicpa), p[3] & 0x02);
 		if((p[3] & 0x01) != 0 && maxcores-- > 0)
 			apicinit(p[1], l32get(pcmp->apicpa), p[3] & 0x02);
@@ -328,14 +328,14 @@ mpparse(PCMP* pcmp, int maxcores)
 		for(i = 0; i < n; i++){
 			if(i && ((i & 0x0f) == 0))
 				print("\n");
-			print(" %#2.2ux", *p);
+			print(" %#2.2x", *p);
 			p++;
 		}
 		print("\n");
 		break;
 	case 128:
 		DBG("address space mapping\n");
-		DBG(" bus %d type %d base %#llux length %#llux\n",
+		DBG(" bus %d type %d base %#llx length %#llx\n",
 			p[2], p[3], l64get(p+4), l64get(p+12));
 		p += p[1];
 		break;
@@ -423,10 +423,10 @@ mpsinit(int maxcores)
 		panic("NO _MP_ table");
 	}
 	if(DBGFLG){
-		DBG("_MP_ @ %#p, addr %#ux length %u rev %d",
+		DBG("_MP_ @ %#p, addr %#x length %u rev %d",
 			mp, l32get(mp->addr), mp->length, mp->revision);
 		for(i = 0; i < sizeof(mp->feature); i++)
-			DBG(" %2.2#ux", mp->feature[i]);
+			DBG(" %2.2#x", mp->feature[i]);
 		DBG("\n");
 	}
 	if(mp->revision != 1 && mp->revision != 4)
@@ -449,22 +449,22 @@ mpsinit(int maxcores)
 		return;
 	}
 	if(DBGFLG){
-		DBG("PCMP @ %#p length %#ux revision %d\n",
+		DBG("PCMP @ %#p length %#x revision %d\n",
 			pcmp, l16get(pcmp->length), pcmp->revision);
-		DBG(" %20.20s oaddr %#ux olength %#ux\n",
+		DBG(" %20.20s oaddr %#x olength %#x\n",
 			(char*)pcmp->string, l32get(pcmp->oaddr),
 			l16get(pcmp->olength));
-		DBG(" entry %d apicpa %#ux\n",
+		DBG(" entry %d apicpa %#x\n",
 			l16get(pcmp->entry), l32get(pcmp->apicpa));
 
-		DBG(" xlength %#ux xchecksum %#ux\n",
+		DBG(" xlength %#x xchecksum %#x\n",
     			l16get(pcmp->xlength), pcmp->xchecksum);
 	}
 	if(pcmp->xchecksum != 0){
 		p = ((uint8_t*)pcmp) + l16get(pcmp->length);
 		i = sigchecksum(p, l16get(pcmp->xlength));
 		if(((i+pcmp->xchecksum) & 0xff) != 0){
-			print("extended table checksums to %#ux\n", i);
+			print("extended table checksums to %#x\n", i);
 			vunmap(pcmp, n);
 			return;
 		}

+ 4 - 4
sys/src/9/amd64/multiboot.c

@@ -75,13 +75,13 @@ multiboot(uint32_t magic, uint32_t pmbi, int vflag)
 	uint64_t addr, len;
 
 	if(vflag)
-		print("magic %#ux pmbi %#ux\n", magic, pmbi);
+		print("magic %#x pmbi %#x\n", magic, pmbi);
 	if(magic != 0x2badb002)
 		print("no magic in multiboot\n");//return -1;
 
 	mbi = KADDR(pmbi);
 	if(vflag)
-		print("flags %#ux\n", mbi->flags);
+		print("flags %#x\n", mbi->flags);
 	if(mbi->flags & Fcmdline){
 		p = KADDR(mbi->cmdline);
 		if(vflag)
@@ -97,7 +97,7 @@ multiboot(uint32_t magic, uint32_t pmbi, int vflag)
 			else
 				p = "";
 			if(vflag)
-				print("mod %#ux %#ux <%s>\n",
+				print("mod %#x %#x <%s>\n",
 					mod->modstart, mod->modend, p);
 			else
 				asmmodinit(mod->modstart, mod->modend, p);
@@ -140,7 +140,7 @@ multiboot(uint32_t magic, uint32_t pmbi, int vflag)
 				break;
 			}
 			if(vflag)
-				print("\n\t%#16.16llux %#16.16llux (%llu)\n",
+				print("\n\t%#16.16llx %#16.16llx (%llu)\n",
 					addr, addr+len, len);
 
 			n += mmap->size+sizeof(mmap->size);

+ 5 - 5
sys/src/9/amd64/pmcio.c

@@ -188,7 +188,7 @@ setctl(PmcCtl *p, int regno)
 	pmcuserenab(pmcanyenab());
 	if (pmcdebug) {
 		v = rdmsr(regno+ PerfEvtbase);
-		print("conf pmc[%#ux]: %#llux\n", regno, v);
+		print("conf pmc[%#x]: %#llx\n", regno, v);
 	}
 	return 0;
 }
@@ -336,7 +336,7 @@ pmcgetctr(uint32_t coreno, uint32_t regno)
 	if(coreno == machp()->machno){
 		v = getctr(regno);
 		if (pmcdebug) {
-			print("int getctr[%#ux, %#ux] = %#llux\n", regno, coreno, v);
+			print("int getctr[%#x, %#x] = %#llx\n", regno, coreno, v);
 		}
 		return v;
 	}
@@ -352,7 +352,7 @@ pmcgetctr(uint32_t coreno, uint32_t regno)
 	v = p->ctr;
 	iunlock(&mp->pmclock);
 	if (pmcdebug) {
-		print("ext getctr[%#ux, %#ux] = %#llux\n", regno, coreno, v);
+		print("ext getctr[%#x, %#x] = %#llx\n", regno, coreno, v);
 	}
 	return v;
 }
@@ -365,7 +365,7 @@ pmcsetctr(uint32_t coreno, uint64_t v, uint32_t regno)
 
 	if(coreno == machp()->machno){
 		if (pmcdebug) {
-			print("int getctr[%#ux, %#ux] = %#llux\n", regno, coreno, v);
+			print("int getctr[%#x, %#x] = %#llx\n", regno, coreno, v);
 		}
 		return setctr(v, regno);
 	}
@@ -373,7 +373,7 @@ pmcsetctr(uint32_t coreno, uint64_t v, uint32_t regno)
 	mp = sys->machptr[coreno];
 	p = &mp->pmc[regno];
 	if (pmcdebug) {
-		print("ext setctr[%#ux, %#ux] = %#llux\n", regno, coreno, v);
+		print("ext setctr[%#x, %#x] = %#llx\n", regno, coreno, v);
 	}
 	ilock(&mp->pmclock);
 	p->ctr = v;

+ 2 - 2
sys/src/9/amd64/syscall.c

@@ -262,7 +262,7 @@ syscall(unsigned int scallnr, Ureg *ureg)
 	static Ar0 zar0;
 
 	if(!userureg(ureg))
-		panic("syscall: cs %#llux\n", ureg->cs);
+		panic("syscall: cs %#llx\n", ureg->cs);
 
 	cycles(&up->kentry);
 
@@ -314,7 +314,7 @@ syscall(unsigned int scallnr, Ureg *ureg)
 	ar0 = zar0;
 	if(!waserror()){
 		if(scallnr >= nsyscall || systab[scallnr].f == nil){
-			pprint("bad sys call number %d pc %#llux\n",
+			pprint("bad sys call number %d pc %#llx\n",
 				scallnr, ureg->ip);
 			postnote(up, 1, "sys: bad sys call", NDebug);
 			error(Ebadarg);

+ 35 - 35
sys/src/9/amd64/trap.c

@@ -55,7 +55,7 @@ intrenable(int irq, void (*f)(Ureg*, void*), void* a, int tbdf, char *name)
 	Vctl *v;
 	extern int ioapicintrenable(Vctl*);
 	if(f == nil){
-		print("intrenable: nil handler for %d, tbdf %#ux for %s\n",
+		print("intrenable: nil handler for %d, tbdf %#x for %s\n",
 			irq, tbdf, name);
 		return nil;
 	}
@@ -73,7 +73,7 @@ intrenable(int irq, void (*f)(Ureg*, void*), void* a, int tbdf, char *name)
 	vno = ioapicintrenable(v);
 	if(vno == -1){
 		iunlock(&vctllock);
-		print("intrenable: couldn't enable irq %d, tbdf %#ux for %s\n",
+		print("intrenable: couldn't enable irq %d, tbdf %#x for %s\n",
 			irq, tbdf, v->name);
 		free(v);
 		return nil;
@@ -143,7 +143,7 @@ irqallocread(Chan* c, void *vbuf, int32_t n, int64_t offset)
 	for(vno=0; vno<nelem(vctl); vno++){
 		for(v=vctl[vno]; v; v=v->next){
 			t = intrtimes + vno;
-			m = snprint(str, sizeof str, "%11d %11d %20llud %20llud %-*.*s %.*s\n",
+			m = snprint(str, sizeof str, "%11d %11d %20llu %20llu %-*.*s %.*s\n",
 				vno, v->Vkey.irq, t->count, t->cycles, 8, 8, v->type, KNAMELEN, v->name);
 			if(m <= offset)	/* if do not want this, skip entry */
 				offset -= m;
@@ -469,7 +469,7 @@ trap(Ureg* ureg)
 		if(vno == VectorNMI){
 			nmienable();
 			if(machp()->machno != 0){
-				iprint("cpu%d: PC %#llux\n",
+				iprint("cpu%d: PC %#llx\n",
 					machp()->machno, ureg->ip);
 				for(;;);
 			}
@@ -521,31 +521,31 @@ dumpgpr(Ureg* ureg)
 	else
 		print("cpu%d: registers for kernel\n", machp()->machno);
 
-	print("ax\t%#16.16llux\n", ureg->ax);
-	print("bx\t%#16.16llux\n", ureg->bx);
-	print("cx\t%#16.16llux\n", ureg->cx);
-	print("dx\t%#16.16llux\n", ureg->dx);
-	print("di\t%#16.16llux\n", ureg->di);
-	print("si\t%#16.16llux\n", ureg->si);
-	print("bp\t%#16.16llux\n", ureg->bp);
-	print("r8\t%#16.16llux\n", ureg->r8);
-	print("r9\t%#16.16llux\n", ureg->r9);
-	print("r10\t%#16.16llux\n", ureg->r10);
-	print("r11\t%#16.16llux\n", ureg->r11);
-	print("r12\t%#16.16llux\n", ureg->r12);
-	print("r13\t%#16.16llux\n", ureg->r13);
-	print("r14\t%#16.16llux\n", ureg->r14);
-	print("r15\t%#16.16llux\n", ureg->r15);
-	print("type\t%#llux\n", ureg->type);
-	print("error\t%#llux\n", ureg->error);
-	print("pc\t%#llux\n", ureg->ip);
-	print("cs\t%#llux\n", ureg->cs);
-	print("flags\t%#llux\n", ureg->flags);
-	print("sp\t%#llux\n", ureg->sp);
-	print("ss\t%#llux\n", ureg->ss);
-	print("type\t%#llux\n", ureg->type);
-	print("FS\t%#llux\n", rdmsr(FSbase));
-	print("GS\t%#llux\n", rdmsr(GSbase));
+	print("ax\t%#16.16llx\n", ureg->ax);
+	print("bx\t%#16.16llx\n", ureg->bx);
+	print("cx\t%#16.16llx\n", ureg->cx);
+	print("dx\t%#16.16llx\n", ureg->dx);
+	print("di\t%#16.16llx\n", ureg->di);
+	print("si\t%#16.16llx\n", ureg->si);
+	print("bp\t%#16.16llx\n", ureg->bp);
+	print("r8\t%#16.16llx\n", ureg->r8);
+	print("r9\t%#16.16llx\n", ureg->r9);
+	print("r10\t%#16.16llx\n", ureg->r10);
+	print("r11\t%#16.16llx\n", ureg->r11);
+	print("r12\t%#16.16llx\n", ureg->r12);
+	print("r13\t%#16.16llx\n", ureg->r13);
+	print("r14\t%#16.16llx\n", ureg->r14);
+	print("r15\t%#16.16llx\n", ureg->r15);
+	print("type\t%#llx\n", ureg->type);
+	print("error\t%#llx\n", ureg->error);
+	print("pc\t%#llx\n", ureg->ip);
+	print("cs\t%#llx\n", ureg->cs);
+	print("flags\t%#llx\n", ureg->flags);
+	print("sp\t%#llx\n", ureg->sp);
+	print("ss\t%#llx\n", ureg->ss);
+	print("type\t%#llx\n", ureg->type);
+	print("FS\t%#llx\n", rdmsr(FSbase));
+	print("GS\t%#llx\n", rdmsr(GSbase));
 
 	print("m\t%#16.16p\nup\t%#16.16p\n", machp(), up);
 }
@@ -564,9 +564,9 @@ die("dumpregs");
 	 * CR4. If there is a CR4 and machine check extensions, read the machine
 	 * check address and machine check type registers if RDMSR supported.
 	 */
-	print("cr0\t%#16.16llux\n", cr0get());
-	print("cr2\t%#16.16llux\n", machp()->MMU.cr2);
-	print("cr3\t%#16.16llux\n", cr3get());
+	print("cr0\t%#16.16llx\n", cr0get());
+	print("cr2\t%#16.16llx\n", machp()->MMU.cr2);
+	print("cr3\t%#16.16llx\n", cr3get());
 die("dumpregs");
 //	archdumpregs();
 }
@@ -689,7 +689,7 @@ faultamd64(Ureg* ureg, void* v)
 	 * initialisation before the system is fully up.
 	 */
 	if(up == nil){
-		panic("fault with up == nil; pc %#llux addr %#llux\n",
+		panic("fault with up == nil; pc %#llx addr %#llx\n",
 			ureg->ip, addr);
 	}
 
@@ -717,8 +717,8 @@ iprint("could not %s fault %p\n", faulttypes[ftype], addr);
 		 * the game's a bogey.
 		 */
 		if(!user && (!insyscall || up->nerrlab == 0))
-			panic("fault: %#llux\n", addr);
-		sprint(buf, "sys: trap: fault %s addr=%#llux",
+			panic("fault: %#llx\n", addr);
+		sprint(buf, "sys: trap: fault %s addr=%#llx",
 			faulttypes[ftype], addr);
 		postnote(up, 1, buf, NDebug);
 		if(insyscall)

+ 2 - 2
sys/src/9/amd64/usbehcipc.c

@@ -190,10 +190,10 @@ scanpci(void)
 			continue;
 		}
 		if(p->intl == 0xff || p->intl == 0) {
-			print("usbehci: no irq assigned for port %#lux\n", io);
+			print("usbehci: no irq assigned for port %#lx\n", io);
 			continue;
 		}
-		dprint("usbehci: %#x %#x: port %#lux size %#x irq %d\n",
+		dprint("usbehci: %#x %#x: port %#lx size %#x irq %d\n",
 			p->vid, p->did, io, p->mem[0].size, p->intl);
 
 		ctlr = malloc(sizeof(Ctlr));

+ 9 - 9
sys/src/9/amd64/usbohci.c

@@ -866,7 +866,7 @@ seprinttd(char *s, char *e, Td *td, int iso)
 	s = seprint(s, e, "\n\t\t");
 	/* we use only offsets[0] */
 	i = 0;
-	s = seprint(s, e, "[%d] %#ux cc=%#ux sz=%u\n", i, td->offsets[i],
+	s = seprint(s, e, "[%d] %#x cc=%#x sz=%u\n", i, td->offsets[i],
 		(td->offsets[i] >> Tdiccshift) & Tdiccmask,
 		td->offsets[i] & 0x7FF);
 	return s;
@@ -942,7 +942,7 @@ static char*
 seprintio(char *s, char *e, Qio *io, char *pref)
 {
 	s = seprint(s, e, "%s qio %#p ed %#p", pref, io, io->ed);
-	s = seprint(s, e, " tog %d iot %ld err %s id %#ulx",
+	s = seprint(s, e, " tog %d iot %ld err %s id %#lx",
 		io->toggle, io->iotime, io->err, io->usbid);
 	s = seprinttdtok(s, e, io->tok);
 	s = seprint(s, e, " %s\n", iosname[io->state]);
@@ -1020,10 +1020,10 @@ dump(Hci *hp)
 	ctlr = hp->Hciimpl.aux;
 	ilock(&ctlr->l);
 	seprintctl(cs, cs+sizeof(cs), ctlr->ohci->control);
-	print("ohci ctlr %#p: frno %#ux ctl %#lux %s sts %#lux intr %#lux\n",
+	print("ohci ctlr %#p: frno %#x ctl %#lx %s sts %#lx intr %#lx\n",
 		ctlr, ctlr->hcca->framenumber, ctlr->ohci->control, cs,
 		ctlr->ohci->cmdsts, ctlr->ohci->intrsts);
-	print("ctlhd %#ulx cur %#ulx bulkhd %#ulx cur %#ulx done %#ulx\n",
+	print("ctlhd %#lx cur %#lx bulkhd %#lx cur %#lx done %#lx\n",
 		ctlr->ohci->ctlheaded, ctlr->ohci->ctlcurred,
 		ctlr->ohci->bulkheaded, ctlr->ohci->bulkcurred,
 		ctlr->ohci->donehead);
@@ -1319,7 +1319,7 @@ interrupt(Ureg *ureg, void *arg)
 	}
 	if((status & Ue) != 0){
 		curred = ctlr->ohci->periodcurred;
-		print("ohci: unrecoverable error frame 0x%.8lux ed 0x%.8lux, "
+		print("ohci: unrecoverable error frame 0x%.8lx ed 0x%.8lx, "
 			"ints %d %d %d %d\n",
 			ctlr->ohci->fmnumber, curred,
 			ohciinterrupts[Tctl], ohciinterrupts[Tintr],
@@ -1329,7 +1329,7 @@ interrupt(Ureg *ureg, void *arg)
 		status &= ~Ue;
 	}
 	if(status != 0)
-		print("ohci interrupt: unhandled sts 0x%.8lux\n", status);
+		print("ohci interrupt: unhandled sts 0x%.8lx\n", status);
 	ctlr->ohci->intrenable = Mie | Wdh | Ue;
 	iunlock(&ctlr->l);
 }
@@ -2285,7 +2285,7 @@ portstatus(Hci *hp, int port)
 	if(ohcistatus & Lsda)
 		v |= HPslow;
 	if(v & (HPstatuschg|HPchange))
-		ddprint("ohci port %d sts %#ulx hub sts %#x\n", port, ohcistatus, v);
+		ddprint("ohci port %d sts %#lx hub sts %#x\n", port, ohcistatus, v);
 	return v;
 }
 
@@ -2299,7 +2299,7 @@ dumpohci(Ctlr *ctlr)
 	print("ohci registers: \n");
 	for(i = 0; i < sizeof(Ohci)/sizeof(uint32_t); i++)
 		if(i < 3 || ohci[i] != 0)
-			print("\t[%#2.2x]\t%#8.8ulx\n", i * 4, ohci[i]);
+			print("\t[%#2.2x]\t%#8.8lx\n", i * 4, ohci[i]);
 	print("\n");
 }
 
@@ -2397,7 +2397,7 @@ scanpci(void)
 			continue;
 		}
 		if(p->intl == 0xFF || p->intl == 0) {
-			print("ohci: no irq assigned for port %#lux\n", mem);
+			print("ohci: no irq assigned for port %#lx\n", mem);
 			continue;
 		}
 

+ 34 - 34
sys/src/9/amd64/usbuhci.c

@@ -317,7 +317,7 @@ uhcirun(Ctlr *ctlr, int on)
 {
 	int i;
 
-	ddprint("uhci %#ux setting run to %d\n", ctlr->port, on);
+	ddprint("uhci %#x setting run to %d\n", ctlr->port, on);
 
 	if(on)
 		uhcicmd(ctlr, INS(Cmd)|Crun);
@@ -332,7 +332,7 @@ uhcirun(Ctlr *ctlr, int on)
 			delay(1);
 	if(i == 100)
 		dprint("uhci %#x run cmd timed out\n", ctlr->port);
-	ddprint("uhci %#ux cmd %#ux sts %#ux\n",
+	ddprint("uhci %#x cmd %#x sts %#x\n",
 		ctlr->port, INS(Cmd), INS(Status));
 }
 
@@ -357,14 +357,14 @@ tdtok(Td *td)
 static char*
 seprinttd(char *s, char *se, Td *td)
 {
-	s = seprint(s, se, "%#p link %#ulx", td, td->link);
+	s = seprint(s, se, "%#p link %#lx", td, td->link);
 	if((td->link & Tdvf) != 0)
 		s = seprint(s, se, "V");
 	if((td->link & Tdterm) != 0)
 		s = seprint(s, se, "T");
 	if((td->link & Tdlinkqh) != 0)
 		s = seprint(s, se, "Q");
-	s = seprint(s, se, " csw %#ulx ", td->csw);
+	s = seprint(s, se, " csw %#lx ", td->csw);
 	if(td->csw & Tdactive)
 		s = seprint(s, se, "a");
 	if(td->csw & Tdiso)
@@ -376,7 +376,7 @@ seprinttd(char *s, char *se, Td *td)
 	if((td->csw & (Tderr1|Tderr2)) == 0)
 		s = seprint(s, se, "z");
 	if(td->csw & Tderrors)
-		s = seprint(s, se, " err %#ulx", td->csw & Tderrors);
+		s = seprint(s, se, " err %#lx", td->csw & Tderrors);
 	if(td->csw & Tdstalled)
 		s = seprint(s, se, "s");
 	if(td->csw & Tddberr)
@@ -391,7 +391,7 @@ seprinttd(char *s, char *se, Td *td)
 		s = seprint(s, se, "B");
 	s = seprint(s, se, " stslen %d", tdlen(td));
 
-	s = seprint(s, se, " token %#ulx", td->token);
+	s = seprint(s, se, " token %#lx", td->token);
 	if(td->token == 0)		/* the BWS loopback Td, ignore rest */
 		return s;
 	s = seprint(s, se, " maxlen %d", maxtdlen(td));
@@ -399,8 +399,8 @@ seprinttd(char *s, char *se, Td *td)
 		s = seprint(s, se, " d1");
 	else
 		s = seprint(s, se, " d0");
-	s = seprint(s, se, " id %#ulx:", (td->token>>15) & Epmax);
-	s = seprint(s, se, "%#ulx", (td->token>>8) & Devmax);
+	s = seprint(s, se, " id %#lx:", (td->token>>15) & Epmax);
+	s = seprint(s, se, "%#lx", (td->token>>8) & Devmax);
 	switch(tdtok(td)){
 	case Tdtokin:
 		s = seprint(s, se, " in");
@@ -414,7 +414,7 @@ seprinttd(char *s, char *se, Td *td)
 	default:
 		s = seprint(s, se, " BADPID");
 	}
-	s = seprint(s, se, "\n\t  buffer %#ulx data %#p", td->buffer, td->data);
+	s = seprint(s, se, "\n\t  buffer %#lx data %#p", td->buffer, td->data);
 	s = seprint(s, se, " ndata %lu sbuff %#p buff %#p",
 		td->ndata, td->sbuff, td->buff);
 	if(td->ndata > 0)
@@ -476,7 +476,7 @@ dumptd(Td *td, char *pref)
 	for(; td != nil; td = td->next){
 		s = seprinttd(buf, se, td);
 		if(!sameptr(td->next, td->link))
-			seprint(s, se, " next %#p != link %#ulx %#p",
+			seprint(s, se, " next %#p != link %#lx %#p",
 				td->next, td->link, TPTR(td->link));
 		print("%std %s\n", pref, buf);
 		if(i++ > 20){
@@ -497,19 +497,19 @@ qhdump(Qh *qh, char *pref)
 
 	s = buf;
 	se = buf+sizeof(buf);
-	s = seprint(s, se, "%sqh %s %#p state %s link %#ulx", pref,
+	s = seprint(s, se, "%sqh %s %#p state %s link %#lx", pref,
 		qh->tag, qh, qhsname[qh->state], qh->link);
 	if(!sameptr(qh->tds, qh->elink))
-		s = seprint(s, se, " [tds %#p != elink %#ulx %#p]",
+		s = seprint(s, se, " [tds %#p != elink %#lx %#p]",
 			qh->tds, qh->elink, TPTR(qh->elink));
 	if(!sameptr(qh->next, qh->link))
-		s = seprint(s, se, " [next %#p != link %#ulx %#p]",
+		s = seprint(s, se, " [next %#p != link %#lx %#p]",
 			qh->next, qh->link, QPTR(qh->link));
 	if((qh->link & Tdterm) != 0)
 		s = seprint(s, se, "T");
 	if((qh->link & Tdlinkqh) != 0)
 		s = seprint(s, se, "Q");
-	s = seprint(s, se, " elink %#ulx", qh->elink);
+	s = seprint(s, se, " elink %#lx", qh->elink);
 	if((qh->elink & Tdterm) != 0)
 		s = seprint(s, se, "T");
 	if((qh->elink & Tdlinkqh) != 0)
@@ -523,7 +523,7 @@ qhdump(Qh *qh, char *pref)
 		print("\thw tds:");
 		i = 0;
 		for(td = qh->elink; (td & Tdterm) == 0; td = TPTR(td)->link){
-			print(" %#ulx", td);
+			print(" %#lx", td);
 			if(td == TPTR(td)->link)	/* BWS Td */
 				break;
 			if(i++ > 40){
@@ -558,7 +558,7 @@ xdump(Ctlr *ctlr, int doilock)
 	print("uhci port %#x frames %#p nintr %d ntdintr %d",
 		ctlr->port, ctlr->frames, ctlr->nintr, ctlr->ntdintr);
 	print(" nqhintr %d nisointr %d\n", ctlr->nqhintr, ctlr->nisointr);
-	print("cmd %#ux sts %#ux fl %#ulx ps1 %#ux ps2 %#ux frames[0] %#ulx\n",
+	print("cmd %#x sts %#x fl %#lx ps1 %#x ps2 %#x frames[0] %#lx\n",
 		INS(Cmd), INS(Status),
 		INL(Flbaseadd), INS(PORT(0)), INS(PORT(1)),
 		ctlr->frames[0]);
@@ -836,7 +836,7 @@ isointerrupt(Ctlr *ctlr, Isoio* iso)
 		if((tdi->csw & Tdstalled) != 0){
 			if(iso->err == nil){
 				iso->err = errmsg(err);
-				diprint("isointerrupt: tdi %#p error %#ux %s\n",
+				diprint("isointerrupt: tdi %#p error %#x %s\n",
 					tdi, err, iso->err);
 				diprint("ctlr load %lu\n", ctlr->load);
 			}
@@ -889,7 +889,7 @@ qhinterrupt(Ctlr *ctlr, Qh *qh)
 	if(qh->tds == nil)
 		panic("qhinterrupt: no tds");
 	if((qh->tds->csw & Tdactive) == 0)
-		ddqprint("qhinterrupt port %#ux qh %#p p0 %#x p1 %#x\n",
+		ddqprint("qhinterrupt port %#x qh %#p p0 %#x p1 %#x\n",
 			ctlr->port, qh, INS(PORT(0)), INS(PORT(1)));
 	for(td = qh->tds; td != nil; td = td->next){
 		if(td->csw & Tdactive)
@@ -900,7 +900,7 @@ qhinterrupt(Ctlr *ctlr, Qh *qh)
 			/* just stalled is end of xfer but not an error */
 			if(err != Tdstalled && qh->io->err == nil){
 				qh->io->err = errmsg(td->csw & Tderrors);
-				dqprint("qhinterrupt: td %#p error %#ux %s\n",
+				dqprint("qhinterrupt: td %#p error %#x %s\n",
 					td, err, qh->io->err);
 				dqprint("ctlr load %lu\n", ctlr->load);
 			}
@@ -952,14 +952,14 @@ interrupt(Ureg *ureg, void *a)
 	OUTS(Status, sts & Sall);
 	cmd = INS(Cmd);
 	if(cmd & Crun == 0){
-		print("uhci %#ux: not running: uhci bug?\n", ctlr->port);
+		print("uhci %#x: not running: uhci bug?\n", ctlr->port);
 		/* BUG: should abort everything in this case */
 	}
 	if(debug > 1){
 		frptr = INL(Flbaseadd);
 		frno = INL(Frnum);
 		frno = TRUNC(frno, Nframes);
-		print("cmd %#ux sts %#ux frptr %#ux frno %d\n",
+		print("cmd %#x sts %#x frptr %#x frno %d\n",
 			cmd, sts, frptr, frno);
 	}
 	ctlr->ntdintr++;
@@ -2012,7 +2012,7 @@ portenable(Hci *hp, int port, int on)
 	microdelay(64);
 	iunlock(&ctlr->l);
 	tsleep(&up->sleep, return0, 0, Enabledelay);
-	dprint("uhci %#ux port %d enable=%d: sts %#x\n",
+	dprint("uhci %#x port %d enable=%d: sts %#x\n",
 		ctlr->port, port, on, INS(ioport));
 	qunlock(&ctlr->portlck);
 	poperror();
@@ -2028,7 +2028,7 @@ portreset(Hci *hp, int port, int on)
 	if(on == 0)
 		return 0;
 	ctlr = hp->Hciimpl.aux;
-	dprint("uhci: %#ux port %d reset\n", ctlr->port, port);
+	dprint("uhci: %#x port %d reset\n", ctlr->port, port);
 	p = PORT(port-1);
 	ilock(&ctlr->l);
 	OUTS(p, PSreset);
@@ -2040,7 +2040,7 @@ portreset(Hci *hp, int port, int on)
 		;
 	OUTS(p, (INS(p) & ~PSreset)|PSenable);
 	iunlock(&ctlr->l);
-	dprint("uhci %#ux after port %d reset: sts %#x\n",
+	dprint("uhci %#x after port %d reset: sts %#x\n",
 		ctlr->port, port, INS(p));
 	return 0;
 }
@@ -2066,7 +2066,7 @@ portstatus(Hci *hp, int port)
 	s = INS(ioport);
 	if(s & (PSstatuschg | PSchange)){
 		OUTS(ioport, s);
-		ddprint("uhci %#ux port %d status %#x\n", ctlr->port, port, s);
+		ddprint("uhci %#x port %d status %#x\n", ctlr->port, port, s);
 	}
 	iunlock(&ctlr->l);
 	qunlock(&ctlr->portlck);
@@ -2126,15 +2126,15 @@ scanpci(void)
 			continue;
 		}
 		if(ioalloc(io, p->mem[4].size, 0, "usbuhci") < 0){
-			print("usbuhci: port %#ux in use\n", io);
+			print("usbuhci: port %#x in use\n", io);
 			continue;
 		}
 		if(p->intl == 0xFF || p->intl == 0){
-			print("usbuhci: no irq assigned for port %#ux\n", io);
+			print("usbuhci: no irq assigned for port %#x\n", io);
 			continue;
 		}
 
-		dprint("uhci: %#x %#x: port %#ux size %#x irq %d\n",
+		dprint("uhci: %#x %#x: port %#x size %#x irq %d\n",
 			p->vid, p->did, io, p->mem[4].size, p->intl);
 
 		ctlr = malloc(sizeof(Ctlr));
@@ -2187,7 +2187,7 @@ uhcimeminit(Ctlr *ctlr)
 		ctlr->frames[i] = PCIWADDR(ctlr->qhs)|QHlinkqh;
 	OUTL(Flbaseadd, PCIWADDR(ctlr->frames));
 	OUTS(Frnum, 0);
-	dprint("uhci %#ux flb %#ulx frno %#ux\n", ctlr->port,
+	dprint("uhci %#x flb %#lx frno %#x\n", ctlr->port,
 		INL(Flbaseadd), INS(Frnum));
 }
 
@@ -2199,20 +2199,20 @@ init(Hci *hp)
 	int i;
 
 	ctlr = hp->Hciimpl.aux;
-	dprint("uhci %#ux init\n", ctlr->port);
+	dprint("uhci %#x init\n", ctlr->port);
 	coherence();
 	ilock(&ctlr->l);
 	OUTS(Usbintr, Itmout|Iresume|Ioc|Ishort);
 	uhcirun(ctlr, 1);
-	dprint("uhci: init: cmd %#ux sts %#ux sof %#ux",
+	dprint("uhci: init: cmd %#x sts %#x sof %#x",
 		INS(Cmd), INS(Status), INS(SOFmod));
-	dprint(" flb %#ulx frno %#ux psc0 %#ux psc1 %#ux",
+	dprint(" flb %#lx frno %#x psc0 %#x psc1 %#x",
 		INL(Flbaseadd), INS(Frnum), INS(PORT(0)), INS(PORT(1)));
 	/* guess other ports */
 	for(i = 2; i < 6; i++){
 		sts = INS(PORT(i));
 		if(sts != 0xFFFF && (sts & PSreserved1) == 1){
-			dprint(" psc%d %#ux", i, sts);
+			dprint(" psc%d %#x", i, sts);
 			hp->nports++;
 		}else
 			break;
@@ -2229,7 +2229,7 @@ uhcireset(Ctlr *ctlr)
 	int sof;
 
 	ilock(&ctlr->l);
-	dprint("uhci %#ux reset\n", ctlr->port);
+	dprint("uhci %#x reset\n", ctlr->port);
 
 	/*
 	 * Turn off legacy mode. Some controllers won't

+ 1 - 1
sys/src/9/ip/ipifc.c

@@ -230,7 +230,7 @@ char sfixedformat[] = "device %s maxtu %d sendra %d recvra %d mflag %d oflag"
 " %d maxraint %d minraint %d linkmtu %d reachtime %d rxmitra %d ttl %d routerlt"
 " %d pktin %lu pktout %lu errin %lu errout %lu\n";
 
-char slineformat[] = "	%-40I %-10M %-40I %-12lud %-12lud\n";
+char slineformat[] = "	%-40I %-10M %-40I %-12lu %-12lu\n";
 
 static int
 ipifcstate(Conv *c, char *state, int n)

+ 1 - 1
sys/src/9/port/dev.c

@@ -251,7 +251,7 @@ devwalk(Chan *c, Chan *nc, char **name, int nname, Dirtab *tab, int ntab,
 			 * nc->dev should be nil here.
 			 */
 			if((*gen)(nc, nil, tab, ntab, DEVDOTDOT, &dir) != 1){
-				print("devgen walk .. in dev%s %#llux broken\n",
+				print("devgen walk .. in dev%s %#llx broken\n",
 					c->dev->name, nc->qid.path);
 				error("broken devgen");
 			}

+ 4 - 4
sys/src/9/port/devcons.c

@@ -409,7 +409,7 @@ readnum(uint32_t off, char *buf, uint32_t n, uint32_t val, int size)
 {
 	char tmp[64];
 
-	snprint(tmp, sizeof(tmp), "%*lud", size-1, val);
+	snprint(tmp, sizeof(tmp), "%*lu", size-1, val);
 	tmp[size-1] = ' ';
 	if(off >= size)
 		return 0;
@@ -662,7 +662,7 @@ consread(Chan *c, void *buf, int32_t n, int64_t off)
 		return readstr(offset, buf, n, tmp);
 		break;
 	default:
-		print("consread %#llux\n", c->qid.path);
+		print("consread %#llx\n", c->qid.path);
 		error(Egreg);
 	}
 	return -1;		/* never reached */
@@ -835,7 +835,7 @@ conswrite(Chan *c, void *va, int32_t n, int64_t off)
 		error("#c/syscall: can only write on or off");
 		break;
 	default:
-		print("conswrite: %#llux\n", c->qid.path);
+		print("conswrite: %#llx\n", c->qid.path);
 		error(Egreg);
 	}
 	return n;
@@ -966,7 +966,7 @@ readtime(uint32_t off, char *buf, int n)
 	if(fasthz == 0LL)
 		fastticks((uint64_t*)&fasthz);
 	sec = nsec/1000000000ULL;
-	snprint(str, sizeof(str), "%*lud %*llud %*llud %*llud ",
+	snprint(str, sizeof(str), "%*lu %*llu %*llu %*llu ",
 		NUMSIZE-1, sec,
 		VLNUMSIZE-1, nsec,
 		VLNUMSIZE-1, ticks,

+ 3 - 3
sys/src/9/port/devdraw.c

@@ -246,7 +246,7 @@ drawgen(Chan *c, char *cc, Dirtab *dt, int i, int s, Dir *dp)
 			devdir(c, q, up->genbuf, 0, eve, 0500, dp);
 			break;
 		default:
-			panic("drawwalk %llux", c->qid.path);
+			panic("drawwalk %llx", c->qid.path);
 		}
 		return 1;
 	}
@@ -1227,7 +1227,7 @@ drawread(Chan *c, void *a, int32_t n, int64_t off)
 		for(index = 0; index < 256; index++){
 			getcolor(index, &red, &green, &blue);
 			m += snprint((char*)p+m, 4*12*256+1 - m,
-				"%11d %11lud %11lud %11lud\n", index,
+				"%11d %11lu %11lu %11lu\n", index,
 				red>>24, green>>24, blue>>24);
 		}
 		n = readstr(offset, a, n, (char*)p);
@@ -1415,7 +1415,7 @@ printmesg(char *fmt, unsigned char *a, int plsprnt)
 			a += 4;
 			break;
 		case 'L':
-			q += snprint(q, left, " %.8lux", (uint32_t)BGLONG(a));
+			q += snprint(q, left, " %.8lx", (uint32_t)BGLONG(a));
 			a += 4;
 			break;
 		case 'R':

+ 1 - 1
sys/src/9/port/devmouse.c

@@ -301,7 +301,7 @@ mouseread(Chan *c, void *va, int32_t n, int64_t off)
 				b = 16;
 			else if (b == 16)
 				b = 8;
-		snprint(buf, sizeof buf, "m%11d %11d %11d %11lud ",
+		snprint(buf, sizeof buf, "m%11d %11d %11d %11lu ",
 			m.xy.x, m.xy.y,
 			b,
 			m.msec);

+ 1 - 1
sys/src/9/port/devpci.c

@@ -203,7 +203,7 @@ pciread(Chan *c, void *va, int32_t n, int64_t offset)
 		for(i=0; i<nelem(p->mem); i++){
 			if(p->mem[i].size == 0)
 				continue;
-			w = seprint(w, ebuf, " %d:%.8lux %d", i, p->mem[i].bar, p->mem[i].size);
+			w = seprint(w, ebuf, " %d:%.8lx %d", i, p->mem[i].bar, p->mem[i].size);
 		}
 		*w++ = '\n';
 		*w = '\0';

+ 3 - 3
sys/src/9/port/devproc.c

@@ -545,7 +545,7 @@ procopen(Chan *c, int omode)
 		poperror();
 		qunlock(&p->debug);
 		psdecref(p);
-		pprint("procopen %#llux\n", c->qid.path);
+		pprint("procopen %#llx\n", c->qid.path);
 		error(Egreg);
 	}
 
@@ -649,7 +649,7 @@ procfdprint(Chan *c, int fd, int w, char *s, int ns)
 
 	if(w == 0)
 		w = procqidwidth(c);
-	n = snprint(s, ns, "%3d %.2s %C %4ud (%.16llux %*lud %.2x) %5ld %8lld %s\n",
+	n = snprint(s, ns, "%3d %.2s %C %4ud (%.16llx %*lu %.2x) %5ld %8lld %s\n",
 		fd,
 		&"r w rw"[(c->mode&3)<<1],
 		c->dev->dc, c->devno,
@@ -1413,7 +1413,7 @@ procwrite(Chan *c, void *va, int32_t n, int64_t off)
 		poperror();
 		qunlock(&p->debug);
 		psdecref(p);
-		pprint("unknown qid %#llux in procwrite\n", c->qid.path);
+		pprint("unknown qid %#llx in procwrite\n", c->qid.path);
 		error(Egreg);
 	}
 	poperror();

+ 1 - 1
sys/src/9/port/devroot.c

@@ -163,7 +163,7 @@ rootgen(Chan *c, char *name, Dirtab* dir, int j, int s, Dir *dp)
 		if(t >= l->ndir)
 			return -1;
 if(t < 0){
-print("rootgen %#llux %d %d\n", c->qid.path, s, t);
+print("rootgen %#llx %d %d\n", c->qid.path, s, t);
 panic("whoops");
 }
 		d = &l->dir[t];

+ 1 - 1
sys/src/9/port/devws.c

@@ -61,7 +61,7 @@ collect(void)
 	lock(&waitstatslk);
 	for(i = 0; i < NWstats; i++)
 		if(waitstats.pcs[i] != 0)
-			s = seprint(s, buf+n, "%s %#llux %d %#llud %#llud\n",
+			s = seprint(s, buf+n, "%s %#llx %d %#llu %#llu\n",
 				wname[waitstats.type[i]],
 				waitstats.pcs[i], waitstats.ns[i], waitstats.wait[i],
 				waitstats.total[i]);

+ 8 - 8
sys/src/9/port/syscallfmt.c

@@ -106,7 +106,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		a = va_arg(list, char*);
 		fmtuserstring(&fmt, a, " ");
 		i[0] = va_arg(list, int);
-		fmtprint(&fmt, "%#ux",  i[0]);
+		fmtprint(&fmt, "%#x",  i[0]);
 		break;
 	case CLOSE:
 	case NOTED:
@@ -121,7 +121,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		break;
 	case ALARM:
 		l = va_arg(list, unsigned long);
-		fmtprint(&fmt, "%#lud ", l);
+		fmtprint(&fmt, "%#lu ", l);
 		break;
 	case EXECAC:
 		i[0] = va_arg(list, int);
@@ -187,7 +187,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		a = va_arg(list, char*);
 		fmtuserstring(&fmt, a, " ");
 		i[0] = va_arg(list, int);
-		fmtprint(&fmt, "%#ux", i[0]);
+		fmtprint(&fmt, "%#x", i[0]);
 		break;
 	case OSEEK:					/* deprecated */
 		i[0] = va_arg(list, int);
@@ -208,7 +208,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		break;
 	case RFORK:
 		i[0] = va_arg(list, int);
-		fmtprint(&fmt, "%#ux", i[0]);
+		fmtprint(&fmt, "%#x", i[0]);
 		break;
 	case PIPE:
 	case BRK_:
@@ -220,7 +220,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		fmtuserstring(&fmt, a, " ");
 		i[0] = va_arg(list, int);
 		i[1] = va_arg(list, int);
-		fmtprint(&fmt, "%#ux %#ux", i[0], i[1]);
+		fmtprint(&fmt, "%#x %#x", i[0], i[1]);
 		break;
 	case FD2PATH:
 	case FSTAT:
@@ -281,7 +281,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		i[0] = va_arg(list, int);
 		vl = va_arg(list, int64_t);
 		i[1] = va_arg(list, int);
-		fmtprint(&fmt, "%#p %d %#llux %d", v, i[0], vl, i[1]);
+		fmtprint(&fmt, "%d %#llx %d", i[0], vl, i[1]);
 		break;
 	case FVERSION:
 		i[0] = va_arg(list, int);
@@ -310,7 +310,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		a = va_arg(list, char*);
 		fmtuserstring(&fmt, a, " ");
 		i[0] = va_arg(list, int);
-		fmtprint(&fmt, "%#ux ", i[0]);
+		fmtprint(&fmt, "%#x ", i[0]);
 		a = va_arg(list, char*);
 		fmtuserstring(&fmt, a, "");
 		break;
@@ -439,7 +439,7 @@ syscallfmt(uint8_t what, int syscallno, Ar0 *ar0, uint64_t start, uint64_t stop,
 		fmtprint(&fmt, " = %d", ar0->i);
 		break;
 	}
-	fmtprint(&fmt, " %s %#llud %#llud\n", errstr, start, stop);
+	fmtprint(&fmt, " %s %#llu %#llu\n", errstr, start, stop);
 
 	up->syscalltrace = fmtstrflush(&fmt);
 }

+ 8 - 8
sys/src/9/port/syszio.c

@@ -77,7 +77,7 @@ dumpzmap(ZMap *map)
 {
 	Map *mp;
 	for(mp = map->map; mp != nil; mp = mp->next)
-		print("\tmap %#ullx[%#ullx] %c\n", mp->addr, mp->size,
+		print("\tmap %#llx[%#llx] %c\n", mp->addr, mp->size,
 			mp->free ? 'f' : 'a');
 }
 
@@ -95,11 +95,11 @@ dumpzseg(Segment *s)
 		return;
 
 	zs = &s->zseg;
-	print("zseg %#ullx type %#ux map %#p naddr %d end %d\n",
+	print("zseg %#llx type %#x map %#p naddr %d end %d\n",
 		s->base, s->type, zs->map, zs->naddr, zs->end);
 	if(zs->addr != nil)
 		for(i = 0; i < zs->end; i++)
-			print("\taddr %#ullx\n", zs->addr[i]);
+			print("\taddr %#llx\n", zs->addr[i]);
 	map = zs->map;
 	if(map == nil)
 		return;
@@ -163,7 +163,7 @@ zgetaddr(Segment *s)
 	zs->end--;
 	if(zs->end > 0)
 		zs->addr[0] = zs->addr[zs->end];
-	DBG("zgetaddr: %#ullx\n", va);
+	DBG("zgetaddr: %#llx\n", va);
 	dumpzseg(s);
 	return va;
 }
@@ -181,7 +181,7 @@ zputaddr(Segment *s, uintptr_t va)
 	if((s->type&SG_ZIO) == 0)
 		return -1;
 	if((s->type&SG_KZIO) != 0){
-		DBG("zputaddr: zmapfree %#ullx\n", va);
+		DBG("zputaddr: zmapfree %#llx\n", va);
 		zmapfree(s->zseg.map, va);
 		dumpzseg(s);
 		return 0;
@@ -191,7 +191,7 @@ zputaddr(Segment *s, uintptr_t va)
 	zs->addr[zs->end++] = va;
 	if(zs->end == 1)
 		wakeup(&zs->rr);	/* in case anyone was waiting */
-	DBG("zputaddr %#ullx\n", va);
+	DBG("zputaddr %#llx\n", va);
 	dumpzseg(s);
 	return 0;
 }
@@ -616,7 +616,7 @@ zmapfree(ZMap* rmap, uintptr_t addr)
 	poperror();
 	unlock(&rmap->Lock);
 	if(DBGFLG > 1){
-		DBG("zmapfree %#ullx:\n", addr);
+		DBG("zmapfree %#llx:\n", addr);
 		dumpzmap(rmap);
 	}
 }
@@ -654,7 +654,7 @@ zmapalloc(ZMap* rmap, usize size)
 	poperror();
 	unlock(&rmap->Lock);
 	if(DBGFLG > 1){
-		DBG("zmapalloc %#ullx:\n", mp->addr);
+		DBG("zmapalloc %#llx:\n", mp->addr);
 		dumpzmap(rmap);
 	}
 	return mp->addr;

+ 1 - 1
sys/src/9/port/taslock.c

@@ -114,7 +114,7 @@ lockloop(Lock *l, uintptr_t pc)
 	Proc *p;
 
 	p = l->p;
-	print("lock %#p loop key %#ux pc %#p held by pc %#p proc %d\n",
+	print("lock %#p loop key %#x pc %#p held by pc %#p proc %d\n",
 		l, l->key, pc, l->_pc, p ? p->pid : 0);
 	dumpaproc(up);
 	if(p != nil)

+ 1 - 1
sys/src/9/port/tcklock.c

@@ -117,7 +117,7 @@ lockloop(Lock *l, uintptr_t pc)
 	Proc *p;
 
 	p = l->p;
-	print("lock %#p loop key %#ux pc %#p held by pc %#p proc %d\n",
+	print("lock %#p loop key %#x pc %#p held by pc %#p proc %d\n",
 		l, l->key, pc, l->pc, p ? p->pid : 0);
 	dumpaproc(up);
 	if(p != nil)

+ 20 - 20
sys/src/9/port/usbehci.c

@@ -404,7 +404,7 @@ ehcirun(Ctlr *ctlr, int on)
 	if(i == 100)
 		print("ehci %#p %s cmd timed out\n",
 			ctlr->capio, on ? "run" : "halt");
-	ddprint("ehci %#p cmd %#lux sts %#lux\n",
+	ddprint("ehci %#p cmd %#lx sts %#lx\n",
 		ctlr->capio, opio->cmd, opio->sts);
 }
 
@@ -882,7 +882,7 @@ seprintitd(char *s, char *se, Itd *td)
 	}
 	s = seprint(s, se, "\tbuffs:");
 	for(i = 0; i < nelem(td->buffer); i++)
-		s = seprint(s, se, " %#lux", td->buffer[i] >> 12);
+		s = seprint(s, se, " %#lx", td->buffer[i] >> 12);
 	return seprint(s, se, "\n");
 }
 
@@ -921,11 +921,11 @@ seprintsitd(char *s, char *se, Sitd *td)
 	ss = (td->csw & Stddcs) ? 'c' : 's';
 	pg = (td->csw & Stdpg) ? '1' : '0';
 	s = seprint(s, se, "\t%s %cs pg%c", flags, ss, pg);
-	s = seprint(s, se, " b0 %#lux b1 %#lux off %lu\n",
+	s = seprint(s, se, " b0 %#lx b1 %#lx off %lu\n",
 		td->buffer[0] >> 12, td->buffer[1] >> 12, td->buffer[0] & 0xfff);
 	s = seprint(s, se, "\ttpos %c tcnt %lu",
 		pc[(td->buffer[0]>>3)&3], td->buffer[1] & 7);
-	s = seprint(s, se, " ssm %#lux csm %#lux cspm %#lux",
+	s = seprint(s, se, " ssm %#lx csm %#lx cspm %#lx",
 		td->mfs & 0xff, (td->mfs>>8) & 0xff, (td->csw>>8) & 0xff);
 	s = seprintlink(s, se, " link", td->link, 1);
 	s = seprintlink(s, se, " blink", td->blink, 0);
@@ -984,11 +984,11 @@ seprinttd(char *s, char *se, Td *td, char *tag)
 	ss = (td->csw & Tddcs) ? 'c' : 's';
 	s = seprint(s, se, "\n\td%c %s %cs", t, flags, ss);
 	s = seprint(s, se, " max %lu", maxtdlen(td));
-	s = seprint(s, se, " pg %lu off %#lux\n",
+	s = seprint(s, se, " pg %lu off %#lx\n",
 		(td->csw >> Tdpgshift) & Tdpgmask, td->buffer[0] & 0xFFF);
 	s = seprint(s, se, "\tbuffs:");
 	for(i = 0; i < nelem(td->buffer); i++)
-		s = seprint(s, se, " %#lux", td->buffer[i]>>12);
+		s = seprint(s, se, " %#lx", td->buffer[i]>>12);
 	if(td->data != nil)
 		s = seprintdata(s, se, td->data, td->ndata);
 	return seprint(s, se, "\n");
@@ -1036,7 +1036,7 @@ qhdump(Qh *qh)
 	s = seprint(s, se, " hub %lu", (qh->eps1 >> 16) & 0x7f);
 	s = seprint(s, se, " port %lu", (qh->eps1 >> 23) & 0x7f);
 	s = seprintlink(s, se, " link", qh->link, 1);
-	seprint(s, se, "  clink %#lux", qh->tclink);
+	seprint(s, se, "  clink %#lx", qh->tclink);
 	print("%s\n", buf);
 	s = seprint(buf, se, "\tnrld %lu", (qh->eps0 >> Qhrlcshift) & Qhrlcmask);
 	s = seprint(s, se, " nak %lu", (qh->alink >> 1) & 0xf);
@@ -1051,7 +1051,7 @@ qhdump(Qh *qh)
 		s = seprint(s, se, "i");
 	s = seprint(s, se, " %s", speed[(qh->eps0 >> 12) & 3]);
 	s = seprint(s, se, " mult %lu", (qh->eps1 >> Qhmultshift) & Qhmultmask);
-	seprint(s, se, " scm %#lux ism %#lux\n",
+	seprint(s, se, " scm %#lx ism %#lx\n",
 		(qh->eps1 >> 8 & 0xff), qh->eps1 & 0xff);
 	print("%s\n", buf);
 	memset(&td, 0, sizeof(td));
@@ -1138,14 +1138,14 @@ dump(Hci *hp)
 		ctlr->capio, ctlr->frames, ctlr->nframes,
 		ctlr->nintr, ctlr->ntdintr);
 	print(" nqhintr %d nisointr %d\n", ctlr->nqhintr, ctlr->nisointr);
-	print("\tcmd %#lux sts %#lux intr %#lux frno %lu",
+	print("\tcmd %#lx sts %#lx intr %#lx frno %lu",
 		opio->cmd, opio->sts, opio->intr, opio->frno);
-	print(" base %#lux link %#lux fr0 %#lux\n",
+	print(" base %#lx link %#lx fr0 %#lx\n",
 		opio->frbase, opio->link, ctlr->frames[0]);
 	se = buf+sizeof(buf);
 	s = seprint(buf, se, "\t");
 	for(i = 0; i < hp->nports; i++){
-		s = seprint(s, se, "p%d %#lux ", i, opio->portsc[i]);
+		s = seprint(s, se, "p%d %#lx ", i, opio->portsc[i]);
 		if(hp->nports > 4 && i == hp->nports/2 - 1)
 			s = seprint(s, se, "\n\t");
 	}
@@ -1348,7 +1348,7 @@ isohsinterrupt(Ctlr *ctlr, Isoio *iso)
 		else if(iso->nerrs++ > iso->nframes/2){
 			if(iso->err == nil){
 				iso->err = ierrmsg(err);
-				diprint("isohsintr: tdi %#p error %#ux %s\n",
+				diprint("isohsintr: tdi %#p error %#x %s\n",
 					tdi, err, iso->err);
 				diprint("ctlr load %lu\n", ctlr->load);
 			}
@@ -1413,7 +1413,7 @@ isofsinterrupt(Ctlr *ctlr, Isoio *iso)
 		}else if(iso->nerrs++ > iso->nframes/2){
 			if(iso->err == nil){
 				iso->err = serrmsg(err);
-				diprint("isofsintr: tdi %#p error %#ux %s\n",
+				diprint("isofsintr: tdi %#p error %#x %s\n",
 					stdi, err, iso->err);
 				diprint("ctlr load %lu\n", ctlr->load);
 			}
@@ -1466,7 +1466,7 @@ qhinterrupt(Ctlr *ctlr, Qh *qh)
 		if(err != 0){
 			if(qh->io->err == nil){
 				qh->io->err = errmsg(err);
-				dqprint("qhintr: td %#p csw %#lux error %#ux %s\n",
+				dqprint("qhintr: td %#p csw %#lx error %#x %s\n",
 					td, td->csw, err, qh->io->err);
 			}
 			break;
@@ -1539,7 +1539,7 @@ ehciintr(Hci *hp)
 				ctlr->nintr, ctlr->ntdintr);
 			print(" nqhintr %d nisointr %d\n",
 				ctlr->nqhintr, ctlr->nisointr);
-			print("\tcmd %#lux sts %#lux intr %#lux frno %lu",
+			print("\tcmd %#lx sts %#lx intr %#lx frno %lu",
 				opio->cmd, opio->sts, opio->intr, opio->frno);
 		}
 
@@ -1610,7 +1610,7 @@ portenable(Hci *hp, int port, int on)
 	microdelay(64);
 	iunlock(&ctlr->l);
 	tsleep(&up->sleep, return0, 0, Enabledelay);
-	dprint("ehci %#p port %d enable=%d: sts %#lux\n",
+	dprint("ehci %#p port %d enable=%d: sts %#lx\n",
 		ctlr->capio, port, on, opio->portsc[port-1]);
 	qunlock(&ctlr->portlck);
 	poperror();
@@ -1661,7 +1661,7 @@ portreset(Hci *hp, int port, int on)
 		nexterror();
 	}
 	portscp = &opio->portsc[port-1];
-	dprint("ehci %#p port %d reset; sts %#lux\n", ctlr->capio, port, *portscp);
+	dprint("ehci %#p port %d reset; sts %#lx\n", ctlr->capio, port, *portscp);
 	ilock(&ctlr->l);
 	/* Shalted must be zero, else Psreset will stay set */
 	if (opio->sts & Shalted)
@@ -1677,7 +1677,7 @@ portreset(Hci *hp, int port, int on)
 	for(i = 0; *portscp & Psreset && i < 50; i++)
 		delay(10);
 	if (*portscp & Psreset)
-		iprint("ehci %#p: port %d didn't reset within %d ms; sts %#lux\n",
+		iprint("ehci %#p: port %d didn't reset within %d ms; sts %#lx\n",
 			ctlr->capio, port, i * 10, *portscp);
 	*portscp &= ~Psreset;		/* force appearance of reset done */
 	coherence();
@@ -1687,7 +1687,7 @@ portreset(Hci *hp, int port, int on)
 		portlend(ctlr, port, "full");
 
 	iunlock(&ctlr->l);
-	dprint("ehci %#p after port %d reset; sts %#lux\n",
+	dprint("ehci %#p after port %d reset; sts %#lx\n",
 		ctlr->capio, port, *portscp);
 	qunlock(&ctlr->portlck);
 	poperror();
@@ -3189,7 +3189,7 @@ ehcimeminit(Ctlr *ctlr)
 	mkqhtree(ctlr);			/* init sync list */
 	edfree(edalloc());		/* try to get some ones pre-allocated */
 
-	dprint("ehci %#p flb %#lux frno %#lux\n",
+	dprint("ehci %#p flb %#lx frno %#lx\n",
 		ctlr->capio, opio->frbase, opio->frno);
 
 	print("sizeof(Itd) %d\n", sizeof(Itd));

+ 3 - 3
sys/src/cmd/aux/vga/main.c

@@ -54,7 +54,7 @@ resyncinit(Vga* vga, Ctlr* ctlr, uint32_t on, uint32_t off)
 {
 	Ctlr *link;
 
-	trace("%s->resyncinit on 0x%8.8luX off 0x%8.8luX\n",
+	trace("%s->resyncinit on 0x%8.8lX off 0x%8.8lX\n",
 		ctlr->name, on, off);
 
 	for(link = vga->link; link; link = link->link){
@@ -66,7 +66,7 @@ resyncinit(Vga* vga, Ctlr* ctlr, uint32_t on, uint32_t off)
 		if(link->init == 0 || (link->flag & Finit) == 0)
 			continue;
 		link->flag &= ~Finit;
-		trace("%s->init 0x%8.8luX\n", link->name, link->flag);
+		trace("%s->init 0x%8.8lX\n", link->name, link->flag);
 		(*link->init)(vga, link);
 	}
 }
@@ -425,7 +425,7 @@ main(int argc, char** argv)
 			if(vga->vesa)
 				vgactlw("type", vtype);
 
-			sprint(buf, "%lx%lx%d %s",
+			sprint(buf, "%lux%lux%d %s",
 				vga->virtx, vga->virty,
 				vga->mode->z, vga->mode->chan);
 			if(rflag){

+ 1 - 1
sys/src/cmd/aux/vga/vesa.c

@@ -365,7 +365,7 @@ vbecall(Vbe *vbe, Ureg *u)
 	if(pread(vbe->memfd, vbe->buf, PageSize, RealModeBuf) != PageSize)
 		error("read /dev/realmodemem: %r\n");
 	if((u->ax&0xFFFF) != 0x004F){
-		werrstr("VBE error %#.4lux", u->ax&0xFFFF);
+		werrstr("VBE error %#.4lx", u->ax&0xFFFF);
 		return -1;
 	}
 	memset(vbe->isvalid, 0, MemSize/PageSize);

+ 3 - 3
sys/src/cmd/aux/vga/vga.c

@@ -472,14 +472,14 @@ dump(Vga* vga, Ctlr* ctlr)
 
 	if(vga->vma || vga->vmb){
 		printitem(ctlr->name, "vm a b");
-		Bprint(&stdout, "%9lud %8lud\n", vga->vma, vga->vmb);
+		Bprint(&stdout, "%9lu %8lu\n", vga->vma, vga->vmb);
 	}
 	if(vga->vmz){
 		printitem(ctlr->name, "vmz");
-		Bprint(&stdout, "%9lud\n", vga->vmz);
+		Bprint(&stdout, "%9lu\n", vga->vmz);
 	}
 	printitem(ctlr->name, "apz");
-	Bprint(&stdout, "%9lud\n", vga->apz);
+	Bprint(&stdout, "%9lu\n", vga->apz);
 
 	printitem(ctlr->name, "linear");
 	Bprint(&stdout, "%9d\n", vga->linear);

+ 2 - 2
sys/src/cmd/aux/vga/vmware.c

@@ -250,7 +250,7 @@ load(Vga* vga, Ctlr *ctlr)
 	x = vmrd(vm, Rbpl)/(vm->depth/8);
 	if(x != vga->mode->x){
 		vga->virtx = x;
-		sprint(buf, "%lx%lx%d %s", vga->virtx, vga->virty,
+		sprint(buf, "%lux%lux%d %s", vga->virtx, vga->virty,
 			vga->mode->z, vga->mode->chan);
 		vgactlw("size", buf);
 	}
@@ -267,7 +267,7 @@ dump(Vga* vga, Ctlr* ctlr)
 
 	for(i=0; i<Nreg; i++){
 		printitem(ctlr->name, rname[i]);
-		Bprint(&stdout, " %.8lux\n", vm->r[i]);
+		Bprint(&stdout, " %.8lx\n", vm->r[i]);
 	}
 
 	printitem(ctlr->name, "chan");