summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Leech2007-03-08 18:57:35 +0100
committerDan Williams2007-07-12 00:39:04 +0200
commit70774b47392171faae0e98f795aa1507f9246af1 (patch)
treedc6e61846b7f140e2756e77bbf2adff4011c4ed6 /drivers
parentioatdma: Remove the wrappers around read(bwl)/write(bwl) in ioatdma (diff)
downloadkernel-qcow2-linux-70774b47392171faae0e98f795aa1507f9246af1.tar.gz
kernel-qcow2-linux-70774b47392171faae0e98f795aa1507f9246af1.tar.xz
kernel-qcow2-linux-70774b47392171faae0e98f795aa1507f9246af1.zip
ioatdma: Remove the use of writeq from the ioatdma driver
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/ioatdma.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c
index 275707097bf1..b3fca1200a73 100644
--- a/drivers/dma/ioatdma.c
+++ b/drivers/dma/ioatdma.c
@@ -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);
}