From 10eb2659cc6059d0c4de2e2c66d1534091519f56 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Tue, 17 Jul 2007 04:05:27 -0700 Subject: fbdev: move arch-specific bits to their respective subdirectories Move arch-specific bits of fb_mmap() to their respective subdirectories [bob.picco@hp.com: efi_range_is_wc is referenced but not declared] [bunk@stusta.de: fix include/asm-m68k/fb.h] Signed-off-by: Antonino Daplas Acked-by: David S. Miller Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-alpha/fb.h | 7 +++++++ include/asm-arm/fb.h | 13 +++++++++++++ include/asm-arm26/fb.h | 6 ++++++ include/asm-avr32/fb.h | 15 +++++++++++++++ include/asm-blackfin/fb.h | 6 ++++++ include/asm-cris/fb.h | 6 ++++++ include/asm-frv/fb.h | 6 ++++++ include/asm-h8300/fb.h | 6 ++++++ include/asm-i386/fb.h | 14 ++++++++++++++ include/asm-ia64/fb.h | 17 +++++++++++++++++ include/asm-m32r/fb.h | 13 +++++++++++++ include/asm-m68k/fb.h | 28 ++++++++++++++++++++++++++++ include/asm-m68knommu/fb.h | 6 ++++++ include/asm-mips/fb.h | 13 +++++++++++++ include/asm-parisc/fb.h | 13 +++++++++++++ include/asm-powerpc/fb.h | 15 +++++++++++++++ include/asm-s390/fb.h | 6 ++++++ include/asm-sh/fb.h | 13 +++++++++++++ include/asm-sh64/fb.h | 13 +++++++++++++ include/asm-sparc/fb.h | 6 ++++++ include/asm-sparc64/fb.h | 12 ++++++++++++ include/asm-v850/fb.h | 6 ++++++ include/asm-x86_64/fb.h | 14 ++++++++++++++ include/asm-xtensa/fb.h | 6 ++++++ 24 files changed, 260 insertions(+) create mode 100644 include/asm-alpha/fb.h create mode 100644 include/asm-arm/fb.h create mode 100644 include/asm-arm26/fb.h create mode 100644 include/asm-avr32/fb.h create mode 100644 include/asm-blackfin/fb.h create mode 100644 include/asm-cris/fb.h create mode 100644 include/asm-frv/fb.h create mode 100644 include/asm-h8300/fb.h create mode 100644 include/asm-i386/fb.h create mode 100644 include/asm-ia64/fb.h create mode 100644 include/asm-m32r/fb.h create mode 100644 include/asm-m68k/fb.h create mode 100644 include/asm-m68knommu/fb.h create mode 100644 include/asm-mips/fb.h create mode 100644 include/asm-parisc/fb.h create mode 100644 include/asm-powerpc/fb.h create mode 100644 include/asm-s390/fb.h create mode 100644 include/asm-sh/fb.h create mode 100644 include/asm-sh64/fb.h create mode 100644 include/asm-sparc/fb.h create mode 100644 include/asm-sparc64/fb.h create mode 100644 include/asm-v850/fb.h create mode 100644 include/asm-x86_64/fb.h create mode 100644 include/asm-xtensa/fb.h (limited to 'include') diff --git a/include/asm-alpha/fb.h b/include/asm-alpha/fb.h new file mode 100644 index 00000000000..ca714a4e355 --- /dev/null +++ b/include/asm-alpha/fb.h @@ -0,0 +1,7 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +/* Caching is off in the I/O space quadrant by design. */ +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-arm/fb.h b/include/asm-arm/fb.h new file mode 100644 index 00000000000..4bf5b88d90b --- /dev/null +++ b/include/asm-arm/fb.h @@ -0,0 +1,13 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-arm26/fb.h b/include/asm-arm26/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-arm26/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-avr32/fb.h b/include/asm-avr32/fb.h new file mode 100644 index 00000000000..d22a4a87669 --- /dev/null +++ b/include/asm-avr32/fb.h @@ -0,0 +1,15 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = __pgprot((pgprot_val(vma->vm_page_prot) + & ~_PAGE_CACHABLE) + | (_PAGE_BUFFER | _PAGE_DIRTY)); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-blackfin/fb.h b/include/asm-blackfin/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-blackfin/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-cris/fb.h b/include/asm-cris/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-cris/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-frv/fb.h b/include/asm-frv/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-frv/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-h8300/fb.h b/include/asm-h8300/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-h8300/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-i386/fb.h b/include/asm-i386/fb.h new file mode 100644 index 00000000000..d30073c7558 --- /dev/null +++ b/include/asm-i386/fb.h @@ -0,0 +1,14 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +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; +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-ia64/fb.h b/include/asm-ia64/fb.h new file mode 100644 index 00000000000..9d4577f9fe0 --- /dev/null +++ b/include/asm-ia64/fb.h @@ -0,0 +1,17 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + if (efi_range_is_wc(vma->vm_start, vma->vm_end - vma->vm_start)) + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); + else + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-m32r/fb.h b/include/asm-m32r/fb.h new file mode 100644 index 00000000000..4bf5b88d90b --- /dev/null +++ b/include/asm-m32r/fb.h @@ -0,0 +1,13 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-m68k/fb.h b/include/asm-m68k/fb.h new file mode 100644 index 00000000000..f78bad476b0 --- /dev/null +++ b/include/asm-m68k/fb.h @@ -0,0 +1,28 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include +#include + +#ifdef CONFIG_SUN3 +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; +} +#else +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + if (CPU_IS_020_OR_030) + pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; + if (CPU_IS_040_OR_060) { + pgprot_val(vma->vm_page_prot) &= _CACHEMASK040; + /* Use no-cache mode, serialized */ + pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; + } +} +#endif /* CONFIG_SUN3 */ + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-m68knommu/fb.h b/include/asm-m68knommu/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-m68knommu/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-mips/fb.h b/include/asm-mips/fb.h new file mode 100644 index 00000000000..ac23d96e261 --- /dev/null +++ b/include/asm-mips/fb.h @@ -0,0 +1,13 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-parisc/fb.h b/include/asm-parisc/fb.h new file mode 100644 index 00000000000..d5e47edf532 --- /dev/null +++ b/include/asm-parisc/fb.h @@ -0,0 +1,13 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-powerpc/fb.h b/include/asm-powerpc/fb.h new file mode 100644 index 00000000000..e13d6ebc116 --- /dev/null +++ b/include/asm-powerpc/fb.h @@ -0,0 +1,15 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = phys_mem_access_prot(file, off >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, + vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-s390/fb.h b/include/asm-s390/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-s390/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-sh/fb.h b/include/asm-sh/fb.h new file mode 100644 index 00000000000..4bf5b88d90b --- /dev/null +++ b/include/asm-sh/fb.h @@ -0,0 +1,13 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-sh64/fb.h b/include/asm-sh64/fb.h new file mode 100644 index 00000000000..4bf5b88d90b --- /dev/null +++ b/include/asm-sh64/fb.h @@ -0,0 +1,13 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-sparc/fb.h b/include/asm-sparc/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-sparc/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h new file mode 100644 index 00000000000..8703c707e14 --- /dev/null +++ b/include/asm-sparc64/fb.h @@ -0,0 +1,12 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ +#include +#include + +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-v850/fb.h b/include/asm-v850/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-v850/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-x86_64/fb.h b/include/asm-x86_64/fb.h new file mode 100644 index 00000000000..d30073c7558 --- /dev/null +++ b/include/asm-x86_64/fb.h @@ -0,0 +1,14 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#include +#include + +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; +} + +#endif /* _ASM_FB_H_ */ diff --git a/include/asm-xtensa/fb.h b/include/asm-xtensa/fb.h new file mode 100644 index 00000000000..9f8c88d05df --- /dev/null +++ b/include/asm-xtensa/fb.h @@ -0,0 +1,6 @@ +#ifndef _ASM_FB_H_ +#define _ASM_FB_H_ + +#define fb_pgprotect(...) do {} while (0) + +#endif /* _ASM_FB_H_ */ -- cgit v1.2.3-70-g09d2