From 6d238cc4dc8a36a3915c26202fe49f58a0683fb9 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Wed, 30 Jan 2008 13:34:06 +0100 Subject: 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 Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- drivers/char/agp/intel-agp.c | 6 +++--- drivers/video/vermilion/vermilion.c | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 03eac1e..c03a714 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) if (page == NULL) return NULL; - if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) { - change_page_attr(page, 4, PAGE_KERNEL); + if (set_pages_uc(page, 4) < 0) { + set_pages_wb(page, 4); global_flush_tlb(); __free_pages(page, 2); return NULL; @@ -230,7 +230,7 @@ static void i8xx_destroy_pages(void *addr) return; page = virt_to_page(addr); - change_page_attr(page, 4, PAGE_KERNEL); + set_pages_wb(page, 4); global_flush_tlb(); put_page(page); __free_pages(page, 2); diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index c31f549..fb72778 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, { gfp_t flags; unsigned long i; - pgprot_t wc_pageprot; - wc_pageprot = PAGE_KERNEL_NOCACHE; max_order++; do { /* @@ -131,8 +129,7 @@ static int vmlfb_alloc_vram_area(struct vram_area *va, unsigned max_order, */ global_flush_tlb(); - change_page_attr(virt_to_page(va->logical), va->size >> PAGE_SHIFT, - wc_pageprot); + set_pages_uc(virt_to_page(va->logical), va->size >> PAGE_SHIFT); global_flush_tlb(); printk(KERN_DEBUG MODULE_NAME @@ -157,8 +154,8 @@ static void vmlfb_free_vram_area(struct vram_area *va) * Reset the linear kernel map caching policy. */ - change_page_attr(virt_to_page(va->logical), - va->size >> PAGE_SHIFT, PAGE_KERNEL); + set_pages_wb(virt_to_page(va->logical), + va->size >> PAGE_SHIFT); global_flush_tlb(); /* -- cgit v1.1