PERFORCE change 30909 for review

Peter Wemm peter at FreeBSD.org
Fri May 9 22:14:35 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=30909

Change 30909 by peter at peter_hammer on 2003/05/09 22:13:40

	Umm, fix things to work with the system compiler....

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/critical.c#6 edit
.. //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#6 edit
.. //depot/projects/hammer/sys/amd64/amd64/exception.S#4 edit
.. //depot/projects/hammer/sys/amd64/amd64/machdep.c#16 edit
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#6 edit
.. //depot/projects/hammer/sys/amd64/amd64/support.S#4 edit
.. //depot/projects/hammer/sys/amd64/amd64/trap.c#9 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/critical.c#6 (text+ko) ====


==== //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#6 (text+ko) ====

@@ -170,7 +170,7 @@
 			break;
 
 		default:
-			printf("kldload: unexpected relocation type %d\n",
+			printf("kldload: unexpected relocation type %ld\n",
 			       rtype);
 			return -1;
 	}

==== //depot/projects/hammer/sys/amd64/amd64/exception.S#4 (text+ko) ====

@@ -199,7 +199,7 @@
  * XXX The PCPU stuff is stubbed out right now...
  */
 IDTVEC(fast_syscall)
-	#swapgs
+	/* swapgs */
 	movq	%rsp,PCPU(SCRATCH_RSP)
 	movq	common_tss+COMMON_TSS_RSP0,%rsp
 	/* Now emulate a trapframe. Ugh. */
@@ -255,7 +255,7 @@
 	movq	TF_RIP(%rsp),%rcx	/* original %rip */
 	movq	TF_RSP(%rsp),%r9	/* user stack pointer */
 	movq	%r9,%rsp		/* original %rsp */
-	#swapgs
+	/* swapgs */
 	sysretq
 3:	/* Requested full context restore, use doreti for that */
 	andq	$~PCB_FULLCTX,PCB_FLAGS(%rax)

==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#16 (text+ko) ====

@@ -352,7 +352,7 @@
 	 * one less debugger trap, so allowing it is fairly harmless.
 	 */
 	if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) {
-		printf("sigreturn: rflags = 0x%x\n", rflags);
+		printf("sigreturn: rflags = 0x%lx\n", rflags);
 		return (EINVAL);
 	}
 

==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#6 (text+ko) ====

@@ -1797,8 +1797,8 @@
 	 * Page Directory table entry not valid, we need a new PT page
 	 */
 	if (pte == NULL) {
-		panic("pmap_enter: invalid page directory pdir=%#jx, va=%#x\n",
-			(uintmax_t)pmap->pm_pdir[PTDPTDI], va);
+		panic("pmap_enter: invalid page directory pdir=%#lx, va=%#lx\n",
+			pmap->pm_pdir[PTDPTDI], va);
 	}
 
 	pa = VM_PAGE_TO_PHYS(m) & PG_FRAME;
@@ -1869,7 +1869,7 @@
 		err = pmap_remove_pte(pmap, pte, va);
 		vm_page_unlock_queues();
 		if (err)
-			panic("pmap_enter: pte vanished, va: 0x%x", va);
+			panic("pmap_enter: pte vanished, va: 0x%lx", va);
 	}
 
 	/*
@@ -2563,7 +2563,7 @@
 		tpte = *pte;
 
 		if (tpte == 0) {
-			printf("TPTE at %p  IS ZERO @ VA %08x\n",
+			printf("TPTE at %p  IS ZERO @ VA %08lx\n",
 							pte, pv->pv_va);
 			panic("bad pte");
 		}

==== //depot/projects/hammer/sys/amd64/amd64/support.S#4 (text+ko) ====

@@ -366,7 +366,7 @@
 	cmpq	%rax,%rdi			/* verify address is valid */
 	ja	fusufault
 
-# XXX use the 64 extend
+/* XXX use the 64 extend */
 	xorq	%rax, %rax
 	movl	(%rdi),%eax
 	movq	$0,PCB_ONFAULT(%rcx)
