Subject: Re: CVS commit: src/sys (i386/i386/trap.c)
To: None <source-changes@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: source-changes
Date: 09/27/2007 01:26:38
Andrew Doran <ad@netbsd.org> typed:
: Module Name:	src
: Committed By:	ad
: Date:		Wed Sep 26 19:48:45 UTC 2007
:
: Modified Files:
[...]
: 	src/sys/arch/i386/i386: db_dbgreg.S db_interface.c genassym.cf
: 	    identcpu.c ipifuncs.c locore.S machdep.c mtrr_k6.c pmap.c pmc.c
: 	    powernow_k7.c trap.c
[...]
: Log Message:
: x86 changes for pcc and LKMs.
:
: - Replace most inline assembly with proper functions. As a side effect
:   this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
:   smaller amount. Nearly all of the inlines did something slow, or something
:   that does not need to be fast.
: - Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
:   In that case make them inlines. Makes curlwp LKM and preemption safe.
: - Make bus_space and bus_dma more LKM friendly.
: - Share a few more files between the ports.
: - Other minor changes.
[...]
: cvs rdiff -r1.219 -r1.220 src/sys/arch/i386/i386/trap.c
[...]


../../../../arch/i386/i386/trap.c: In function 'trap':
../../../../arch/i386/i386/trap.c:282: warning: format '%x' expects type 'unsigned int', but argument 7 has type 'vaddr_t'

The following matches the change further on (around line 335) made in 1.220

Regards,
Geoff

--- sys/arch/i386/i386/trap.c.org	2007-09-27 10:54:36.000000000 +1000
+++ sys/arch/i386/i386/trap.c	2007-09-27 11:25:00.000000000 +1000
@@ -277,9 +277,9 @@
 	}
 #ifdef DEBUG
 	if (trapdebug) {
-		printf("trap %d code %x eip %x cs %x eflags %x cr2 %x cpl %x\n",
+		printf("trap %d code %x eip %x cs %x eflags %x cr2 %lx cpl %x\n",
 		    frame->tf_trapno, frame->tf_err, frame->tf_eip, frame->tf_cs,
-		    frame->tf_eflags, rcr2(), curcpu()->ci_ilevel);
+		    frame->tf_eflags, (long)rcr2(), curcpu()->ci_ilevel);
 		printf("curlwp %p%s", curlwp, curlwp ? " " : "\n");
 		if (curlwp)
 			printf("pid %d lid %d\n", l->l_proc->p_pid, l->l_lid);