mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm: Fix broken use of _PAGE_NO_CACHE on powerpc
That constant isn't meant to be used outside of arch mm code Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1467018023.20278.65.camel@kernel.crashing.org
This commit is contained in:
parent
6308c983d7
commit
37035e7411
3 changed files with 4 additions and 4 deletions
|
@ -44,7 +44,7 @@
|
||||||
# include <asm/agp.h>
|
# include <asm/agp.h>
|
||||||
#else
|
#else
|
||||||
# ifdef __powerpc__
|
# ifdef __powerpc__
|
||||||
# define PAGE_AGP __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
|
# define PAGE_AGP pgprot_noncached_wc(PAGE_KERNEL)
|
||||||
# else
|
# else
|
||||||
# define PAGE_AGP PAGE_KERNEL
|
# define PAGE_AGP PAGE_KERNEL
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
static inline void *drm_vmalloc_dma(unsigned long size)
|
static inline void *drm_vmalloc_dma(unsigned long size)
|
||||||
{
|
{
|
||||||
#if defined(__powerpc__) && defined(CONFIG_NOT_COHERENT_CACHE)
|
#if defined(__powerpc__) && defined(CONFIG_NOT_COHERENT_CACHE)
|
||||||
return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL | _PAGE_NO_CACHE);
|
return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL));
|
||||||
#else
|
#else
|
||||||
return vmalloc_32(size);
|
return vmalloc_32(size);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -80,7 +80,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma)
|
||||||
pgprot_t tmp = vm_get_page_prot(vma->vm_flags);
|
pgprot_t tmp = vm_get_page_prot(vma->vm_flags);
|
||||||
|
|
||||||
#if defined(__powerpc__) && defined(CONFIG_NOT_COHERENT_CACHE)
|
#if defined(__powerpc__) && defined(CONFIG_NOT_COHERENT_CACHE)
|
||||||
tmp |= _PAGE_NO_CACHE;
|
tmp = pgprot_noncached_wc(tmp);
|
||||||
#endif
|
#endif
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
|
||||||
* pages and mappings in fault()
|
* pages and mappings in fault()
|
||||||
*/
|
*/
|
||||||
#if defined(__powerpc__)
|
#if defined(__powerpc__)
|
||||||
pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
|
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
|
||||||
#endif
|
#endif
|
||||||
vma->vm_ops = &drm_vm_ops;
|
vma->vm_ops = &drm_vm_ops;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue