Diff for /src/sys/dev/agp/agp_amd.c between versions 1.4 and 1.5

version 1.4, 2003/12/09 19:40:56 version 1.5, 2004/03/24 20:42:12
Line 87  agp_amd_alloc_gatt(device_t dev) Line 87  agp_amd_alloc_gatt(device_t dev)
                               "allocating GATT for aperture of size %dM\n",                                "allocating GATT for aperture of size %dM\n",
                               apsize / (1024*1024));                                apsize / (1024*1024));
   
         gatt = malloc(sizeof(struct agp_amd_gatt), M_AGP, M_NOWAIT);          gatt = malloc(sizeof(struct agp_amd_gatt), M_AGP, M_INTWAIT);
         if (!gatt)  
                 return 0;  
   
         /*          /*
          * The AMD751 uses a page directory to map a non-contiguous           * The AMD751 uses a page directory to map a non-contiguous
Line 99  agp_amd_alloc_gatt(device_t dev) Line 97  agp_amd_alloc_gatt(device_t dev)
          */           */
         gatt->ag_entries = entries;          gatt->ag_entries = entries;
         gatt->ag_virtual = malloc(entries * sizeof(u_int32_t),          gatt->ag_virtual = malloc(entries * sizeof(u_int32_t),
                                   M_AGP, M_NOWAIT);                                    M_AGP, M_INTWAIT | M_ZERO);
         if (!gatt->ag_virtual) {  
                 if (bootverbose)  
                         device_printf(dev, "allocation failed\n");  
                 free(gatt, M_AGP);  
                 return 0;  
         }  
         bzero(gatt->ag_virtual, entries * sizeof(u_int32_t));  
   
         /*          /*
          * Allocate the page directory.           * Allocate the page directory.
          */           */
         gatt->ag_vdir = malloc(AGP_PAGE_SIZE, M_AGP, M_NOWAIT);          gatt->ag_vdir = malloc(AGP_PAGE_SIZE, M_AGP, M_INTWAIT | M_ZERO);
   
         if (!gatt->ag_vdir) {  
                 if (bootverbose)  
                         device_printf(dev,  
                                       "failed to allocate page directory\n");  
                 free(gatt->ag_virtual, M_AGP);  
                 free(gatt, M_AGP);  
                 return 0;  
         }  
         bzero(gatt->ag_vdir, AGP_PAGE_SIZE);  
         gatt->ag_pdir = vtophys((vm_offset_t) gatt->ag_vdir);          gatt->ag_pdir = vtophys((vm_offset_t) gatt->ag_vdir);
         if(bootverbose)          if(bootverbose)
                 device_printf(dev, "gatt -> ag_pdir %8x\n",                  device_printf(dev, "gatt -> ag_pdir %8x\n",

Removed from v.1.4  
changed lines
  Added in v.1.5