From: Jarod Wilson <jwilson@redhat.com> Date: Tue, 7 Aug 2007 12:01:31 -0400 Subject: [ia64] ioremap: allow cacheable mmaps of legacy_mem Message-id: 46B8975B.4070309@redhat.com O-Subject: [RHEL5.1 PATCH 4/5] ia64: validate and remap mmap requests Bugzilla: 240006 This is a multi-part message in MIME format. Allow cacheable mmaps of legacy_mem. [PATCH] ia64: allow WB /sys/.../legacy_mem mmaps Allow cacheable mmaps of legacy_mem if WB access is supported for the region. The "legacy_mem" file often contains a shadow option ROM, and some versions of X depend on this. Tim Yamin <plasm@roo.me.uk> reported that this change fixes X on a Dell PowerEdge 3250. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> -- Jarod Wilson jwilson@redhat.com [PATCH] ia64: allow WB /sys/.../legacy_mem mmaps Allow cacheable mmaps of legacy_mem if WB access is supported for the region. The "legacy_mem" file often contains a shadow option ROM, and some versions of X depend on this. Tim Yamin <plasm@roo.me.uk> reported that this change fixes X on a Dell PowerEdge 3250. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Steven Rostedt <srostedt@redhat.com> diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 0d38f22..bdb3bfa 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -665,8 +665,6 @@ pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma) return -EINVAL; prot = phys_mem_access_prot(NULL, vma->vm_pgoff, size, vma->vm_page_prot); - if (pgprot_val(prot) != pgprot_val(pgprot_noncached(vma->vm_page_prot))) - return -EINVAL; addr = pci_get_legacy_mem(bus); if (IS_ERR(addr))