Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1040-2.6.25-xen-Chainsaw-style-ifdefs.patch
Parent Directory | Revision Log
Revision 606 -
(show annotations)
(download)
Thu May 22 23:13:13 2008 UTC (16 years, 4 months ago) by niro
File size: 2439 byte(s)
Thu May 22 23:13:13 2008 UTC (16 years, 4 months ago) by niro
File size: 2439 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 d6eafd290268507d0d004f75d96c5912fb3336b3 Mon Sep 17 00:00:00 2001 |
2 | From: Eduardo Habkost <ehabkost@redhat.com> |
3 | Date: Wed, 28 Nov 2007 12:21:33 -0200 |
4 | Subject: [PATCH] Chainsaw-style #ifdefs |
5 | |
6 | Whee! |
7 | |
8 | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> |
9 | --- |
10 | arch/x86/xen/enlighten.c | 8 ++++++++ |
11 | arch/x86/xen/setup.c | 5 +++++ |
12 | 2 files changed, 13 insertions(+), 0 deletions(-) |
13 | |
14 | diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c |
15 | index 8f51827..4b8ebb8 100644 |
16 | --- a/arch/x86/xen/enlighten.c |
17 | +++ b/arch/x86/xen/enlighten.c |
18 | @@ -1204,6 +1204,7 @@ static const struct machine_ops __initdata xen_machine_ops = { |
19 | }; |
20 | |
21 | |
22 | +#ifdef CONFIG_X86_32 |
23 | static void __init xen_reserve_top(void) |
24 | { |
25 | unsigned long top = HYPERVISOR_VIRT_START; |
26 | @@ -1214,6 +1215,9 @@ static void __init xen_reserve_top(void) |
27 | |
28 | reserve_top_address(-top + 2 * PAGE_SIZE); |
29 | } |
30 | +#else |
31 | +#define xen_reserve_top() do { } while (0) |
32 | +#endif |
33 | |
34 | /* First C function to be called on Xen boot */ |
35 | asmlinkage void __init xen_start_kernel(void) |
36 | @@ -1248,7 +1252,9 @@ asmlinkage void __init xen_start_kernel(void) |
37 | |
38 | pgd = (pgd_t *)xen_start_info->pt_base; |
39 | |
40 | +#ifdef CONFIG_X86_32 |
41 | init_pg_tables_end = __pa(pgd) + xen_start_info->nr_pt_frames*PAGE_SIZE; |
42 | +#endif |
43 | |
44 | init_mm.pgd = pgd; /* use the Xen pagetables to start */ |
45 | |
46 | @@ -1268,10 +1274,12 @@ asmlinkage void __init xen_start_kernel(void) |
47 | /* set the limit of our address space */ |
48 | xen_reserve_top(); |
49 | |
50 | +#ifdef CONFIG_X86_32 |
51 | /* set up basic CPUID stuff */ |
52 | cpu_detect(&new_cpu_data); |
53 | new_cpu_data.hard_math = 1; |
54 | new_cpu_data.x86_capability[0] = cpuid_edx(1); |
55 | +#endif |
56 | |
57 | /* Poke various useful things into boot_params */ |
58 | boot_params.hdr.type_of_loader = (9 << 4) | 0; |
59 | diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c |
60 | index d42586d..7b66f26 100644 |
61 | --- a/arch/x86/xen/setup.c |
62 | +++ b/arch/x86/xen/setup.c |
63 | @@ -8,6 +8,7 @@ |
64 | #include <linux/sched.h> |
65 | #include <linux/mm.h> |
66 | #include <linux/pm.h> |
67 | +#include <linux/pfn.h> |
68 | |
69 | #include <asm/elf.h> |
70 | #include <asm/vdso.h> |
71 | @@ -62,6 +63,7 @@ static void xen_idle(void) |
72 | } |
73 | } |
74 | |
75 | +#ifdef CONFIG_X86_32 |
76 | /* |
77 | * Set the bit indicating "nosegneg" library variants should be used. |
78 | */ |
79 | @@ -71,6 +73,9 @@ static void __init fiddle_vdso(void) |
80 | u32 *mask = VDSO32_SYMBOL(&vdso32_default_start, NOTE_MASK); |
81 | *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; |
82 | } |
83 | +#else |
84 | +#define fiddle_vdso() do { } while (0) |
85 | +#endif |
86 | |
87 | void __init xen_arch_setup(void) |
88 | { |
89 | -- |
90 | 1.5.4.1 |
91 |