diff options
Diffstat (limited to 'drivers/char/agp/amd-k7-agp.c')
-rw-r--r-- | drivers/char/agp/amd-k7-agp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 87be46406daf..d28669992147 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
@@ -41,6 +41,7 @@ static int amd_create_page_map(struct amd_page_map *page_map) | |||
41 | if (page_map->real == NULL) | 41 | if (page_map->real == NULL) |
42 | return -ENOMEM; | 42 | return -ENOMEM; |
43 | 43 | ||
44 | #ifndef CONFIG_X86 | ||
44 | SetPageReserved(virt_to_page(page_map->real)); | 45 | SetPageReserved(virt_to_page(page_map->real)); |
45 | global_cache_flush(); | 46 | global_cache_flush(); |
46 | page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real), | 47 | page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real), |
@@ -52,6 +53,10 @@ static int amd_create_page_map(struct amd_page_map *page_map) | |||
52 | return -ENOMEM; | 53 | return -ENOMEM; |
53 | } | 54 | } |
54 | global_cache_flush(); | 55 | global_cache_flush(); |
56 | #else | ||
57 | set_memory_uc((unsigned long)page_map->real, 1); | ||
58 | page_map->remapped = page_map->real; | ||
59 | #endif | ||
55 | 60 | ||
56 | for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) { | 61 | for (i = 0; i < PAGE_SIZE / sizeof(unsigned long); i++) { |
57 | writel(agp_bridge->scratch_page, page_map->remapped+i); | 62 | writel(agp_bridge->scratch_page, page_map->remapped+i); |
@@ -63,8 +68,12 @@ static int amd_create_page_map(struct amd_page_map *page_map) | |||
63 | 68 | ||
64 | static void amd_free_page_map(struct amd_page_map *page_map) | 69 | static void amd_free_page_map(struct amd_page_map *page_map) |
65 | { | 70 | { |
71 | #ifndef CONFIG_X86 | ||
66 | iounmap(page_map->remapped); | 72 | iounmap(page_map->remapped); |
67 | ClearPageReserved(virt_to_page(page_map->real)); | 73 | ClearPageReserved(virt_to_page(page_map->real)); |
74 | #else | ||
75 | set_memory_wb((unsigned long)page_map->real, 1); | ||
76 | #endif | ||
68 | free_page((unsigned long) page_map->real); | 77 | free_page((unsigned long) page_map->real); |
69 | } | 78 | } |
70 | 79 | ||