From: "Jan Beulich" Subject: [PATCH] x86 linux ioremap adjustment Date: Tue, 24 Jan 2006 17:49:42 +0100 Message-ID: <43D668B6.76F0.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part113389B6.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part113389B6.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline This fixes an incorrect type, and a missing return value check. Jan --=__Part113389B6.0__= Content-Type: text/plain; name="xen-x86-direct-remap.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="xen-x86-direct-remap.patch" Index: head-2006-01-23/arch/xen/i386/mm/ioremap.c =================================================================== --- head-2006-01-23.orig/arch/xen/i386/mm/ioremap.c 2006-01-23 16:39:48.000000000 +0100 +++ head-2006-01-23/arch/xen/i386/mm/ioremap.c 2006-01-24 17:27:56.000000000 +0100 @@ -52,8 +52,8 @@ static int __direct_remap_pfn_range(stru pgprot_t prot, domid_t domid) { - int i, rc; - unsigned long start_address; + int rc; + unsigned long i, start_address; mmu_update_t *u, *v, *w; u = v = w = (mmu_update_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); @@ -93,8 +93,10 @@ static int __direct_remap_pfn_range(stru if (v != u) { /* get the ptep's filled in */ - generic_page_range(mm, start_address, address - start_address, + rc = generic_page_range(mm, start_address, address - start_address, direct_remap_area_pte_fn, &w); + if (rc) + goto out; rc = -EFAULT; if (unlikely(HYPERVISOR_mmu_update(u, v - u, NULL, domid) < 0)) goto out; --=__Part113389B6.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part113389B6.0__=--