use generic_access_phys for /dev/mem mappings
authorRik van Riel <riel@redhat.com>
Thu, 24 Jul 2008 04:27:07 +0000 (21:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:15 +0000 (10:47 -0700)
Use generic_access_phys as the access_process_vm access function for
/dev/mem mappings.  This makes it possible to debug the X server.

[akpm@linux-foundation.org: repair all the architectures which broke]
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Benjamin Herrensmidt <benh@kernel.crashing.org>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/pci/i386.c
drivers/char/mem.c

index 2aafb67dc5f1df254de17ff64a1523283c341f32..a09505806b82d36927d754649039480a66fc526c 100644 (file)
@@ -280,6 +280,7 @@ static void pci_track_mmap_page_range(struct vm_area_struct *vma)
 static struct vm_operations_struct pci_mmap_ops = {
        .open  = pci_track_mmap_page_range,
        .close = pci_unmap_page_range,
+       .access = generic_access_phys,
 };
 
 int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
index c2dba82eb5f7fa82bdb874b17f605ab01f80fb1f..672b08e694d05cd041e8a3bbac17264f3ca2fb4e 100644 (file)
@@ -327,7 +327,10 @@ static void mmap_mem_close(struct vm_area_struct *vma)
 
 static struct vm_operations_struct mmap_mem_ops = {
        .open  = mmap_mem_open,
-       .close = mmap_mem_close
+       .close = mmap_mem_close,
+#ifdef CONFIG_HAVE_IOREMAP_PROT
+       .access = generic_access_phys
+#endif
 };
 
 static int mmap_mem(struct file * file, struct vm_area_struct * vma)