|
97 | 97 | #define DBG_RUN_SG(x...)
|
98 | 98 | #endif
|
99 | 99 |
|
100 |
| -#define CCIO_INLINE inline |
101 | 100 | #define WRITE_U32(value, addr) __raw_writel(value, addr)
|
102 | 101 | #define READ_U32(addr) __raw_readl(addr)
|
103 | 102 |
|
@@ -330,7 +329,8 @@ static int ioc_count;
|
330 | 329 | /**
|
331 | 330 | * ccio_alloc_range - Allocate pages in the ioc's resource map.
|
332 | 331 | * @ioc: The I/O Controller.
|
333 |
| - * @pages_needed: The requested number of pages to be mapped into the |
| 332 | + * @dev: The PCI device. |
| 333 | + * @size: The requested number of bytes to be mapped into the |
334 | 334 | * I/O Pdir...
|
335 | 335 | *
|
336 | 336 | * This function searches the resource map of the ioc to locate a range
|
@@ -552,7 +552,7 @@ static u32 hint_lookup[] = {
|
552 | 552 | * (Load Coherence Index) instruction. The 8 bits used for the virtual
|
553 | 553 | * index are bits 12:19 of the value returned by LCI.
|
554 | 554 | */
|
555 |
| -static void CCIO_INLINE |
| 555 | +static void |
556 | 556 | ccio_io_pdir_entry(u64 *pdir_ptr, space_t sid, unsigned long vba,
|
557 | 557 | unsigned long hints)
|
558 | 558 | {
|
@@ -623,7 +623,7 @@ ccio_io_pdir_entry(u64 *pdir_ptr, space_t sid, unsigned long vba,
|
623 | 623 | *
|
624 | 624 | * FIXME: Can we change the byte_cnt to pages_mapped?
|
625 | 625 | */
|
626 |
| -static CCIO_INLINE void |
| 626 | +static void |
627 | 627 | ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt)
|
628 | 628 | {
|
629 | 629 | u32 chain_size = 1 << ioc->chainid_shift;
|
@@ -656,7 +656,7 @@ ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt)
|
656 | 656 | *
|
657 | 657 | * FIXME: Can we change byte_cnt to pages_mapped?
|
658 | 658 | */
|
659 |
| -static CCIO_INLINE void |
| 659 | +static void |
660 | 660 | ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
|
661 | 661 | {
|
662 | 662 | u32 iovp = (u32)CCIO_IOVP(iova);
|
@@ -795,9 +795,10 @@ ccio_map_page(struct device *dev, struct page *page, unsigned long offset,
|
795 | 795 | /**
|
796 | 796 | * ccio_unmap_page - Unmap an address range from the IOMMU.
|
797 | 797 | * @dev: The PCI device.
|
798 |
| - * @addr: The start address of the DMA region. |
| 798 | + * @iova: The start address of the DMA region. |
799 | 799 | * @size: The length of the DMA region.
|
800 | 800 | * @direction: The direction of the DMA transaction (to/from device).
|
| 801 | + * @attrs: attributes |
801 | 802 | */
|
802 | 803 | static void
|
803 | 804 | ccio_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
|
@@ -838,6 +839,8 @@ ccio_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
|
838 | 839 | * @dev: The PCI device.
|
839 | 840 | * @size: The length of the DMA region.
|
840 | 841 | * @dma_handle: The DMA address handed back to the device (not the cpu).
|
| 842 | + * @flag: allocation flags |
| 843 | + * @attrs: attributes |
841 | 844 | *
|
842 | 845 | * This function implements the pci_alloc_consistent function.
|
843 | 846 | */
|
@@ -872,6 +875,7 @@ ccio_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag,
|
872 | 875 | * @size: The length of the DMA region.
|
873 | 876 | * @cpu_addr: The cpu address returned from the ccio_alloc_consistent.
|
874 | 877 | * @dma_handle: The device address returned from the ccio_alloc_consistent.
|
| 878 | + * @attrs: attributes |
875 | 879 | *
|
876 | 880 | * This function implements the pci_free_consistent function.
|
877 | 881 | */
|
@@ -901,6 +905,7 @@ ccio_free(struct device *dev, size_t size, void *cpu_addr,
|
901 | 905 | * @sglist: The scatter/gather list to be mapped in the IOMMU.
|
902 | 906 | * @nents: The number of entries in the scatter/gather list.
|
903 | 907 | * @direction: The direction of the DMA transaction (to/from device).
|
| 908 | + * @attrs: attributes |
904 | 909 | *
|
905 | 910 | * This function implements the pci_map_sg function.
|
906 | 911 | */
|
@@ -980,6 +985,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
|
980 | 985 | * @sglist: The scatter/gather list to be unmapped from the IOMMU.
|
981 | 986 | * @nents: The number of entries in the scatter/gather list.
|
982 | 987 | * @direction: The direction of the DMA transaction (to/from device).
|
| 988 | + * @attrs: attributes |
983 | 989 | *
|
984 | 990 | * This function implements the pci_unmap_sg function.
|
985 | 991 | */
|
|
0 commit comments