Commit 9a9bfbcf authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by David Mosberger

[PATCH] ia64: trivial sba_iommu patch

I'm aligning the 2.4 and 2.5 versions of arch/ia64/hp/common/sba_iommu.c
and found a couple nits in the 2.5 version.  No functional change, just
whitespace, comment, and parameter name changes (and I made
one function static).
parent 92add1dc
...@@ -962,20 +962,20 @@ void sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, int dir) ...@@ -962,20 +962,20 @@ void sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, int dir)
/** /**
* sba_alloc_consistent - allocate/map shared mem for DMA * sba_alloc_coherent - allocate/map shared mem for DMA
* @hwdev: instance of PCI owned by the driver that's asking. * @dev: instance of PCI owned by the driver that's asking.
* @size: number of bytes mapped in driver buffer. * @size: number of bytes mapped in driver buffer.
* @dma_handle: IOVA of new buffer. * @dma_handle: IOVA of new buffer.
* *
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
void * void *
sba_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handle, int flags) sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, int flags)
{ {
struct ioc *ioc; struct ioc *ioc;
void *addr; void *addr;
addr = (void *) __get_free_pages(flags, get_order(size)); addr = (void *) __get_free_pages(flags, get_order(size));
if (!addr) if (!addr)
return NULL; return NULL;
...@@ -983,7 +983,7 @@ sba_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handle, i ...@@ -983,7 +983,7 @@ sba_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handle, i
* REVISIT: if sba_map_single starts needing more than dma_mask from the * REVISIT: if sba_map_single starts needing more than dma_mask from the
* device, this needs to be updated. * device, this needs to be updated.
*/ */
ioc = GET_IOC(hwdev); ioc = GET_IOC(dev);
ASSERT(ioc); ASSERT(ioc);
*dma_handle = sba_map_single(&ioc->sac_only_dev->dev, addr, size, 0); *dma_handle = sba_map_single(&ioc->sac_only_dev->dev, addr, size, 0);
...@@ -993,17 +993,17 @@ sba_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handle, i ...@@ -993,17 +993,17 @@ sba_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handle, i
/** /**
* sba_free_consistent - free/unmap shared mem for DMA * sba_free_coherent - free/unmap shared mem for DMA
* @hwdev: instance of PCI owned by the driver that's asking. * @dev: instance of PCI owned by the driver that's asking.
* @size: number of bytes mapped in driver buffer. * @size: number of bytes mapped in driver buffer.
* @vaddr: virtual address IOVA of "consistent" buffer. * @vaddr: virtual address IOVA of "consistent" buffer.
* @dma_handler: IO virtual address of "consistent" buffer. * @dma_handler: IO virtual address of "consistent" buffer.
* *
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
void sba_free_coherent (struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) void sba_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
{ {
sba_unmap_single(hwdev, dma_handle, size, 0); sba_unmap_single(dev, dma_handle, size, 0);
free_pages((unsigned long) vaddr, get_order(size)); free_pages((unsigned long) vaddr, get_order(size));
} }
...@@ -1763,7 +1763,7 @@ ioc_show(struct seq_file *s, void *v) ...@@ -1763,7 +1763,7 @@ ioc_show(struct seq_file *s, void *v)
if (ioc->avg_search[i] > max) max = ioc->avg_search[i]; if (ioc->avg_search[i] > max) max = ioc->avg_search[i];
if (ioc->avg_search[i] < min) min = ioc->avg_search[i]; if (ioc->avg_search[i] < min) min = ioc->avg_search[i];
} }
avg /= SBA_SEARCH_SAMPLE; avg /= SBA_SEARCH_SAMPLE;
seq_printf(s, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", min, avg, max); seq_printf(s, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", min, avg, max);
seq_printf(s, "pci_map_single(): %12ld calls %12ld pages (avg %d/1000)\n", seq_printf(s, "pci_map_single(): %12ld calls %12ld pages (avg %d/1000)\n",
...@@ -1864,7 +1864,7 @@ ioc_proc_init(void) ...@@ -1864,7 +1864,7 @@ ioc_proc_init(void)
} }
#endif #endif
void static void
sba_connect_bus(struct pci_bus *bus) sba_connect_bus(struct pci_bus *bus)
{ {
acpi_handle handle, parent; acpi_handle handle, parent;
...@@ -1872,7 +1872,7 @@ sba_connect_bus(struct pci_bus *bus) ...@@ -1872,7 +1872,7 @@ sba_connect_bus(struct pci_bus *bus)
struct ioc *ioc; struct ioc *ioc;
if (!PCI_CONTROLLER(bus)) if (!PCI_CONTROLLER(bus))
panic(PFX "no sysdata on bus %d!\n",bus->number); panic(PFX "no sysdata on bus %d!\n", bus->number);
if (PCI_CONTROLLER(bus)->iommu) if (PCI_CONTROLLER(bus)->iommu)
return; return;
......
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