Commit e4af63aa authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] ia64: simplify and speedup SN2 dma mapping

Currently the the SN2 dma mapping code uses a file systen lookup (cat /r/napali/tmp/p10 |diffstat -p1) to
find the operation vector for the underlying dma mapping implementation.

But not only there is exactly one of those implementation, also data
structures from this lowlevel driver are used in the actual Linux dma
mapping routines and quite a few assumption are made about it.  So let's
just call directly in the lowlevel code and give up this utter bullshit.
parent 158f8511
......@@ -700,12 +700,12 @@ pci_bus_map_create(vertex_hdl_t xtalk, char * io_moduleid)
* Pre assign DMA maps needed for 32 Bits Page Map DMA.
*/
busnum_to_atedmamaps[num_bridges - 1] = (void *) kmalloc(
sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS, GFP_KERNEL);
sizeof(struct pcibr_dmamap_s) * MAX_ATE_MAPS, GFP_KERNEL);
if (!busnum_to_atedmamaps[num_bridges - 1])
printk("WARNING: pci_bus_map_create: Unable to precreate ATE DMA Maps for busnum %d vertex 0x%p\n", num_bridges - 1, (void *)xwidget);
memset(busnum_to_atedmamaps[num_bridges - 1], 0x0,
sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS);
sizeof(struct pcibr_dmamap_s) * MAX_ATE_MAPS);
}
......@@ -764,12 +764,12 @@ pci_bus_map_create(vertex_hdl_t xtalk, char * io_moduleid)
* Pre assign DMA maps needed for 32 Bits Page Map DMA.
*/
busnum_to_atedmamaps[bus_number] = (void *) kmalloc(
sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS, GFP_KERNEL);
sizeof(struct pcibr_dmamap_s) * MAX_ATE_MAPS, GFP_KERNEL);
if (!busnum_to_atedmamaps[bus_number])
printk("WARNING: pci_bus_map_create: Unable to precreate ATE DMA Maps for busnum %d vertex 0x%p\n", num_bridges - 1, (void *)xwidget);
memset(busnum_to_atedmamaps[bus_number], 0x0,
sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS);
sizeof(struct pcibr_dmamap_s) * MAX_ATE_MAPS);
}
}
......
This diff is collapsed.
......@@ -139,6 +139,7 @@ struct pcibr_dmamap_s {
bridge_ate_p bd_ate_ptr; /* where to write first ATE */
bridge_ate_t bd_ate_proto; /* prototype ATE (for xioaddr=0) */
bridge_ate_t bd_ate_prime; /* value of 1st ATE written */
dma_addr_t bd_dma_addr; /* Linux dma handle */
};
#define IBUFSIZE 5 /* size of circular buffer (holds 4) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment