1 From: Greg Kroah-Hartman <gregkh@suse.de>
2 Subject: Linux 2.6.27.12
4 Upstream 2.6.27.12 release from kernel.org
6 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 Automatically created from "patches.kernel.org/patch-2.6.27.11-12" by xen-port-patches.py
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
13 #include <asm/bios_ebda.h>
16 -static struct x8664_pda _boot_cpu_pda __read_mostly;
17 +static struct x8664_pda _boot_cpu_pda;
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
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_
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)
43 unsigned long puds, pmds, ptes, tables;
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));
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
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.
66 + int use_pse = cpu_has_pse;
70 * Find space for the kernel direct mapping tables.
72 if (!after_init_bootmem)
73 - find_early_table_space(end);
74 + find_early_table_space(end, use_pse);
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,
85 /* tail is not big page alignment ? */
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)
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,
97 unsigned long puds, pmds, ptes, tables;
99 @@ -823,6 +824,7 @@ unsigned long __init_refok init_memory_m
101 struct map_range mr[NR_RANGE_MR];
103 + int use_pse, use_gbpages;
105 printk(KERN_INFO "init_memory_mapping\n");
107 @@ -836,9 +838,21 @@ unsigned long __init_refok init_memory_m
111 - if (direct_gbpages)
112 +#ifdef CONFIG_DEBUG_PAGEALLOC
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.
118 + use_pse = use_gbpages = 0;
120 + use_pse = cpu_has_pse;
121 + use_gbpages = direct_gbpages;
125 page_size_mask |= 1 << PG_LEVEL_1G;
128 page_size_mask |= 1 << PG_LEVEL_2M;
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"));
135 - find_early_table_space(end);
136 + find_early_table_space(end, use_pse, use_gbpages);
139 unsigned long addr, va = __START_KERNEL_map;