debuggers.hg

view xen/arch/x86/x86_32/xen.lds.S @ 19964:3952eaeb70b0

Introduce and use a per-CPU read-mostly sub-section

Since mixing data that only gets setup once and then (perhaps
frequently) gets read by remote CPUs with data that the local CPU may
modify (again, perhaps frequently) still causes undesirable cache
protocol related bus traffic, separate the former class of objects
from the latter.

These objects converted here are just picked based on their write-once
(or write-very-rarely) properties; perhaps some more adjustments may
be desirable subsequently. The primary users of the new sub-section
will result from the next patch.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 13 11:32:41 2009 +0100 (2009-07-13)
parents 3fc7d4115d6c
children
line source
1 /* ld script to make i386 Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
3 * Modified for i386 Xen by Keir Fraser
4 */
6 #include <xen/config.h>
7 #include <xen/cache.h>
8 #include <asm/page.h>
9 #include <asm/percpu.h>
10 #undef ENTRY
11 #undef ALIGN
13 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
14 OUTPUT_ARCH(i386)
15 ENTRY(start)
16 PHDRS
17 {
18 text PT_LOAD ;
19 }
20 SECTIONS
21 {
22 . = 0xFF000000 + 0x100000;
23 _start = .;
24 _stext = .; /* Text and read-only data */
25 .text : {
26 *(.text)
27 *(.fixup)
28 *(.gnu.warning)
29 } :text =0x9090
31 _etext = .; /* End of text section */
33 .rodata : { *(.rodata) *(.rodata.*) } :text
35 . = ALIGN(32); /* Exception table */
36 __start___ex_table = .;
37 __ex_table : { *(__ex_table) } :text
38 __stop___ex_table = .;
40 . = ALIGN(32); /* Pre-exception table */
41 __start___pre_ex_table = .;
42 __pre_ex_table : { *(__pre_ex_table) } :text
43 __stop___pre_ex_table = .;
45 .data : { /* Data */
46 *(.data)
47 CONSTRUCTORS
48 } :text
50 . = ALIGN(128);
51 .data.read_mostly : { *(.data.read_mostly) } :text
53 . = ALIGN(4096); /* Init code and data */
54 __init_begin = .;
55 _sinittext = .;
56 .init.text : { *(.init.text) } :text
57 _einittext = .;
58 .init.data : { *(.init.data) } :text
59 . = ALIGN(32);
60 __setup_start = .;
61 .init.setup : { *(.init.setup) } :text
62 __setup_end = .;
63 __initcall_start = .;
64 .initcall.init : { *(.initcall1.init) } :text
65 __initcall_end = .;
66 __xsm_initcall_start = .;
67 .xsm_initcall.init : { *(.xsm_initcall.init) } :text
68 __xsm_initcall_end = .;
69 . = ALIGN(PAGE_SIZE);
70 __init_end = .;
72 __per_cpu_shift = PERCPU_SHIFT; /* kdump assist */
73 .data.percpu : {
74 __per_cpu_start = .;
75 *(.data.percpu)
76 . = ALIGN(SMP_CACHE_BYTES);
77 *(.data.percpu.read_mostly)
78 __per_cpu_data_end = .;
79 } :text
80 . = __per_cpu_start + (NR_CPUS << PERCPU_SHIFT);
81 . = ALIGN(PAGE_SIZE);
82 __per_cpu_end = .;
84 __bss_start = .; /* BSS */
85 .bss : {
86 . = ALIGN(STACK_SIZE);
87 *(.bss.stack_aligned)
88 . = ALIGN(PAGE_SIZE);
89 *(.bss.page_aligned)
90 *(.bss)
91 } :text
92 _end = . ;
94 /* Sections to be discarded */
95 /DISCARD/ : {
96 *(.exit.text)
97 *(.exit.data)
98 *(.exitcall.exit)
99 *(.eh_frame)
100 }
102 /* Stabs debugging sections. */
103 .stab 0 : { *(.stab) }
104 .stabstr 0 : { *(.stabstr) }
105 .stab.excl 0 : { *(.stab.excl) }
106 .stab.exclstr 0 : { *(.stab.exclstr) }
107 .stab.index 0 : { *(.stab.index) }
108 .stab.indexstr 0 : { *(.stab.indexstr) }
109 .comment 0 : { *(.comment) }
110 }