@@ -202,7 +202,7 @@ static void
202
202
sba_dump_pdir_entry (struct ioc * ioc , char * msg , uint pide )
203
203
{
204
204
/* 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 )]);
206
206
unsigned long * rptr = (unsigned long * ) & (ioc -> res_map [(pide >>3 ) & ~(sizeof (unsigned long ) - 1 )]);
207
207
uint rcnt ;
208
208
@@ -569,7 +569,7 @@ typedef unsigned long space_t;
569
569
*/
570
570
571
571
static 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 ,
573
573
unsigned long hint )
574
574
{
575
575
u64 pa ; /* physical address */
@@ -613,7 +613,7 @@ static void
613
613
sba_mark_invalid (struct ioc * ioc , dma_addr_t iova , size_t byte_cnt )
614
614
{
615
615
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 )];
617
617
618
618
#ifdef ASSERT_PDIR_SANITY
619
619
/* Assert first pdir entry is set.
@@ -714,7 +714,7 @@ sba_map_single(struct device *dev, void *addr, size_t size,
714
714
unsigned long flags ;
715
715
dma_addr_t iovp ;
716
716
dma_addr_t offset ;
717
- u64 * pdir_start ;
717
+ __le64 * pdir_start ;
718
718
int pide ;
719
719
720
720
ioc = GET_IOC (dev );
@@ -1432,7 +1432,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
1432
1432
1433
1433
ioc -> pdir_size = pdir_size = (iova_space_size /IOVP_SIZE ) * sizeof (u64 );
1434
1434
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" ,
1436
1436
__func__ ,
1437
1437
ioc -> ioc_hpa ,
1438
1438
(unsigned long ) totalram_pages () >> (20 - PAGE_SHIFT ),
@@ -1469,7 +1469,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
1469
1469
ioc -> iovp_mask = ~(iova_space_mask + PAGE_SIZE - 1 );
1470
1470
#endif
1471
1471
1472
- DBG_INIT ("%s() IOV base 0x% lx mask 0x% 0lx\n" ,
1472
+ DBG_INIT ("%s() IOV base %# lx mask %# 0lx\n" ,
1473
1473
__func__ , ioc -> ibase , ioc -> imask );
1474
1474
1475
1475
/*
@@ -1581,7 +1581,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
1581
1581
1582
1582
if (!IS_PLUTO (sba_dev -> dev )) {
1583
1583
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 ->" ,
1585
1585
__func__ , sba_dev -> sba_hpa , ioc_ctl );
1586
1586
ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE );
1587
1587
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,
1666
1666
/* flush out the last writes */
1667
1667
READ_REG (sba_dev -> ioc [i ].ioc_hpa + ROPE7_CTL );
1668
1668
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" ,
1670
1670
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 )
1673
1673
);
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 )
1677
1677
);
1678
1678
1679
1679
if (IS_PLUTO (sba_dev -> dev )) {
@@ -1737,7 +1737,7 @@ sba_common_init(struct sba_device *sba_dev)
1737
1737
#ifdef ASSERT_PDIR_SANITY
1738
1738
/* Mark first bit busy - ie no IOVA 0 */
1739
1739
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 ;
1741
1741
#endif
1742
1742
1743
1743
/* Third (and last) part of PIRANHA BUG */
0 commit comments