busdma: Put alignment/boundary check failure under bootverbose
authorThomas Nikolajsen <thomas@dragonflybsd.org>
Wed, 11 Nov 2009 19:50:36 +0000 (20:50 +0100)
committerThomas Nikolajsen <thomas@dragonflybsd.org>
Sat, 14 Nov 2009 16:11:40 +0000 (17:11 +0100)
Handle pc64 and vkernel platforms like pc32 was done in
e94a9b8c37942b871eb5b23f0643bce535926862

sys/platform/pc64/x86_64/busdma_machdep.c
sys/platform/vkernel/platform/busdma_machdep.c

index 47292af..0ee2246 100644 (file)
@@ -488,13 +488,15 @@ check_kmalloc(bus_dma_tag_t dmat, const void *vaddr0, int verify)
        uintptr_t vaddr = (uintptr_t)vaddr0;
 
        if ((vaddr ^ (vaddr + dmat->maxsize - 1)) & ~PAGE_MASK) {
-               kprintf("boundary check failed\n");
+               if (verify || bootverbose)
+                       kprintf("boundary check failed\n");
                if (verify)
                        print_backtrace(); /* XXX panic */
                maxsize = dmat->maxsize;
        }
        if (vaddr & (dmat->alignment - 1)) {
-               kprintf("alignment check failed\n");
+               if (verify || bootverbose)
+                       kprintf("alignment check failed\n");
                if (verify)
                        print_backtrace(); /* XXX panic */
                if (dmat->maxsize < dmat->alignment)
index eebd17a..92f6797 100644 (file)
@@ -447,13 +447,15 @@ check_kmalloc(bus_dma_tag_t dmat, const void *vaddr0, int verify)
        uintptr_t vaddr = (uintptr_t)vaddr0;
 
        if ((vaddr ^ (vaddr + dmat->maxsize - 1)) & ~PAGE_MASK) {
-               kprintf("boundary check failed\n");
+               if (verify || bootverbose)
+                       kprintf("boundary check failed\n");
                if (verify)
                        print_backtrace(); /* XXX panic */
                maxsize = dmat->maxsize;
        }
        if (vaddr & (dmat->alignment - 1)) {
-               kprintf("alignment check failed\n");
+               if (verify || bootverbose)
+                       kprintf("alignment check failed\n");
                if (verify)
                        print_backtrace(); /* XXX panic */
                if (dmat->maxsize < dmat->alignment)