debuggers.hg

view xen/arch/x86/x86_64/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 /* Excerpts written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> */
2 /* Modified for x86-64 Xen by Keir Fraser */
4 #include <xen/config.h>
5 #include <xen/cache.h>
6 #include <asm/page.h>
7 #include <asm/percpu.h>
8 #undef ENTRY
9 #undef ALIGN
11 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
12 OUTPUT_ARCH(i386:x86-64)
13 ENTRY(start)
14 PHDRS
15 {
16 text PT_LOAD ;
17 }
18 SECTIONS
19 {
20 . = __XEN_VIRT_START + 0x100000;
21 _start = .;
22 _stext = .; /* Text and read-only data */
23 .text : {
24 *(.text)
25 *(.fixup)
26 *(.gnu.warning)
27 } :text = 0x9090
29 _etext = .; /* End of text section */
31 .rodata : { *(.rodata) *(.rodata.*) } :text
33 . = ALIGN(32); /* Exception table */
34 __start___ex_table = .;
35 __ex_table : { *(__ex_table) } :text
36 __stop___ex_table = .;
38 . = ALIGN(32); /* Pre-exception table */
39 __start___pre_ex_table = .;
40 __pre_ex_table : { *(__pre_ex_table) } :text
41 __stop___pre_ex_table = .;
43 .data : { /* Data */
44 *(.data)
45 CONSTRUCTORS
46 } :text
48 . = ALIGN(128);
49 .data.read_mostly : { *(.data.read_mostly) } :text
51 . = ALIGN(4096); /* Init code and data */
52 __init_begin = .;
53 _sinittext = .;
54 .init.text : { *(.init.text) } :text
55 _einittext = .;
56 .init.data : { *(.init.data) } :text
57 . = ALIGN(32);
58 __setup_start = .;
59 .init.setup : { *(.init.setup) } :text
60 __setup_end = .;
61 __initcall_start = .;
62 .initcall.init : { *(.initcall1.init) } :text
63 __initcall_end = .;
64 __xsm_initcall_start = .;
65 .xsm_initcall.init : { *(.xsm_initcall.init) } :text
66 __xsm_initcall_end = .;
67 . = ALIGN(PAGE_SIZE);
68 __init_end = .;
70 __per_cpu_shift = PERCPU_SHIFT; /* kdump assist */
71 .data.percpu : {
72 __per_cpu_start = .;
73 *(.data.percpu)
74 . = ALIGN(SMP_CACHE_BYTES);
75 *(.data.percpu.read_mostly)
76 __per_cpu_data_end = .;
77 } :text
78 . = __per_cpu_start + (NR_CPUS << PERCPU_SHIFT);
79 . = ALIGN(PAGE_SIZE);
80 __per_cpu_end = .;
82 __bss_start = .; /* BSS */
83 .bss : {
84 . = ALIGN(STACK_SIZE);
85 *(.bss.stack_aligned)
86 . = ALIGN(PAGE_SIZE);
87 *(.bss.page_aligned)
88 *(.bss)
89 } :text
90 _end = . ;
92 /* Sections to be discarded */
93 /DISCARD/ : {
94 *(.exit.text)
95 *(.exit.data)
96 *(.exitcall.exit)
97 *(.eh_frame)
98 }
100 /* Stabs debugging sections. */
101 .stab 0 : { *(.stab) }
102 .stabstr 0 : { *(.stabstr) }
103 .stab.excl 0 : { *(.stab.excl) }
104 .stab.exclstr 0 : { *(.stab.exclstr) }
105 .stab.index 0 : { *(.stab.index) }
106 .stab.indexstr 0 : { *(.stab.indexstr) }
107 .comment 0 : { *(.comment) }
108 }