/[pkg-src]/trunk/kernel26-xen/patches-2.6.25-r1/1023-2.6.25-xen-x86_64-Make-set_fixmap-a-paravirt-op-on-64-bi.patch |
Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1023-2.6.25-xen-x86_64-Make-set_fixmap-a-paravirt-op-on-64-bi.patch
Parent Directory | Revision Log
Revision 606 -
(show annotations)
(download)
Thu May 22 23:13:13 2008 UTC (16 years ago) by niro
File size: 2173 byte(s)
Thu May 22 23:13:13 2008 UTC (16 years ago) by niro
File size: 2173 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 f53c0ea44f0b4f95c50dd9f3558cf4de7a03fbcd Mon Sep 17 00:00:00 2001 |
2 | From: Eduardo Habkost <ehabkost@redhat.com> |
3 | Date: Mon, 3 Mar 2008 14:36:59 -0300 |
4 | Subject: [PATCH] xen x86_64: Make set_fixmap() a paravirt op on 64-bit |
5 | |
6 | Make set_fixmap() a paravirt op on 64-bit. |
7 | |
8 | This should be unified with 32-bit later. |
9 | |
10 | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> |
11 | --- |
12 | arch/x86/mm/init_64.c | 10 ++++++++-- |
13 | include/asm-x86/fixmap_64.h | 13 +++++++++++-- |
14 | 2 files changed, 19 insertions(+), 4 deletions(-) |
15 | |
16 | diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c |
17 | index 65d2a75..0a0307a 100644 |
18 | --- a/arch/x86/mm/init_64.c |
19 | +++ b/arch/x86/mm/init_64.c |
20 | @@ -209,7 +209,7 @@ void __init cleanup_highmap(void) |
21 | |
22 | /* NOTE: this is meant to be run only at boot */ |
23 | void __init |
24 | -__set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) |
25 | +__native_set_fixmap(enum fixed_addresses idx, pte_t pte) |
26 | { |
27 | unsigned long address = __fix_to_virt(idx); |
28 | |
29 | @@ -217,7 +217,13 @@ __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) |
30 | printk(KERN_ERR "Invalid __set_fixmap\n"); |
31 | return; |
32 | } |
33 | - set_pte_phys(address, phys, prot); |
34 | + set_pte_vaddr(address, pte); |
35 | +} |
36 | + |
37 | +void __init |
38 | +native_set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) |
39 | +{ |
40 | + __native_set_fixmap(idx, pfn_pte(phys >> PAGE_SHIFT, prot)); |
41 | } |
42 | |
43 | static unsigned long __initdata table_start; |
44 | diff --git a/include/asm-x86/fixmap_64.h b/include/asm-x86/fixmap_64.h |
45 | index e205dc0..45beeb1 100644 |
46 | --- a/include/asm-x86/fixmap_64.h |
47 | +++ b/include/asm-x86/fixmap_64.h |
48 | @@ -50,8 +50,17 @@ enum fixed_addresses { |
49 | __end_of_fixed_addresses |
50 | }; |
51 | |
52 | -extern void __set_fixmap (enum fixed_addresses idx, |
53 | - unsigned long phys, pgprot_t flags); |
54 | +void __native_set_fixmap(enum fixed_addresses idx, pte_t pte); |
55 | +void native_set_fixmap(enum fixed_addresses idx, |
56 | + unsigned long phys, pgprot_t flags); |
57 | + |
58 | +#ifndef CONFIG_PARAVIRT |
59 | +static inline void __set_fixmap(enum fixed_addresses idx, |
60 | + unsigned long phys, pgprot_t flags) |
61 | +{ |
62 | + native_set_fixmap(idx, phys, flags); |
63 | +} |
64 | +#endif |
65 | |
66 | #define set_fixmap(idx, phys) \ |
67 | __set_fixmap(idx, phys, PAGE_KERNEL) |
68 | -- |
69 | 1.5.4.1 |
70 |