summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/hp-agp.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-08-05 10:16:57 +1000
committerDave Airlie <airlied@linux.ie>2009-08-05 10:16:57 +1000
commitb7f315842830d67081642248a3757c713b6b6684 (patch)
tree8606d4227532dccbd0accfa79321cd437fbe3922 /drivers/char/agp/hp-agp.c
parent90bc1a658a53f8832ee799685703977a450e5af9 (diff)
parent6a12235c7d2d75c7d94b9afcaaecd422ff845ce0 (diff)
downloadop-kernel-dev-b7f315842830d67081642248a3757c713b6b6684.zip
op-kernel-dev-b7f315842830d67081642248a3757c713b6b6684.tar.gz
Merge git://git.infradead.org/~dwmw2/iommu-agp into agp-next
Diffstat (limited to 'drivers/char/agp/hp-agp.c')
-rw-r--r--drivers/char/agp/hp-agp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
index 8f3d4c1..501e293 100644
--- a/drivers/char/agp/hp-agp.c
+++ b/drivers/char/agp/hp-agp.c
@@ -107,7 +107,7 @@ static int __init hp_zx1_ioc_shared(void)
hp->gart_size = HP_ZX1_GART_SIZE;
hp->gatt_entries = hp->gart_size / hp->io_page_size;
- hp->io_pdir = gart_to_virt(readq(hp->ioc_regs+HP_ZX1_PDIR_BASE));
+ hp->io_pdir = phys_to_virt(readq(hp->ioc_regs+HP_ZX1_PDIR_BASE));
hp->gatt = &hp->io_pdir[HP_ZX1_IOVA_TO_PDIR(hp->gart_base)];
if (hp->gatt[0] != HP_ZX1_SBA_IOMMU_COOKIE) {
@@ -246,7 +246,7 @@ hp_zx1_configure (void)
agp_bridge->mode = readl(hp->lba_regs+hp->lba_cap_offset+PCI_AGP_STATUS);
if (hp->io_pdir_owner) {
- writel(virt_to_gart(hp->io_pdir), hp->ioc_regs+HP_ZX1_PDIR_BASE);
+ writel(virt_to_phys(hp->io_pdir), hp->ioc_regs+HP_ZX1_PDIR_BASE);
readl(hp->ioc_regs+HP_ZX1_PDIR_BASE);
writel(hp->io_tlb_ps, hp->ioc_regs+HP_ZX1_TCNFG);
readl(hp->ioc_regs+HP_ZX1_TCNFG);
@@ -394,10 +394,8 @@ hp_zx1_remove_memory (struct agp_memory *mem, off_t pg_start, int type)
}
static unsigned long
-hp_zx1_mask_memory (struct agp_bridge_data *bridge,
- struct page *page, int type)
+hp_zx1_mask_memory (struct agp_bridge_data *bridge, dma_addr_t addr, int type)
{
- unsigned long addr = phys_to_gart(page_to_phys(page));
return HP_ZX1_PDIR_VALID_BIT | addr;
}
OpenPOWER on IntegriCloud