Magellan Linux

Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1039-2.6.25-xen-x86_64-init-cleanup.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 609 - (show annotations) (download)
Fri May 23 17:35:37 2008 UTC (15 years, 11 months ago) by niro
File size: 2131 byte(s)
-using opensuse xen patchset, updated kernel configs

1 From: jbeulich@novell.com
2 Subject: miscellaneous initialization code cleanup
3 Patch-mainline: obsolete
4
5 Index: head-2008-03-06/arch/x86/kernel/head_64-xen.S
6 ===================================================================
7 --- head-2008-03-06.orig/arch/x86/kernel/head_64-xen.S 2008-03-06 16:35:33.000000000 +0100
8 +++ head-2008-03-06/arch/x86/kernel/head_64-xen.S 2008-03-06 10:52:49.000000000 +0100
9 @@ -52,7 +52,6 @@ ENTRY(name)
10
11 NEXT_PAGE(init_level4_pgt)
12 .fill 512,8,0
13 -NEXT_PAGE(init_level4_user_pgt)
14 /*
15 * We update two pgd entries to make kernel and user pgd consistent
16 * at pgd_populate(). It can be used for kernel modules. So we place
17 Index: head-2008-03-06/arch/x86/mm/init_64-xen.c
18 ===================================================================
19 --- head-2008-03-06.orig/arch/x86/mm/init_64-xen.c 2008-03-06 17:07:38.000000000 +0100
20 +++ head-2008-03-06/arch/x86/mm/init_64-xen.c 2008-03-06 17:18:46.000000000 +0100
21 @@ -60,6 +60,8 @@ unsigned int __kernel_page_user;
22 EXPORT_SYMBOL(__kernel_page_user);
23 #endif
24
25 +int after_bootmem;
26 +
27 extern unsigned long *contiguous_bitmap;
28
29 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
30 @@ -102,6 +104,11 @@ void __meminit early_make_page_readonly(
31 if (xen_feature(feature))
32 return;
33
34 + if (after_bootmem) {
35 + make_page_readonly(va, feature);
36 + return;
37 + }
38 +
39 addr = (unsigned long) page[pgd_index(_va)];
40 addr_to_page(addr, page);
41
42 @@ -236,7 +243,6 @@ void show_mem(void)
43
44 static unsigned long __meminitdata table_start;
45 static unsigned long __meminitdata table_end;
46 -int after_bootmem;
47
48 static __init void *spp_getpage(void)
49 {
50 @@ -557,9 +563,9 @@ phys_pmd_init(pmd_t *pmd_page, unsigned
51 for (k = 0; k < PTRS_PER_PTE; pte++, k++, address += PTE_SIZE) {
52 unsigned long pteval = address | _PAGE_NX | _KERNPG_TABLE;
53
54 - if ((address >= end) ||
55 - ((address >> PAGE_SHIFT) >=
56 - xen_start_info->nr_pages))
57 + if (address >= (after_bootmem
58 + ? end
59 + : xen_start_info->nr_pages << PAGE_SHIFT))
60 pteval = 0;
61 else if (make_readonly(address))
62 pteval &= ~_PAGE_RW;