diff options
Diffstat (limited to 'drivers/video/vermilion/vermilion.c')
-rw-r--r-- | drivers/video/vermilion/vermilion.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index c31f549ebea0..1c656667b937 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 | /* |
@@ -126,14 +124,8 @@ static int vmlfb_alloc_vram_area(struct vram_area *va, unsigned max_order, | |||
126 | /* | 124 | /* |
127 | * Change caching policy of the linear kernel map to avoid | 125 | * Change caching policy of the linear kernel map to avoid |
128 | * mapping type conflicts with user-space mappings. | 126 | * mapping type conflicts with user-space mappings. |
129 | * The first global_flush_tlb() is really only there to do a global | ||
130 | * wbinvd(). | ||
131 | */ | 127 | */ |
132 | 128 | set_pages_uc(virt_to_page(va->logical), va->size >> PAGE_SHIFT); | |
133 | global_flush_tlb(); | ||
134 | change_page_attr(virt_to_page(va->logical), va->size >> PAGE_SHIFT, | ||
135 | wc_pageprot); | ||
136 | global_flush_tlb(); | ||
137 | 129 | ||
138 | printk(KERN_DEBUG MODULE_NAME | 130 | printk(KERN_DEBUG MODULE_NAME |
139 | ": Allocated %ld bytes vram area at 0x%08lx\n", | 131 | ": Allocated %ld bytes vram area at 0x%08lx\n", |
@@ -157,9 +149,8 @@ static void vmlfb_free_vram_area(struct vram_area *va) | |||
157 | * Reset the linear kernel map caching policy. | 149 | * Reset the linear kernel map caching policy. |
158 | */ | 150 | */ |
159 | 151 | ||
160 | change_page_attr(virt_to_page(va->logical), | 152 | set_pages_wb(virt_to_page(va->logical), |
161 | va->size >> PAGE_SHIFT, PAGE_KERNEL); | 153 | va->size >> PAGE_SHIFT); |
162 | global_flush_tlb(); | ||
163 | 154 | ||
164 | /* | 155 | /* |
165 | * Decrease the usage count on the pages we've used | 156 | * Decrease the usage count on the pages we've used |