aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/sworks-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/sworks-agp.c')
-rw-r--r--drivers/char/agp/sworks-agp.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index 551ef25063ef..e08934e58f32 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -52,28 +52,20 @@ static int serverworks_create_page_map(struct serverworks_page_map *page_map)
52 if (page_map->real == NULL) { 52 if (page_map->real == NULL) {
53 return -ENOMEM; 53 return -ENOMEM;
54 } 54 }
55 SetPageReserved(virt_to_page(page_map->real)); 55
56 global_cache_flush(); 56 set_memory_uc((unsigned long)page_map->real, 1);
57 page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real), 57 page_map->remapped = page_map->real;
58 PAGE_SIZE);
59 if (page_map->remapped == NULL) {
60 ClearPageReserved(virt_to_page(page_map->real));
61 free_page((unsigned long) page_map->real);
62 page_map->real = NULL;
63 return -ENOMEM;
64 }
65 global_cache_flush();
66 58
67 for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) 59 for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++)
68 writel(agp_bridge->scratch_page, page_map->remapped+i); 60 writel(agp_bridge->scratch_page, page_map->remapped+i);
61 /* Red Pen: Everyone else does pci posting flush here */
69 62
70 return 0; 63 return 0;
71} 64}
72 65
73static void serverworks_free_page_map(struct serverworks_page_map *page_map) 66static void serverworks_free_page_map(struct serverworks_page_map *page_map)
74{ 67{
75 iounmap(page_map->remapped); 68 set_memory_wb((unsigned long)page_map->real, 1);
76 ClearPageReserved(virt_to_page(page_map->real));
77 free_page((unsigned long) page_map->real); 69 free_page((unsigned long) page_map->real);
78} 70}
79 71