Date: Fri, 6 Feb 2009 20:57:10 +0000 (UTC) From: "Wojciech A. Koszek" <wkoszek@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188247 - in head/sys: amd64/conf conf dev/agp i386/conf pc98/conf Message-ID: <200902062057.n16KvA98071296@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wkoszek Date: Fri Feb 6 20:57:10 2009 New Revision: 188247 URL: http://svn.freebsd.org/changeset/base/188247 Log: Fix AGP debugging code: - correct format strings - fill opt_agp.h if AGP_DEBUG is defined - bring AGP_DEBUG to LINT by mentioning it in NOTES This should hopefully fix a warning that was... Found by: Coverity Prevent(tm) CID: 3676 Tested on: amd64, i386 Modified: head/sys/amd64/conf/NOTES head/sys/conf/options.amd64 head/sys/conf/options.i386 head/sys/conf/options.pc98 head/sys/dev/agp/agp.c head/sys/i386/conf/NOTES head/sys/pc98/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Feb 6 20:41:30 2009 (r188246) +++ head/sys/amd64/conf/NOTES Fri Feb 6 20:57:10 2009 (r188247) @@ -150,6 +150,11 @@ device pci # AGP GART support device agp +# +# AGP debugging. +# +options AGP_DEBUG + ##################################################################### # HARDWARE DEVICE CONFIGURATION Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Fri Feb 6 20:41:30 2009 (r188246) +++ head/sys/conf/options.amd64 Fri Feb 6 20:57:10 2009 (r188247) @@ -37,6 +37,9 @@ VGA_NO_MODE_CHANGE opt_vga.h VGA_SLOW_IOACCESS opt_vga.h VGA_WIDTH90 opt_vga.h +# AGP debugging support +AGP_DEBUG opt_agp.h + ATKBD_DFLT_KEYMAP opt_atkbd.h # ------------------------------- Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Fri Feb 6 20:41:30 2009 (r188246) +++ head/sys/conf/options.i386 Fri Feb 6 20:57:10 2009 (r188247) @@ -88,6 +88,9 @@ VGA_WIDTH90 opt_vga.h VESA VESA_DEBUG opt_vesa.h +# AGP debugging support +AGP_DEBUG opt_agp.h + PSM_DEBUG opt_psm.h PSM_HOOKRESUME opt_psm.h PSM_RESETAFTERSUSPEND opt_psm.h Modified: head/sys/conf/options.pc98 ============================================================================== --- head/sys/conf/options.pc98 Fri Feb 6 20:41:30 2009 (r188246) +++ head/sys/conf/options.pc98 Fri Feb 6 20:57:10 2009 (r188247) @@ -96,6 +96,7 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h STOP_NMI opt_cpu.h +AGP_DEBUG opt_agp.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Fri Feb 6 20:41:30 2009 (r188246) +++ head/sys/dev/agp/agp.c Fri Feb 6 20:57:10 2009 (r188247) @@ -27,6 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_agp.h" #include "opt_bus.h" #include <sys/param.h> @@ -554,7 +555,7 @@ agp_generic_bind_memory(device_t dev, st */ m = vm_page_grab(mem->am_obj, OFF_TO_IDX(i), VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY); - AGP_DPF("found page pa=%#x\n", VM_PAGE_TO_PHYS(m)); + AGP_DPF("found page pa=%#jx\n", (uintmax_t)VM_PAGE_TO_PHYS(m)); } VM_OBJECT_UNLOCK(mem->am_obj); @@ -585,8 +586,8 @@ agp_generic_bind_memory(device_t dev, st for (j = 0; j < PAGE_SIZE && i + j < mem->am_size; j += AGP_PAGE_SIZE) { vm_offset_t pa = VM_PAGE_TO_PHYS(m) + j; - AGP_DPF("binding offset %#x to pa %#x\n", - offset + i + j, pa); + AGP_DPF("binding offset %#jx to pa %#jx\n", + (uintmax_t)offset + i + j, (uintmax_t)pa); error = AGP_BIND_PAGE(dev, offset + i + j, pa); if (error) { /* Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Fri Feb 6 20:41:30 2009 (r188246) +++ head/sys/i386/conf/NOTES Fri Feb 6 20:57:10 2009 (r188247) @@ -347,6 +347,9 @@ device pci # AGP GART support device agp +# AGP debugging. +options AGP_DEBUG + ##################################################################### # HARDWARE DEVICE CONFIGURATION Modified: head/sys/pc98/conf/NOTES ============================================================================== --- head/sys/pc98/conf/NOTES Fri Feb 6 20:41:30 2009 (r188246) +++ head/sys/pc98/conf/NOTES Fri Feb 6 20:57:10 2009 (r188247) @@ -288,6 +288,9 @@ device pci # AGP GART support device agp +# AGP debugging. +options AGP_DEBUG + ##################################################################### # HARDWARE DEVICE CONFIGURATION
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902062057.n16KvA98071296>