WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [LINUX] Replace pagetable walks by simple

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] Replace pagetable walks by simple address calculation.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Jun 2006 15:40:51 +0000
Delivery-date: Fri, 30 Jun 2006 08:46:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 129ce4f59b6dc8e2406a13a058ef393894ff355f
# Parent  a75c1bdfe76146ad591574d805be5be0a3098d2a
[LINUX] Replace pagetable walks by simple address calculation.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)

diff -r a75c1bdfe761 -r 129ce4f59b6d 
linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c    Fri Jun 30 10:24:14 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c    Fri Jun 30 10:35:54 
2006 +0100
@@ -271,10 +271,6 @@ int xen_create_contiguous_region(
 int xen_create_contiguous_region(
        unsigned long vstart, unsigned int order, unsigned int address_bits)
 {
-       pgd_t         *pgd; 
-       pud_t         *pud; 
-       pmd_t         *pmd;
-       pte_t         *pte;
        unsigned long *in_frames = discontig_frames, out_frame;
        unsigned long  frame, i, flags;
        long           rc;
@@ -313,11 +309,7 @@ int xen_create_contiguous_region(
 
        /* 1. Zap current PTEs, remembering MFNs. */
        for (i = 0; i < (1UL<<order); i++) {
-               pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
-               pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
-               pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
-               pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
-               in_frames[i] = pte_mfn(*pte);
+               in_frames[i] = pfn_to_mfn((__pa(vstart) >> PAGE_SHIFT) + i);
                if (HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE),
                                                 __pte_ma(0), 0))
                        BUG();
@@ -372,10 +364,6 @@ int xen_create_contiguous_region(
 
 void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
 {
-       pgd_t         *pgd; 
-       pud_t         *pud; 
-       pmd_t         *pmd;
-       pte_t         *pte;
        unsigned long *out_frames = discontig_frames, in_frame;
        unsigned long  frame, i, flags;
        long           rc;
@@ -410,11 +398,7 @@ void xen_destroy_contiguous_region(unsig
        contiguous_bitmap_clear(__pa(vstart) >> PAGE_SHIFT, 1UL << order);
 
        /* 1. Find start MFN of contiguous extent. */
-       pgd = pgd_offset_k(vstart);
-       pud = pud_offset(pgd, vstart);
-       pmd = pmd_offset(pud, vstart);
-       pte = pte_offset_kernel(pmd, vstart);
-       in_frame = pte_mfn(*pte);
+       in_frame = pfn_to_mfn(__pa(vstart) >> PAGE_SHIFT);
 
        /* 2. Zap current PTEs. */
        for (i = 0; i < (1UL<<order); i++) {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LINUX] Replace pagetable walks by simple address calculation., Xen patchbot-unstable <=