ioatdma: Remove the use of writeq from the ioatdma driver
authorChris Leech <christopher.leech@intel.com>
Thu, 8 Mar 2007 17:57:35 +0000 (09:57 -0800)
committerDan Williams <dan.j.williams@intel.com>
Wed, 11 Jul 2007 22:39:04 +0000 (15:39 -0700)
There's only one now anyway, and it's not in a performance path,
so make it behave the same on 32-bit and 64-bit CPUs.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
drivers/dma/ioatdma.c

index 275707097bf194daa80348a847cdffd14dbdd166..b3fca1200a73ba989a87255351f410adeee73e01 100644 (file)
@@ -608,13 +608,11 @@ static void ioat_start_null_desc(struct ioat_dma_chan *ioat_chan)
        list_add_tail(&desc->node, &ioat_chan->used_desc);
        spin_unlock_bh(&ioat_chan->desc_lock);
 
-#if (BITS_PER_LONG == 64)
-       writeq(desc->phys, ioat_chan->reg_base + IOAT_CHAINADDR_OFFSET);
-#else
-       writel((u32) desc->phys,
+       writel(((u64) desc->phys) & 0x00000000FFFFFFFF,
               ioat_chan->reg_base + IOAT_CHAINADDR_OFFSET_LOW);
-       writel(0, ioat_chan->reg_base + IOAT_CHAINADDR_OFFSET_HIGH);
-#endif
+       writel(((u64) desc->phys) >> 32,
+              ioat_chan->reg_base + IOAT_CHAINADDR_OFFSET_HIGH);
+
        writeb(IOAT_CHANCMD_START, ioat_chan->reg_base + IOAT_CHANCMD_OFFSET);
 }