[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Paravirtualize mmap handlers of /proc/bus/pci



# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1171839652 25200
# Node ID 5abf33a383cf651acd17156effd807bc5f44ffd2
# Parent  5ad7d9b466eed042418944402120afafb68a8408
[IA64] Paravirtualize mmap handlers of /proc/bus/pci

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/ia64/pci/pci.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)

diff -r 5ad7d9b466ee -r 5abf33a383cf linux-2.6-xen-sparse/arch/ia64/pci/pci.c
--- a/linux-2.6-xen-sparse/arch/ia64/pci/pci.c  Sun Feb 18 15:57:38 2007 -0700
+++ b/linux-2.6-xen-sparse/arch/ia64/pci/pci.c  Sun Feb 18 16:00:52 2007 -0700
@@ -607,6 +607,14 @@ pci_mmap_page_range (struct pci_dev *dev
        else
                vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 
+       if (is_initial_xendomain()) {
+               unsigned long addr = vma->vm_pgoff << PAGE_SHIFT;
+               size_t size = vma->vm_end - vma->vm_start;
+               unsigned long offset = HYPERVISOR_ioremap(addr, size);
+               if (IS_ERR_VALUE(offset))
+                       return offset;
+       }
+
        if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
                             vma->vm_end - vma->vm_start, vma->vm_page_prot))
                return -EAGAIN;
@@ -663,6 +671,14 @@ pci_mmap_legacy_page_range(struct pci_bu
 
        vma->vm_pgoff += (unsigned long)addr >> PAGE_SHIFT;
        vma->vm_page_prot = prot;
+
+       if (is_initial_xendomain()) {
+               unsigned long addr = vma->vm_pgoff << PAGE_SHIFT;
+               size_t size = vma->vm_end - vma->vm_start;
+               unsigned long offset = HYPERVISOR_ioremap(addr, size);
+               if (IS_ERR_VALUE(offset))
+                       return offset;
+       }
 
        if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
                            size, vma->vm_page_prot))

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.