Diff for /src/sys/i386/i386/Attic/busdma_machdep.c between versions 1.8 and 1.9

version 1.8, 2004/04/02 18:16:45 version 1.9, 2004/04/19 13:37:43
Line 349  bus_dmamem_alloc(bus_dma_tag_t dmat, voi Line 349  bus_dmamem_alloc(bus_dma_tag_t dmat, voi
         if ((dmat->maxsize <= PAGE_SIZE) &&          if ((dmat->maxsize <= PAGE_SIZE) &&
             dmat->lowaddr >= ptoa(Maxmem)) {              dmat->lowaddr >= ptoa(Maxmem)) {
                 *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags);                  *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags);
                   /*
                    * XXX Check wether the allocation crossed a page boundary
                    * and retry with power-of-2 alignment in that case.
                    */
                   if ((((intptr_t)*vaddr) & PAGE_MASK) !=
                       (((intptr_t)*vaddr + dmat->maxsize) & PAGE_MASK)) {
                           size_t size;
                           free(*vaddr, M_DEVBUF);
                           /* XXX check for overflow? */
                           for (size = 1; size <= dmat->maxsize; size <<= 1)
                                   ;
                           *vaddr = malloc(size, M_DEVBUF, mflags);
                   }
         } else {          } else {
                 /*                  /*
                  * XXX Use Contigmalloc until it is merged into this facility                   * XXX Use Contigmalloc until it is merged into this facility

Removed from v.1.8  
changed lines
  Added in v.1.9