@@ -214,7 +214,7 @@ struct ioa_registers {
214214struct ioc {
215215 struct ioa_registers __iomem * ioc_regs ; /* I/O MMU base address */
216216 u8 * res_map ; /* resource map, bit == pdir entry */
217- u64 * pdir_base ; /* physical base address */
217+ __le64 * pdir_base ; /* physical base address */
218218 u32 pdir_size ; /* bytes, function of IOV Space size */
219219 u32 res_hint ; /* next available IOVP -
220220 circular search */
@@ -339,7 +339,7 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
339339 BUG_ON (pages_needed == 0 );
340340 BUG_ON ((pages_needed * IOVP_SIZE ) > DMA_CHUNK_SIZE );
341341
342- DBG_RES ("%s() size: %d pages_needed %d\n" ,
342+ DBG_RES ("%s() size: %zu pages_needed %d\n" ,
343343 __func__ , size , pages_needed );
344344
345345 /*
@@ -427,7 +427,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
427427 BUG_ON ((pages_mapped * IOVP_SIZE ) > DMA_CHUNK_SIZE );
428428 BUG_ON (pages_mapped > BITS_PER_LONG );
429429
430- DBG_RES ("%s(): res_idx: %d pages_mapped %d \n" ,
430+ DBG_RES ("%s(): res_idx: %d pages_mapped %lu \n" ,
431431 __func__ , res_idx , pages_mapped );
432432
433433#ifdef CCIO_COLLECT_STATS
@@ -543,7 +543,7 @@ static u32 hint_lookup[] = {
543543 * index are bits 12:19 of the value returned by LCI.
544544 */
545545static void
546- ccio_io_pdir_entry (u64 * pdir_ptr , space_t sid , unsigned long vba ,
546+ ccio_io_pdir_entry (__le64 * pdir_ptr , space_t sid , unsigned long vba ,
547547 unsigned long hints )
548548{
549549 register unsigned long pa ;
@@ -719,7 +719,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
719719 unsigned long flags ;
720720 dma_addr_t iovp ;
721721 dma_addr_t offset ;
722- u64 * pdir_start ;
722+ __le64 * pdir_start ;
723723 unsigned long hint = hint_lookup [(int )direction ];
724724
725725 BUG_ON (!dev );
@@ -746,8 +746,8 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
746746
747747 pdir_start = & (ioc -> pdir_base [idx ]);
748748
749- DBG_RUN ("%s() 0x%p -> 0x% lx size: %0x%x \n" ,
750- __func__ , addr , (long )iovp | offset , size );
749+ DBG_RUN ("%s() %px -> %# lx size: %zu \n" ,
750+ __func__ , addr , (long )( iovp | offset ) , size );
751751
752752 /* If not cacheline aligned, force SAFE_DMA on the whole mess */
753753 if ((size % L1_CACHE_BYTES ) || ((unsigned long )addr % L1_CACHE_BYTES ))
@@ -805,7 +805,7 @@ ccio_unmap_page(struct device *dev, dma_addr_t iova, size_t size,
805805 return ;
806806 }
807807
808- DBG_RUN ("%s() iovp 0x% lx/%x \n" ,
808+ DBG_RUN ("%s() iovp %# lx/%zx \n" ,
809809 __func__ , (long )iova , size );
810810
811811 iova ^= offset ; /* clear offset bits */
@@ -1283,7 +1283,7 @@ ccio_ioc_init(struct ioc *ioc)
12831283 iova_space_size >>20 ,
12841284 iov_order + PAGE_SHIFT );
12851285
1286- ioc -> pdir_base = (u64 * )__get_free_pages (GFP_KERNEL ,
1286+ ioc -> pdir_base = (__le64 * )__get_free_pages (GFP_KERNEL ,
12871287 get_order (ioc -> pdir_size ));
12881288 if (NULL == ioc -> pdir_base ) {
12891289 panic ("%s() could not allocate I/O Page Table\n" , __func__ );
0 commit comments