Straight forward port of pat-drivers.patch to x86 tree Signed-off-by: Venkatesh Pallipadi Signed-off-by: Suresh Siddha --- diff --git a/drivers/char/drm/drm_proc.c b/drivers/char/drm/drm_proc.c index 12dfea8..c49be81 100644 --- a/drivers/char/drm/drm_proc.c +++ b/drivers/char/drm/drm_proc.c @@ -510,13 +510,13 @@ static int drm__vma_info(char *buf, char **start, off_t offset, int request, vma->vm_flags & VM_IO ? 'i' : '-', vma->vm_pgoff); -#if defined(__i386__) +#if defined(CONFIG_X86) pgprot = pgprot_val(vma->vm_page_prot); DRM_PROC_PRINT(" %c%c%c%c%c%c%c%c%c", pgprot & _PAGE_PRESENT ? 'p' : '-', pgprot & _PAGE_RW ? 'w' : 'r', pgprot & _PAGE_USER ? 'u' : 's', - pgprot & _PAGE_PWT ? 't' : 'b', + ((pgprot & _PAGE_CACHE_MASK) == _PAGE_WC) ? 'w' : 'b', pgprot & _PAGE_PCD ? 'u' : 'c', pgprot & _PAGE_ACCESSED ? 'a' : '-', pgprot & _PAGE_DIRTY ? 'd' : '-', diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index e8d50af..1bd4b49 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c @@ -45,11 +45,8 @@ static pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_struct *vma) { pgprot_t tmp = vm_get_page_prot(vma->vm_flags); -#if defined(__i386__) || defined(__x86_64__) - if (boot_cpu_data.x86 > 3 && map_type != _DRM_AGP) { - pgprot_val(tmp) |= _PAGE_PCD; - pgprot_val(tmp) &= ~_PAGE_PWT; - } +#ifdef CONFIG_X86 + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); #elif defined(__powerpc__) pgprot_val(tmp) |= _PAGE_NO_CACHE; if (map_type == _DRM_REGISTERS) diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index b9b572b..1126e20 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c @@ -57,7 +57,7 @@ struct gbefb_par { #endif #endif #ifdef CONFIG_X86 -#define pgprot_fb(_prot) ((_prot) | _PAGE_PCD) +#define pgprot_fb(_prot) pgprot_writecombine(_prot) #endif /* diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c index 4fb1624..3a75a7b 100644 --- a/drivers/video/sgivwfb.c +++ b/drivers/video/sgivwfb.c @@ -714,8 +714,7 @@ static int sgivwfb_mmap(struct fb_info *info, if (offset + size > sgivwfb_mem_size) return -EINVAL; offset += sgivwfb_mem_phys; - pgprot_val(vma->vm_page_prot) = - pgprot_val(vma->vm_page_prot) | _PAGE_PCD; + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); vma->vm_flags |= VM_IO; if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT, size, vma->vm_page_prot)) diff --git a/include/asm-x86/fb.h b/include/asm-x86/fb.h index 5301846..e438d48 100644 --- a/include/asm-x86/fb.h +++ b/include/asm-x86/fb.h @@ -8,8 +8,7 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { - if (boot_cpu_data.x86 > 3) - pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); } #ifdef CONFIG_X86_32 -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/