[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291677875-30493-8-git-send-email-konrad.wilk@oracle.com>
Date: Mon, 6 Dec 2010 18:24:19 -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 07/23] agp/nvidia: Use the dma_addr[] instead of page_to_phys when inserting.
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/nvidia-agp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index b9734a9..4b4993f 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -224,7 +224,7 @@ static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type
}
for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
writel(agp_bridge->driver->mask_memory(agp_bridge,
- page_to_phys(mem->pages[i]), mask_type),
+ mem->dma_addr[i], mask_type),
agp_bridge->gatt_table+nvidia_private.pg_offset+j);
}
--
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