Skip to contentSkip to conversation

VM_LOCKED in pci_mmap_page_range?

DISCUSSION Jesse Barnes 1 participant 2 messages Nov 19, 2004 – Nov 20, 2004

lore
Share & tools
lore
#0 lore raw

Should pci_mmap_page_range marked the pages as VM_LOCKED that it's about to request be remapped via remap_pfn_range? I'm seeing userspace apps hang on mmaping of /proc/bus/pci unless I remove it.

Thanks,
Jesse

#1 lore raw
Quoted 3 lines · Jesse Barnes

Should pci_mmap_page_range marked the pages as VM_LOCKED that it's about to request be remapped via remap_pfn_range? I'm seeing userspace apps hang on mmaping of /proc/bus/pci unless I remove it.

I just read the thread "loops in get_user_pages() for VM_IO" on lkml and it appears that VM_LOCKED shouldn't be set for IO mappings. Or is this fixed upstream and I haven't updated my tree? If not, then this fixes it for me.

Thanks,
Jesse

===== arch/ia64/pci/pci.c 1.59 vs edited =====

arch/ia64/pci/pci.c +1 -1
@@ -518,7 +518,7 @@
 	 * Leave vm_pgoff as-is, the PCI space address is the physical
 	 * address on this platform.
 	 */
-	vma->vm_flags |= (VM_SHM | VM_LOCKED | VM_IO);
+	vma->vm_flags |= (VM_SHM | VM_RESERVED | VM_IO);
 
 	if (write_combine)
 		vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);