]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/xen3-patch-2.6.27.11-12
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / xen3-patch-2.6.27.11-12
1 From: Greg Kroah-Hartman <gregkh@suse.de>
2 Subject: Linux 2.6.27.12
3
4 Upstream 2.6.27.12 release from kernel.org
5
6 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
7
8 Automatically created from "patches.kernel.org/patch-2.6.27.11-12" by xen-port-patches.py
9
10 --- sle11-2009-02-16.orig/arch/x86/kernel/head64-xen.c 2009-02-16 16:33:55.000000000 +0100
11 +++ sle11-2009-02-16/arch/x86/kernel/head64-xen.c 2009-02-16 16:49:32.000000000 +0100
12 @@ -33,7 +33,7 @@
13 #include <asm/bios_ebda.h>
14
15 /* boot cpu pda */
16 -static struct x8664_pda _boot_cpu_pda __read_mostly;
17 +static struct x8664_pda _boot_cpu_pda;
18
19 #ifdef CONFIG_SMP
20 /*
21 --- sle11-2009-02-16.orig/arch/x86/mm/fault-xen.c 2009-02-16 16:33:55.000000000 +0100
22 +++ sle11-2009-02-16/arch/x86/mm/fault-xen.c 2009-02-16 16:49:32.000000000 +0100
23 @@ -547,9 +547,7 @@ static int vmalloc_fault(unsigned long a
24 happen within a race in page table update. In the later
25 case just flush. */
26
27 - /* On Xen the line below does not always work. Needs investigating! */
28 - /*pgd = pgd_offset(current->mm ?: &init_mm, address);*/
29 - pgd = __va(read_cr3() & PHYSICAL_PAGE_MASK);
30 + pgd = pgd_offset(current->active_mm, address);
31 pgd += pgd_index(address);
32 pgd_ref = pgd_offset_k(address);
33 if (pgd_none(*pgd_ref))
34 --- sle11-2009-02-16.orig/arch/x86/mm/init_32-xen.c 2009-02-17 17:30:22.000000000 +0100
35 +++ sle11-2009-02-16/arch/x86/mm/init_32-xen.c 2009-02-17 18:05:41.000000000 +0100
36 @@ -768,7 +768,7 @@ static unsigned long __init extend_init_
37 return start_pfn;
38 }
39
40 -static void __init find_early_table_space(unsigned long end)
41 +static void __init find_early_table_space(unsigned long end, int use_pse)
42 {
43 unsigned long puds, pmds, ptes, tables;
44
45 @@ -778,7 +778,7 @@ static void __init find_early_table_spac
46 pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
47 tables += PAGE_ALIGN(pmds * sizeof(pmd_t));
48
49 - if (cpu_has_pse) {
50 + if (use_pse) {
51 unsigned long extra;
52
53 extra = end - ((end>>PMD_SHIFT) << PMD_SHIFT);
54 @@ -811,12 +811,22 @@ unsigned long __init_refok init_memory_m
55 pgd_t *pgd_base = swapper_pg_dir;
56 unsigned long start_pfn, end_pfn;
57 unsigned long big_page_start;
58 +#ifdef CONFIG_DEBUG_PAGEALLOC
59 + /*
60 + * For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages.
61 + * This will simplify cpa(), which otherwise needs to support splitting
62 + * large pages into small in interrupt context, etc.
63 + */
64 + int use_pse = 0;
65 +#else
66 + int use_pse = cpu_has_pse;
67 +#endif
68
69 /*
70 * Find space for the kernel direct mapping tables.
71 */
72 if (!after_init_bootmem)
73 - find_early_table_space(end);
74 + find_early_table_space(end, use_pse);
75
76 #ifdef CONFIG_X86_PAE
77 set_nx();
78 @@ -862,7 +872,7 @@ unsigned long __init_refok init_memory_m
79 end_pfn = (end>>PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
80 if (start_pfn < end_pfn)
81 kernel_physical_mapping_init(pgd_base, start_pfn, end_pfn,
82 - cpu_has_pse);
83 + use_pse);
84
85 /* tail is not big page alignment ? */
86 start_pfn = end_pfn;
87 --- sle11-2009-02-16.orig/arch/x86/mm/init_64-xen.c 2009-02-16 16:49:27.000000000 +0100
88 +++ sle11-2009-02-16/arch/x86/mm/init_64-xen.c 2009-02-17 18:05:39.000000000 +0100
89 @@ -646,7 +646,8 @@ void __init xen_init_pt(void)
90 }
91 }
92
93 -static void __init find_early_table_space(unsigned long end)
94 +static void __init find_early_table_space(unsigned long end, int use_pse,
95 + int use_gbpages)
96 {
97 unsigned long puds, pmds, ptes, tables;
98
99 @@ -823,6 +824,7 @@ unsigned long __init_refok init_memory_m
100
101 struct map_range mr[NR_RANGE_MR];
102 int nr_range, i;
103 + int use_pse, use_gbpages;
104
105 printk(KERN_INFO "init_memory_mapping\n");
106
107 @@ -836,9 +838,21 @@ unsigned long __init_refok init_memory_m
108 if (!after_bootmem)
109 init_gbpages();
110
111 - if (direct_gbpages)
112 +#ifdef CONFIG_DEBUG_PAGEALLOC
113 + /*
114 + * For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages.
115 + * This will simplify cpa(), which otherwise needs to support splitting
116 + * large pages into small in interrupt context, etc.
117 + */
118 + use_pse = use_gbpages = 0;
119 +#else
120 + use_pse = cpu_has_pse;
121 + use_gbpages = direct_gbpages;
122 +#endif
123 +
124 + if (use_gbpages)
125 page_size_mask |= 1 << PG_LEVEL_1G;
126 - if (cpu_has_pse)
127 + if (use_pse)
128 page_size_mask |= 1 << PG_LEVEL_2M;
129
130 memset(mr, 0, sizeof(mr));
131 @@ -899,7 +913,7 @@ unsigned long __init_refok init_memory_m
132 (mr[i].page_size_mask & (1<<PG_LEVEL_2M))?"2M":"4k"));
133
134 if (!after_bootmem)
135 - find_early_table_space(end);
136 + find_early_table_space(end, use_pse, use_gbpages);
137
138 if (!start) {
139 unsigned long addr, va = __START_KERNEL_map;