@@ -202,7 +202,7 @@ static void
202202sba_dump_pdir_entry (struct ioc * ioc , char * msg , uint pide )
203203{
204204 /* start printing from lowest pde in rval */
205- u64 * ptr = & (ioc -> pdir_base [pide & (~0U * BITS_PER_LONG )]);
205+ __le64 * ptr = & (ioc -> pdir_base [pide & (~0U * BITS_PER_LONG )]);
206206 unsigned long * rptr = (unsigned long * ) & (ioc -> res_map [(pide >>3 ) & ~(sizeof (unsigned long ) - 1 )]);
207207 uint rcnt ;
208208
@@ -569,7 +569,7 @@ typedef unsigned long space_t;
569569 */
570570
571571static void
572- sba_io_pdir_entry (u64 * pdir_ptr , space_t sid , unsigned long vba ,
572+ sba_io_pdir_entry (__le64 * pdir_ptr , space_t sid , unsigned long vba ,
573573 unsigned long hint )
574574{
575575 u64 pa ; /* physical address */
@@ -613,7 +613,7 @@ static void
613613sba_mark_invalid (struct ioc * ioc , dma_addr_t iova , size_t byte_cnt )
614614{
615615 u32 iovp = (u32 ) SBA_IOVP (ioc ,iova );
616- u64 * pdir_ptr = & ioc -> pdir_base [PDIR_INDEX (iovp )];
616+ __le64 * pdir_ptr = & ioc -> pdir_base [PDIR_INDEX (iovp )];
617617
618618#ifdef ASSERT_PDIR_SANITY
619619 /* Assert first pdir entry is set.
@@ -714,7 +714,7 @@ sba_map_single(struct device *dev, void *addr, size_t size,
714714 unsigned long flags ;
715715 dma_addr_t iovp ;
716716 dma_addr_t offset ;
717- u64 * pdir_start ;
717+ __le64 * pdir_start ;
718718 int pide ;
719719
720720 ioc = GET_IOC (dev );
@@ -1432,7 +1432,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
14321432
14331433 ioc -> pdir_size = pdir_size = (iova_space_size /IOVP_SIZE ) * sizeof (u64 );
14341434
1435- DBG_INIT ("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n" ,
1435+ DBG_INIT ("%s() hpa %px mem %ldMB IOV %dMB (%d bits)\n" ,
14361436 __func__ ,
14371437 ioc -> ioc_hpa ,
14381438 (unsigned long ) totalram_pages () >> (20 - PAGE_SHIFT ),
@@ -1469,7 +1469,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
14691469 ioc -> iovp_mask = ~(iova_space_mask + PAGE_SIZE - 1 );
14701470#endif
14711471
1472- DBG_INIT ("%s() IOV base 0x% lx mask 0x% 0lx\n" ,
1472+ DBG_INIT ("%s() IOV base %# lx mask %# 0lx\n" ,
14731473 __func__ , ioc -> ibase , ioc -> imask );
14741474
14751475 /*
@@ -1581,7 +1581,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
15811581
15821582 if (!IS_PLUTO (sba_dev -> dev )) {
15831583 ioc_ctl = READ_REG (sba_dev -> sba_hpa + IOC_CTRL );
1584- DBG_INIT ("%s() hpa 0x%lx ioc_ctl 0x%Lx ->" ,
1584+ DBG_INIT ("%s() hpa %px ioc_ctl 0x%Lx ->" ,
15851585 __func__ , sba_dev -> sba_hpa , ioc_ctl );
15861586 ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE );
15871587 ioc_ctl |= IOC_CTRL_DD | IOC_CTRL_D4 | IOC_CTRL_TC ;
@@ -1666,14 +1666,14 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
16661666 /* flush out the last writes */
16671667 READ_REG (sba_dev -> ioc [i ].ioc_hpa + ROPE7_CTL );
16681668
1669- DBG_INIT (" ioc[%d] ROPE_CFG 0x%Lx ROPE_DBG 0x%Lx \n" ,
1669+ DBG_INIT (" ioc[%d] ROPE_CFG %#lx ROPE_DBG %lx \n" ,
16701670 i ,
1671- READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x40 ),
1672- READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x50 )
1671+ ( unsigned long ) READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x40 ),
1672+ ( unsigned long ) READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x50 )
16731673 );
1674- DBG_INIT (" STATUS_CONTROL 0x%Lx FLUSH_CTRL 0x%Lx \n" ,
1675- READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x108 ),
1676- READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x400 )
1674+ DBG_INIT (" STATUS_CONTROL %#lx FLUSH_CTRL %#lx \n" ,
1675+ ( unsigned long ) READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x108 ),
1676+ ( unsigned long ) READ_REG (sba_dev -> ioc [i ].ioc_hpa + 0x400 )
16771677 );
16781678
16791679 if (IS_PLUTO (sba_dev -> dev )) {
@@ -1737,7 +1737,7 @@ sba_common_init(struct sba_device *sba_dev)
17371737#ifdef ASSERT_PDIR_SANITY
17381738 /* Mark first bit busy - ie no IOVA 0 */
17391739 sba_dev -> ioc [i ].res_map [0 ] = 0x80 ;
1740- sba_dev -> ioc [i ].pdir_base [0 ] = 0xeeffc0addbba0080ULL ;
1740+ sba_dev -> ioc [i ].pdir_base [0 ] = ( __force __le64 ) 0xeeffc0addbba0080ULL ;
17411741#endif
17421742
17431743 /* Third (and last) part of PIRANHA BUG */
0 commit comments