Magellan Linux

Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1034-2.6.25-xen-Better-implementation-of-pte-functions.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 606 - (show annotations) (download)
Thu May 22 23:13:13 2008 UTC (15 years, 11 months ago) by niro
File size: 1771 byte(s)
-ver bump to 2.6.25-magellan-r1:
- linux-2.6.25.4
- fbcondecor-0.9.4
- squashfs-3.3
- unionfs-2.3.3
- tuxonice-3.0-rc7
- linux-phc-0.3.0
- acpi-dstd-0.9a
- reiser4
- xen-3.2.0
. ipw3945-1.2.2

1 From 7cff82e458131cb0879de0ccc62f53d1ce80d525 Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@Rawhide-64.localdomain>
3 Date: Tue, 27 Nov 2007 19:26:30 -0200
4 Subject: [PATCH] Better implementation of pte functions
5
6 Signed-off-by: Eduardo Habkost <ehabkost@Rawhide-64.localdomain>
7 ---
8 include/xen/page.h | 22 +++++++++-------------
9 1 files changed, 9 insertions(+), 13 deletions(-)
10
11 diff --git a/include/xen/page.h b/include/xen/page.h
12 index 031ef22..4456566 100644
13 --- a/include/xen/page.h
14 +++ b/include/xen/page.h
15 @@ -143,27 +143,23 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
16
17 static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
18 {
19 - pte_t pte;
20 -
21 - pte.pte_high = (page_nr >> (32 - PAGE_SHIFT)) |
22 - (pgprot_val(pgprot) >> 32);
23 - pte.pte_high &= (__supported_pte_mask >> 32);
24 - pte.pte_low = ((page_nr << PAGE_SHIFT) | pgprot_val(pgprot));
25 - pte.pte_low &= __supported_pte_mask;
26 -
27 - return pte;
28 + pteval_t val;
29 +
30 + val = (page_nr << PAGE_SHIFT) | pgprot_val(pgprot);
31 + val &= __supported_pte_mask;
32 + return native_make_pte(val);
33 }
34
35 -static inline unsigned long long pte_val_ma(pte_t x)
36 +static inline pteval_t pte_val_ma(pte_t x)
37 {
38 - return x.pte;
39 + return native_pte_val(x);
40 }
41 #define pmd_val_ma(v) ((v).pmd)
42 #define pud_val_ma(v) ((v).pgd.pgd)
43 -#define __pte_ma(x) ((pte_t) { .pte = (x) })
44 +#define __pte_ma(x) (native_make_pte(x))
45 #define __pmd_ma(x) ((pmd_t) { (x) } )
46 #else /* !X86_PAE */
47 -#define pte_mfn(_pte) ((_pte).pte_low >> PAGE_SHIFT)
48 +#define pte_mfn(_pte) ((native_pte_val(_pte) & __PHYSICAL_MASK) >> PAGE_SHIFT)
49 #define mfn_pte(pfn, prot) __pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
50 #define pte_val_ma(x) ((x).pte)
51 #define pmd_val_ma(v) ((v).pud.pgd.pgd)
52 --
53 1.5.4.1
54