aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2008-01-30 07:34:06 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:34:06 -0500
commit6d238cc4dc8a36a3915c26202fe49f58a0683fb9 (patch)
treef17d1b7d27ab48ba3b5f998a8a286c198b052ce2 /drivers
parent75cbade8ea3127a84e3da7c2c15808e54f0df7e8 (diff)
x86: convert CPA users to the new set_page_ API
This patch converts various users of change_page_attr() to the new, more intent driven set_page_*/set_memory_* API set. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/intel-agp.c6
-rw-r--r--drivers/video/vermilion/vermilion.c9
2 files changed, 6 insertions, 9 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 03eac1eb8e0f..c03a7143928f 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -210,8 +210,8 @@ static void *i8xx_alloc_pages(void)
210 if (page == NULL) 210 if (page == NULL)
211 return NULL; 211 return NULL;
212 212
213 if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) { 213 if (set_pages_uc(page, 4) < 0) {
214 change_page_attr(page, 4, PAGE_KERNEL); 214 set_pages_wb(page, 4);
215 global_flush_tlb(); 215 global_flush_tlb();
216 __free_pages(page, 2); 216 __free_pages(page, 2);
217 return NULL; 217 return NULL;
@@ -230,7 +230,7 @@ static void i8xx_destroy_pages(void *addr)
230 return; 230 return;
231 231
232 page = virt_to_page(addr); 232 page = virt_to_page(addr);
233 change_page_attr(page, 4, PAGE_KERNEL); 233 set_pages_wb(page, 4);
234 global_flush_tlb(); 234 global_flush_tlb();
235 put_page(page); 235 put_page(page);
236 __free_pages(page, 2); 236 __free_pages(page, 2);
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c
index c31f549ebea0..fb72778dee48 100644
--- a/drivers/video/vermilion/vermilion.c
+++ b/drivers/video/vermilion/vermilion.c
@@ -88,9 +88,7 @@ static int vmlfb_alloc_vram_area(struct vram_area *va, unsigned max_order,
88{ 88{
89 gfp_t flags; 89 gfp_t flags;
90 unsigned long i; 90 unsigned long i;
91 pgprot_t wc_pageprot;
92 91
93 wc_pageprot = PAGE_KERNEL_NOCACHE;
94 max_order++; 92 max_order++;
95 do { 93 do {
96 /* 94 /*
@@ -131,8 +129,7 @@ static int vmlfb_alloc_vram_area(struct vram_area *va, unsigned max_order,
131 */ 129 */
132 130
133 global_flush_tlb(); 131 global_flush_tlb();
134 change_page_attr(virt_to_page(va->logical), va->size >> PAGE_SHIFT, 132 set_pages_uc(virt_to_page(va->logical), va->size >> PAGE_SHIFT);
135 wc_pageprot);
136 global_flush_tlb(); 133 global_flush_tlb();
137 134
138 printk(KERN_DEBUG MODULE_NAME 135 printk(KERN_DEBUG MODULE_NAME
@@ -157,8 +154,8 @@ static void vmlfb_free_vram_area(struct vram_area *va)
157 * Reset the linear kernel map caching policy. 154 * Reset the linear kernel map caching policy.
158 */ 155 */
159 156
160 change_page_attr(virt_to_page(va->logical), 157 set_pages_wb(virt_to_page(va->logical),
161 va->size >> PAGE_SHIFT, PAGE_KERNEL); 158 va->size >> PAGE_SHIFT);
162 global_flush_tlb(); 159 global_flush_tlb();
163 160
164 /* 161 /*