@@ -397,7 +397,7 @@
 	cmpq	%rax,%rdi
 	ja	fusufault
 
-# XXX use the 64 extend
+/* XXX use the 64 extend */
 	xorq	%rax, %rax
 	movzwl	(%rdi),%eax
 	movq	$0,PCB_ONFAULT(%rcx)
@@ -414,7 +414,7 @@
 	cmpq	%rax,%rdi
 	ja	fusufault
 
-# XXX use the 64 extend
+/* XXX use the 64 extend */
 	xorq	%rax, %rax
 	movzbl	(%rdi),%eax
 	movq	$0,PCB_ONFAULT(%rcx)

==== //depot/projects/hammer/sys/amd64/amd64/trap.c#9 (text+ko) ====

@@ -555,7 +555,7 @@
 			frame->tf_err & PGEX_U ? "user" : "supervisor",
 			frame->tf_err & PGEX_W ? "write" : "read",
 			frame->tf_err & PGEX_P ? "protection violation" : "page not present",
-eva, frame->tf_rip, frame->tf_rax, frame->tf_rbx, frame->tf_rcx, frame->tf_rdx, frame->tf_rsp, frame->tf_rbp, frame->tf_rsi, frame->tf_rdi);
+(void *)eva, (void *)frame->tf_rip, (void *)frame->tf_rax, (void *)frame->tf_rbx, (void *)frame->tf_rcx, (void *)frame->tf_rdx, (void *)frame->tf_rsp, (void *)frame->tf_rbp, (void *)frame->tf_rsi, (void *)frame->tf_rdi);
 	/* kludge to pass faulting virtual address to sendsig */
 	frame->tf_err = eva;
 
@@ -579,13 +579,13 @@
 			type, trap_msg[type],
 			ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel");
 	if (type == T_PAGEFLT) {
-		printf("fault virtual address	= 0x%x\n", eva);
+		printf("fault virtual address	= 0x%lx\n", eva);
 		printf("fault code		= %s %s, %s\n",
 			code & PGEX_U ? "user" : "supervisor",
 			code & PGEX_W ? "write" : "read",
 			code & PGEX_P ? "protection violation" : "page not present");
 	}
-	printf("instruction pointer	= 0x%x:0x%x\n",
+	printf("instruction pointer	= 0x%lx:0x%lx\n",
 	       frame->tf_cs & 0xffff, frame->tf_rip);
         if (ISPL(frame->tf_cs) == SEL_UPL) {
 		ss = frame->tf_ss & 0xffff;
@@ -595,8 +595,8 @@
 		esp = (long)&frame->tf_rsp;
 	}
 	printf("stack pointer	        = 0x%x:0x%x\n", ss, esp);
-	printf("frame pointer	        = 0x%x:0x%x\n", ss, frame->tf_rbp);
-	printf("code segment		= base 0x%x, limit 0x%x, type 0x%x\n",
+	printf("frame pointer	        = 0x%x:0x%lx\n", ss, frame->tf_rbp);
+	printf("code segment		= base 0x%lx, limit 0x%lx, type 0x%x\n",
 	       softseg.ssd_base, softseg.ssd_limit, softseg.ssd_type);
 	printf("			= DPL %d, pres %d, long %d, def32 %d, gran %d\n",
 	       softseg.ssd_dpl, softseg.ssd_p, softseg.ssd_long, softseg.ssd_def32,
@@ -610,7 +610,7 @@
 		printf("nested task, ");
 	if (frame->tf_rflags & PSL_RF)
 		printf("resume, ");
-	printf("IOPL = %d\n", (frame->tf_rflags & PSL_IOPL) >> 12);
+	printf("IOPL = %ld\n", (frame->tf_rflags & PSL_IOPL) >> 12);
 	printf("current process		= ");
 	if (curproc) {
 		printf("%lu (%s)\n",


More information about the p4-projects mailing list