Magellan Linux

Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1107-2.6.25-xen-pgd_walk-accept-start-parameter.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 606 - (show annotations) (download)
Thu May 22 23:13:13 2008 UTC (16 years, 1 month ago) by niro
File size: 2326 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 f5108a0d7cacbf6f2e76d9bb08f4b0ec2db18fe3 Mon Sep 17 00:00:00 2001
2 From: Eduardo Habkost <ehabkost@redhat.com>
3 Date: Mon, 7 Jan 2008 19:15:35 -0200
4 Subject: [PATCH] xen pgd_walk: accept 'start' parameter
5
6 Change usage of pgd_walk() to work under x86_64 also.
7
8 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
9 ---
10 arch/x86/xen/mmu.c | 23 +++++++++++++++++------
11 1 files changed, 17 insertions(+), 6 deletions(-)
12
13 diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
14 index 4f8ab26..eaf9652 100644
15 --- a/arch/x86/xen/mmu.c
16 +++ b/arch/x86/xen/mmu.c
17 @@ -349,16 +349,17 @@ void xen_set_pte(pte_t *ptep, pte_t pte)
18 there, because then we start getting into Xen's ptes.
19 */
20 static int pgd_walk(pgd_t *pgd_base, int (*func)(struct page *, enum pt_level),
21 - unsigned long limit)
22 + unsigned long start, unsigned long limit)
23 {
24 - pgd_t *pgd = pgd_base;
25 + pgd_t *pgd;
26 int flush = 0;
27 - unsigned long addr = 0;
28 + unsigned long addr = start;
29 unsigned long pgd_next;
30
31 if (xen_feature(XENFEAT_auto_translated_physmap))
32 return 0;
33
34 + pgd = pgd_base + pgd_index(addr);
35 for (; addr != limit; pgd++, addr = pgd_next) {
36 pud_t *pud;
37 unsigned long pud_limit, pud_next;
38 @@ -486,7 +487,7 @@ void xen_pgd_pin(pgd_t *pgd)
39
40 xen_mc_batch();
41
42 - if (pgd_walk(pgd, pin_page, TASK_SIZE)) {
43 + if (pgd_walk(pgd, pin_page, 0, TASK_SIZE)) {
44 /* re-enable interrupts for kmap_flush_unused */
45 xen_mc_issue(0);
46 kmap_flush_unused();
47 @@ -513,9 +514,19 @@ static __init int mark_pinned(struct page *page, enum pt_level level)
48 return 0;
49 }
50
51 +/* Addresses that will be walked on xen_mark_init_mm_pinned()
52 + */
53 +#ifdef CONFIG_X86_32
54 +# define INIT_MM_WALK_BEGIN 0
55 +# define INIT_MM_WALK_END FIXADDR_TOP
56 +#else
57 +# define INIT_MM_WALK_BEGIN __START_KERNEL_map
58 +# define INIT_MM_WALK_END (__START_KERNEL_map + PGDIR_SIZE)
59 +#endif
60 +
61 void __init xen_mark_init_mm_pinned(void)
62 {
63 - pgd_walk(init_mm.pgd, mark_pinned, FIXADDR_TOP);
64 + pgd_walk(init_mm.pgd, mark_pinned, INIT_MM_WALK_BEGIN, INIT_MM_WALK_END);
65 }
66
67 static int unpin_page(struct page *page, enum pt_level level)
68 @@ -556,7 +567,7 @@ static void xen_pgd_unpin(pgd_t *pgd)
69
70 xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd)));
71
72 - pgd_walk(pgd, unpin_page, TASK_SIZE);
73 + pgd_walk(pgd, unpin_page, 0, TASK_SIZE);
74
75 xen_mc_issue(0);
76 }
77 --
78 1.5.4.1
79