diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2009-02-06 20:57:10 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2009-02-06 20:57:10 +0000 |
commit | a6c32bcda69ac173bca8bf5063746f99b117342e (patch) | |
tree | eba026ab0ceef7e6ec312c142c5fb8fa59dbfa7e | |
parent | d33df07e4e0ecbe8d46a2bdcace8f213a1955177 (diff) | |
download | FreeBSD-src-a6c32bcda69ac173bca8bf5063746f99b117342e.zip FreeBSD-src-a6c32bcda69ac173bca8bf5063746f99b117342e.tar.gz |
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
-rw-r--r-- | sys/amd64/conf/NOTES | 5 | ||||
-rw-r--r-- | sys/conf/options.amd64 | 3 | ||||
-rw-r--r-- | sys/conf/options.i386 | 3 | ||||
-rw-r--r-- | sys/conf/options.pc98 | 1 | ||||
-rw-r--r-- | sys/dev/agp/agp.c | 7 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 3 | ||||
-rw-r--r-- | sys/pc98/conf/NOTES | 3 |
7 files changed, 22 insertions, 3 deletions
diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index a1cbfa4..08c1781 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -150,6 +150,11 @@ device pci # AGP GART support device agp +# +# AGP debugging. +# +options AGP_DEBUG + ##################################################################### # HARDWARE DEVICE CONFIGURATION diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index 9a5e7dd..1e69363 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -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 # ------------------------------- diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index aebd884..45a1637 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -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 diff --git a/sys/conf/options.pc98 b/sys/conf/options.pc98 index 4912c42..837169b 100644 --- a/sys/conf/options.pc98 +++ b/sys/conf/options.pc98 @@ -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 diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 6d749ef..1e61871 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -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, struct agp_memory *mem, */ 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, struct agp_memory *mem, 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) { /* diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 582784f..16e3636 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -347,6 +347,9 @@ device pci # AGP GART support device agp +# AGP debugging. +options AGP_DEBUG + ##################################################################### # HARDWARE DEVICE CONFIGURATION diff --git a/sys/pc98/conf/NOTES b/sys/pc98/conf/NOTES index e54fc15..b877dfe 100644 --- a/sys/pc98/conf/NOTES +++ b/sys/pc98/conf/NOTES @@ -288,6 +288,9 @@ device pci # AGP GART support device agp +# AGP debugging. +options AGP_DEBUG + ##################################################################### # HARDWARE DEVICE CONFIGURATION |