X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fmem.c;h=9d8dbded270e15310f4444b87864d941b344d94a;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=3274c3a73e6bb80a5fb7db942c64c6b250d7fa12;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 3274c3a73..9d8dbded2 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -31,9 +31,6 @@ # include #endif -#ifdef CONFIG_FB -extern void fbmem_init(void); -#endif #if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR) extern void tapechar_init(void); #endif @@ -86,7 +83,7 @@ static inline int uncached_access(struct file *file, unsigned long addr) * above the IO hole... Ah, and of course, XFree86 doesn't pass * O_SYNC when mapping us to tap IO space. Surprised ? */ - return !page_is_ram(addr); + return !page_is_ram(addr >> PAGE_SHIFT); #else /* * Accessing memory above the top the kernel knows about or through a file pointer @@ -416,7 +413,7 @@ static inline size_t read_zero_pagealigned(char __user * buf, size_t size) if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0) goto out_up; - if (vma->vm_flags & VM_SHARED) + if (vma->vm_flags & (VM_SHARED | VM_HUGETLB)) break; count = vma->vm_end - addr; if (count > size) @@ -730,9 +727,6 @@ static int __init chr_dev_init(void) S_IFCHR | devlist[i].mode, devlist[i].name); } -#if defined (CONFIG_FB) - fbmem_init(); -#endif return 0; }