aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/ccio-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parisc/ccio-dma.c')
-rw-r--r--drivers/parisc/ccio-dma.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index 07d2a8d4498f..b30e38f3a50d 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -359,7 +359,7 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
359 BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE); 359 BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE);
360 360
361 DBG_RES("%s() size: %d pages_needed %d\n", 361 DBG_RES("%s() size: %d pages_needed %d\n",
362 __FUNCTION__, size, pages_needed); 362 __func__, size, pages_needed);
363 363
364 /* 364 /*
365 ** "seek and ye shall find"...praying never hurts either... 365 ** "seek and ye shall find"...praying never hurts either...
@@ -395,16 +395,16 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
395#endif 395#endif
396 } else { 396 } else {
397 panic("%s: %s() Too many pages to map. pages_needed: %u\n", 397 panic("%s: %s() Too many pages to map. pages_needed: %u\n",
398 __FILE__, __FUNCTION__, pages_needed); 398 __FILE__, __func__, pages_needed);
399 } 399 }
400 400
401 panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__, 401 panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__,
402 __FUNCTION__); 402 __func__);
403 403
404resource_found: 404resource_found:
405 405
406 DBG_RES("%s() res_idx %d res_hint: %d\n", 406 DBG_RES("%s() res_idx %d res_hint: %d\n",
407 __FUNCTION__, res_idx, ioc->res_hint); 407 __func__, res_idx, ioc->res_hint);
408 408
409#ifdef CCIO_SEARCH_TIME 409#ifdef CCIO_SEARCH_TIME
410 { 410 {
@@ -450,7 +450,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
450 BUG_ON(pages_mapped > BITS_PER_LONG); 450 BUG_ON(pages_mapped > BITS_PER_LONG);
451 451
452 DBG_RES("%s(): res_idx: %d pages_mapped %d\n", 452 DBG_RES("%s(): res_idx: %d pages_mapped %d\n",
453 __FUNCTION__, res_idx, pages_mapped); 453 __func__, res_idx, pages_mapped);
454 454
455#ifdef CCIO_MAP_STATS 455#ifdef CCIO_MAP_STATS
456 ioc->used_pages -= pages_mapped; 456 ioc->used_pages -= pages_mapped;
@@ -474,7 +474,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
474#endif 474#endif
475 } else { 475 } else {
476 panic("%s:%s() Too many pages to unmap.\n", __FILE__, 476 panic("%s:%s() Too many pages to unmap.\n", __FILE__,
477 __FUNCTION__); 477 __func__);
478 } 478 }
479} 479}
480 480
@@ -775,7 +775,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
775 pdir_start = &(ioc->pdir_base[idx]); 775 pdir_start = &(ioc->pdir_base[idx]);
776 776
777 DBG_RUN("%s() 0x%p -> 0x%lx size: %0x%x\n", 777 DBG_RUN("%s() 0x%p -> 0x%lx size: %0x%x\n",
778 __FUNCTION__, addr, (long)iovp | offset, size); 778 __func__, addr, (long)iovp | offset, size);
779 779
780 /* If not cacheline aligned, force SAFE_DMA on the whole mess */ 780 /* If not cacheline aligned, force SAFE_DMA on the whole mess */
781 if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES)) 781 if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES))
@@ -820,7 +820,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
820 ioc = GET_IOC(dev); 820 ioc = GET_IOC(dev);
821 821
822 DBG_RUN("%s() iovp 0x%lx/%x\n", 822 DBG_RUN("%s() iovp 0x%lx/%x\n",
823 __FUNCTION__, (long)iova, size); 823 __func__, (long)iova, size);
824 824
825 iova ^= offset; /* clear offset bits */ 825 iova ^= offset; /* clear offset bits */
826 size += offset; 826 size += offset;
@@ -922,7 +922,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
922 BUG_ON(!dev); 922 BUG_ON(!dev);
923 ioc = GET_IOC(dev); 923 ioc = GET_IOC(dev);
924 924
925 DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); 925 DBG_RUN_SG("%s() START %d entries\n", __func__, nents);
926 926
927 /* Fast path single entry scatterlists. */ 927 /* Fast path single entry scatterlists. */
928 if (nents == 1) { 928 if (nents == 1) {
@@ -966,7 +966,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
966 966
967 BUG_ON(coalesced != filled); 967 BUG_ON(coalesced != filled);
968 968
969 DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled); 969 DBG_RUN_SG("%s() DONE %d mappings\n", __func__, filled);
970 970
971 for (i = 0; i < filled; i++) 971 for (i = 0; i < filled; i++)
972 current_len += sg_dma_len(sglist + i); 972 current_len += sg_dma_len(sglist + i);
@@ -995,7 +995,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
995 ioc = GET_IOC(dev); 995 ioc = GET_IOC(dev);
996 996
997 DBG_RUN_SG("%s() START %d entries, %08lx,%x\n", 997 DBG_RUN_SG("%s() START %d entries, %08lx,%x\n",
998 __FUNCTION__, nents, sg_virt_addr(sglist), sglist->length); 998 __func__, nents, sg_virt_addr(sglist), sglist->length);
999 999
1000#ifdef CCIO_MAP_STATS 1000#ifdef CCIO_MAP_STATS
1001 ioc->usg_calls++; 1001 ioc->usg_calls++;
@@ -1011,7 +1011,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
1011 ++sglist; 1011 ++sglist;
1012 } 1012 }
1013 1013
1014 DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents); 1014 DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents);
1015} 1015}
1016 1016
1017static struct hppa_dma_ops ccio_ops = { 1017static struct hppa_dma_ops ccio_ops = {
@@ -1225,7 +1225,7 @@ static int
1225ccio_get_iotlb_size(struct parisc_device *dev) 1225ccio_get_iotlb_size(struct parisc_device *dev)
1226{ 1226{
1227 if (dev->spa_shift == 0) { 1227 if (dev->spa_shift == 0) {
1228 panic("%s() : Can't determine I/O TLB size.\n", __FUNCTION__); 1228 panic("%s() : Can't determine I/O TLB size.\n", __func__);
1229 } 1229 }
1230 return (1 << dev->spa_shift); 1230 return (1 << dev->spa_shift);
1231} 1231}
@@ -1315,7 +1315,7 @@ ccio_ioc_init(struct ioc *ioc)
1315 BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT)); 1315 BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT));
1316 1316
1317 DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n", 1317 DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n",
1318 __FUNCTION__, ioc->ioc_regs, 1318 __func__, ioc->ioc_regs,
1319 (unsigned long) num_physpages >> (20 - PAGE_SHIFT), 1319 (unsigned long) num_physpages >> (20 - PAGE_SHIFT),
1320 iova_space_size>>20, 1320 iova_space_size>>20,
1321 iov_order + PAGE_SHIFT); 1321 iov_order + PAGE_SHIFT);
@@ -1323,7 +1323,7 @@ ccio_ioc_init(struct ioc *ioc)
1323 ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL, 1323 ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL,
1324 get_order(ioc->pdir_size)); 1324 get_order(ioc->pdir_size));
1325 if(NULL == ioc->pdir_base) { 1325 if(NULL == ioc->pdir_base) {
1326 panic("%s() could not allocate I/O Page Table\n", __FUNCTION__); 1326 panic("%s() could not allocate I/O Page Table\n", __func__);
1327 } 1327 }
1328 memset(ioc->pdir_base, 0, ioc->pdir_size); 1328 memset(ioc->pdir_base, 0, ioc->pdir_size);
1329 1329
@@ -1332,12 +1332,12 @@ ccio_ioc_init(struct ioc *ioc)
1332 1332
1333 /* resource map size dictated by pdir_size */ 1333 /* resource map size dictated by pdir_size */
1334 ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3; 1334 ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3;
1335 DBG_INIT("%s() res_size 0x%x\n", __FUNCTION__, ioc->res_size); 1335 DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size);
1336 1336
1337 ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL, 1337 ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL,
1338 get_order(ioc->res_size)); 1338 get_order(ioc->res_size));
1339 if(NULL == ioc->res_map) { 1339 if(NULL == ioc->res_map) {
1340 panic("%s() could not allocate resource map\n", __FUNCTION__); 1340 panic("%s() could not allocate resource map\n", __func__);
1341 } 1341 }
1342 memset(ioc->res_map, 0, ioc->res_size); 1342 memset(ioc->res_map, 0, ioc->res_size);
1343 1343
@@ -1409,7 +1409,7 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr)
1409 result = insert_resource(&iomem_resource, res); 1409 result = insert_resource(&iomem_resource, res);
1410 if (result < 0) { 1410 if (result < 0) {
1411 printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n", 1411 printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n",
1412 __FUNCTION__, res->start, res->end); 1412 __func__, res->start, res->end);
1413 } 1413 }
1414} 1414}
1415 1415