[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291677875-30493-7-git-send-email-konrad.wilk@oracle.com>
Date: Mon, 6 Dec 2010 18:24:18 -0500
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To: airlied@...ux.ie, tglx@...utronix.de, hpa@...or.com,
airlied@...hat.com, linux-kernel@...r.kernel.org, konrad@...nel.org
Cc: Jeremy Fitzhardinge <jeremy@...p.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH 06/23] agp/ali: Use the dma_addr instead of page_to_phys for m1541_[alloc|destroy]_page.
The dma_addr contains the same value as page_to_phys(page). That is
until the PCI API is enabled at which point the dma_addr will
contain the true DMA (bus) address - which on baremetal will in all
likehood be the same as page_to_phys(page). But under Xen, it might
be different.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
---
drivers/char/agp/ali-agp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
index ede9d0a..92382d7 100644
--- a/drivers/char/agp/ali-agp.c
+++ b/drivers/char/agp/ali-agp.c
@@ -153,7 +153,7 @@ static struct page *m1541_alloc_page(struct agp_bridge_data *bridge,
pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp);
pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL,
(((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
- page_to_phys(page)) | ALI_CACHE_FLUSH_EN ));
+ *dma_addr) | ALI_CACHE_FLUSH_EN ));
return page;
}
@@ -182,7 +182,7 @@ static void m1541_destroy_page(struct page *page, int flags,
pci_read_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL, &temp);
pci_write_config_dword(agp_bridge->dev, ALI_CACHE_FLUSH_CTRL,
(((temp & ALI_CACHE_FLUSH_ADDR_MASK) |
- page_to_phys(page)) | ALI_CACHE_FLUSH_EN));
+ *dma_addr) | ALI_CACHE_FLUSH_EN));
}
agp_generic_destroy_page(page, flags, dma_addr);
}
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists