aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/ati-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/ati-agp.c')
-rw-r--r--drivers/char/agp/ati-agp.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index 2d46b713c8f2..9ac3bef3bb7a 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -60,18 +60,9 @@ static int ati_create_page_map(struct ati_page_map *page_map)
60 if (page_map->real == NULL) 60 if (page_map->real == NULL)
61 return -ENOMEM; 61 return -ENOMEM;
62 62
63 SetPageReserved(virt_to_page(page_map->real)); 63 set_memory_uc(page_map->real, 1);
64 err = map_page_into_agp(virt_to_page(page_map->real)); 64 err = map_page_into_agp(virt_to_page(page_map->real));
65 page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real), 65 page_map->remapped = page_map->real;
66 PAGE_SIZE);
67 if (page_map->remapped == NULL || err) {
68 ClearPageReserved(virt_to_page(page_map->real));
69 free_page((unsigned long) page_map->real);
70 page_map->real = NULL;
71 return -ENOMEM;
72 }
73 /*CACHE_FLUSH();*/
74 global_cache_flush();
75 66
76 for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) { 67 for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) {
77 writel(agp_bridge->scratch_page, page_map->remapped+i); 68 writel(agp_bridge->scratch_page, page_map->remapped+i);
@@ -85,8 +76,7 @@ static int ati_create_page_map(struct ati_page_map *page_map)
85static void ati_free_page_map(struct ati_page_map *page_map) 76static void ati_free_page_map(struct ati_page_map *page_map)
86{ 77{
87 unmap_page_from_agp(virt_to_page(page_map->real)); 78 unmap_page_from_agp(virt_to_page(page_map->real));
88 iounmap(page_map->remapped); 79 set_memory_wb(page_map->real, 1);
89 ClearPageReserved(virt_to_page(page_map->real));
90 free_page((unsigned long) page_map->real); 80 free_page((unsigned long) page_map->real);
91} 81}
92 82