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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index cd4dd7ed2c06..5d610cbcfe80 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -406,8 +406,6 @@ resource_found:
406 } 406 }
407 ioc->avg_search[ioc->avg_idx++] = cr_start; 407 ioc->avg_search[ioc->avg_idx++] = cr_start;
408 ioc->avg_idx &= CCIO_SEARCH_SAMPLE - 1; 408 ioc->avg_idx &= CCIO_SEARCH_SAMPLE - 1;
409#endif
410#ifdef CCIO_COLLECT_STATS
411 ioc->used_pages += pages_needed; 409 ioc->used_pages += pages_needed;
412#endif 410#endif
413 /* 411 /*
@@ -453,10 +451,10 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
453 unsigned long mask = ~(~0UL >> pages_mapped); 451 unsigned long mask = ~(~0UL >> pages_mapped);
454 CCIO_FREE_MAPPINGS(ioc, res_idx, mask, 8); 452 CCIO_FREE_MAPPINGS(ioc, res_idx, mask, 8);
455#else 453#else
456 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xff, 8); 454 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffUL, 8);
457#endif 455#endif
458 } else if(pages_mapped <= 16) { 456 } else if(pages_mapped <= 16) {
459 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffff, 16); 457 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffffUL, 16);
460 } else if(pages_mapped <= 32) { 458 } else if(pages_mapped <= 32) {
461 CCIO_FREE_MAPPINGS(ioc, res_idx, ~(unsigned int)0, 32); 459 CCIO_FREE_MAPPINGS(ioc, res_idx, ~(unsigned int)0, 32);
462#ifdef __LP64__ 460#ifdef __LP64__
@@ -1028,8 +1026,10 @@ static int ccio_proc_info(struct seq_file *m, void *p)
1028 1026
1029 while (ioc != NULL) { 1027 while (ioc != NULL) {
1030 unsigned int total_pages = ioc->res_size << 3; 1028 unsigned int total_pages = ioc->res_size << 3;
1029#ifdef CCIO_COLLECT_STATS
1031 unsigned long avg = 0, min, max; 1030 unsigned long avg = 0, min, max;
1032 int j; 1031 int j;
1032#endif
1033 1033
1034 len += seq_printf(m, "%s\n", ioc->name); 1034 len += seq_printf(m, "%s\n", ioc->name);
1035 1035
@@ -1060,8 +1060,7 @@ static int ccio_proc_info(struct seq_file *m, void *p)
1060 avg /= CCIO_SEARCH_SAMPLE; 1060 avg /= CCIO_SEARCH_SAMPLE;
1061 len += seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", 1061 len += seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n",
1062 min, avg, max); 1062 min, avg, max);
1063#endif 1063
1064#ifdef CCIO_COLLECT_STATS
1065 len += seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n", 1064 len += seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n",
1066 ioc->msingle_calls, ioc->msingle_pages, 1065 ioc->msingle_calls, ioc->msingle_pages,
1067 (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls)); 1066 (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls));
@@ -1400,7 +1399,7 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr)
1400 result = insert_resource(&iomem_resource, res); 1399 result = insert_resource(&iomem_resource, res);
1401 if (result < 0) { 1400 if (result < 0) {
1402 printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n", 1401 printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n",
1403 __func__, res->start, res->end); 1402 __func__, (unsigned long)res->start, (unsigned long)res->end);
1404 } 1403 }
1405} 1404}
1406 1405
@@ -1551,7 +1550,8 @@ static int __init ccio_probe(struct parisc_device *dev)
1551 1550
1552 ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn"; 1551 ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn";
1553 1552
1554 printk(KERN_INFO "Found %s at 0x%lx\n", ioc->name, dev->hpa.start); 1553 printk(KERN_INFO "Found %s at 0x%lx\n", ioc->name,
1554 (unsigned long)dev->hpa.start);
1555 1555
1556 for (i = 0; i < ioc_count; i++) { 1556 for (i = 0; i < ioc_count; i++) {
1557 ioc_p = &(*ioc_p)->next; 1557 ioc_p = &(*ioc_p)->next;