Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 1 | /* |
| 2 | * ld script for the x86 kernel |
| 3 | * |
| 4 | * Historic 32-bit version written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> |
| 5 | * |
Ingo Molnar | 91fd7fe | 2009-04-29 10:58:38 +0200 | [diff] [blame] | 6 | * Modernisation, unification and other changes and fixes: |
| 7 | * Copyright (C) 2007-2009 Sam Ravnborg <sam@ravnborg.org> |
Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 8 | * |
| 9 | * |
| 10 | * Don't define absolute symbols until and unless you know that symbol |
| 11 | * value is should remain constant even if kernel image is relocated |
| 12 | * at run time. Absolute symbols are not relocated. If symbol value should |
| 13 | * change if kernel is relocated, make the symbol section relative and |
| 14 | * put it inside the section definition. |
| 15 | */ |
| 16 | |
| 17 | #ifdef CONFIG_X86_32 |
| 18 | #define LOAD_OFFSET __PAGE_OFFSET |
| 19 | #else |
| 20 | #define LOAD_OFFSET __START_KERNEL_map |
| 21 | #endif |
| 22 | |
| 23 | #include <asm-generic/vmlinux.lds.h> |
| 24 | #include <asm/asm-offsets.h> |
| 25 | #include <asm/thread_info.h> |
| 26 | #include <asm/page_types.h> |
| 27 | #include <asm/cache.h> |
| 28 | #include <asm/boot.h> |
| 29 | |
| 30 | #undef i386 /* in case the preprocessor is a 32bit one */ |
| 31 | |
| 32 | OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) |
| 33 | |
| 34 | #ifdef CONFIG_X86_32 |
| 35 | OUTPUT_ARCH(i386) |
| 36 | ENTRY(phys_startup_32) |
| 37 | jiffies = jiffies_64; |
| 38 | #else |
| 39 | OUTPUT_ARCH(i386:x86-64) |
| 40 | ENTRY(phys_startup_64) |
| 41 | jiffies_64 = jiffies; |
| 42 | #endif |
| 43 | |
Suresh Siddha | 74e0817 | 2009-10-14 14:46:56 -0700 | [diff] [blame^] | 44 | #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA) |
| 45 | |
| 46 | #define X64_ALIGN_DEBUG_RODATA_BEGIN . = ALIGN(HPAGE_SIZE); |
| 47 | |
| 48 | #define X64_ALIGN_DEBUG_RODATA_END \ |
| 49 | . = ALIGN(HPAGE_SIZE); \ |
| 50 | __end_rodata_hpage_align = .; |
| 51 | |
| 52 | #else |
| 53 | |
| 54 | #define X64_ALIGN_DEBUG_RODATA_BEGIN |
| 55 | #define X64_ALIGN_DEBUG_RODATA_END |
| 56 | |
| 57 | #endif |
| 58 | |
Sam Ravnborg | afb8095 | 2009-04-29 09:47:19 +0200 | [diff] [blame] | 59 | PHDRS { |
| 60 | text PT_LOAD FLAGS(5); /* R_E */ |
| 61 | data PT_LOAD FLAGS(7); /* RWE */ |
| 62 | #ifdef CONFIG_X86_64 |
Jan Beulich | 8d0cc63 | 2009-09-04 09:18:07 +0100 | [diff] [blame] | 63 | user PT_LOAD FLAGS(5); /* R_E */ |
Sam Ravnborg | afb8095 | 2009-04-29 09:47:19 +0200 | [diff] [blame] | 64 | #ifdef CONFIG_SMP |
Jan Beulich | 8d0cc63 | 2009-09-04 09:18:07 +0100 | [diff] [blame] | 65 | percpu PT_LOAD FLAGS(6); /* RW_ */ |
Sam Ravnborg | afb8095 | 2009-04-29 09:47:19 +0200 | [diff] [blame] | 66 | #endif |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 67 | init PT_LOAD FLAGS(7); /* RWE */ |
Sam Ravnborg | afb8095 | 2009-04-29 09:47:19 +0200 | [diff] [blame] | 68 | #endif |
| 69 | note PT_NOTE FLAGS(0); /* ___ */ |
| 70 | } |
Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 71 | |
Sam Ravnborg | 444e0ae | 2009-04-29 09:47:20 +0200 | [diff] [blame] | 72 | SECTIONS |
| 73 | { |
| 74 | #ifdef CONFIG_X86_32 |
| 75 | . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR; |
| 76 | phys_startup_32 = startup_32 - LOAD_OFFSET; |
| 77 | #else |
| 78 | . = __START_KERNEL; |
| 79 | phys_startup_64 = startup_64 - LOAD_OFFSET; |
| 80 | #endif |
| 81 | |
Sam Ravnborg | dfc20895 | 2009-04-29 09:47:21 +0200 | [diff] [blame] | 82 | /* Text and read-only data */ |
Sam Ravnborg | dfc20895 | 2009-04-29 09:47:21 +0200 | [diff] [blame] | 83 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
Tim Abbott | 4ae59b9 | 2009-09-16 16:44:28 -0400 | [diff] [blame] | 84 | _text = .; |
| 85 | /* bootstrapping code */ |
| 86 | HEAD_TEXT |
Sam Ravnborg | dfc20895 | 2009-04-29 09:47:21 +0200 | [diff] [blame] | 87 | #ifdef CONFIG_X86_32 |
Sam Ravnborg | dfc20895 | 2009-04-29 09:47:21 +0200 | [diff] [blame] | 88 | . = ALIGN(PAGE_SIZE); |
| 89 | *(.text.page_aligned) |
| 90 | #endif |
| 91 | . = ALIGN(8); |
| 92 | _stext = .; |
| 93 | TEXT_TEXT |
| 94 | SCHED_TEXT |
| 95 | LOCK_TEXT |
| 96 | KPROBES_TEXT |
| 97 | IRQENTRY_TEXT |
| 98 | *(.fixup) |
| 99 | *(.gnu.warning) |
| 100 | /* End of text section */ |
| 101 | _etext = .; |
| 102 | } :text = 0x9090 |
| 103 | |
| 104 | NOTES :text :note |
| 105 | |
Tim Abbott | 123f3e1 | 2009-09-16 16:44:30 -0400 | [diff] [blame] | 106 | EXCEPTION_TABLE(16) :text = 0x9090 |
Sam Ravnborg | 448bc3a | 2009-04-29 09:47:22 +0200 | [diff] [blame] | 107 | |
Suresh Siddha | 74e0817 | 2009-10-14 14:46:56 -0700 | [diff] [blame^] | 108 | X64_ALIGN_DEBUG_RODATA_BEGIN |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 109 | RO_DATA(PAGE_SIZE) |
Suresh Siddha | 74e0817 | 2009-10-14 14:46:56 -0700 | [diff] [blame^] | 110 | X64_ALIGN_DEBUG_RODATA_END |
Sam Ravnborg | 448bc3a | 2009-04-29 09:47:22 +0200 | [diff] [blame] | 111 | |
Sam Ravnborg | 1f6397b | 2009-04-29 09:47:23 +0200 | [diff] [blame] | 112 | /* Data */ |
Sam Ravnborg | 1f6397b | 2009-04-29 09:47:23 +0200 | [diff] [blame] | 113 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
Catalin Marinas | 1260866 | 2009-05-11 13:22:00 +0100 | [diff] [blame] | 114 | /* Start of data section */ |
| 115 | _sdata = .; |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 116 | |
| 117 | /* init_task */ |
| 118 | INIT_TASK_DATA(THREAD_SIZE) |
| 119 | |
| 120 | #ifdef CONFIG_X86_32 |
| 121 | /* 32 bit has nosave before _edata */ |
| 122 | NOSAVE_DATA |
| 123 | #endif |
| 124 | |
| 125 | PAGE_ALIGNED_DATA(PAGE_SIZE) |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 126 | |
| 127 | CACHELINE_ALIGNED_DATA(CONFIG_X86_L1_CACHE_BYTES) |
| 128 | |
Sam Ravnborg | 1f6397b | 2009-04-29 09:47:23 +0200 | [diff] [blame] | 129 | DATA_DATA |
| 130 | CONSTRUCTORS |
Sam Ravnborg | 1f6397b | 2009-04-29 09:47:23 +0200 | [diff] [blame] | 131 | |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 132 | /* rarely changed data like cpu maps */ |
| 133 | READ_MOSTLY_DATA(CONFIG_X86_INTERNODE_CACHE_BYTES) |
Sam Ravnborg | 1f6397b | 2009-04-29 09:47:23 +0200 | [diff] [blame] | 134 | |
Sam Ravnborg | 1f6397b | 2009-04-29 09:47:23 +0200 | [diff] [blame] | 135 | /* End of data section */ |
| 136 | _edata = .; |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 137 | } :data |
Sam Ravnborg | 1f6397b | 2009-04-29 09:47:23 +0200 | [diff] [blame] | 138 | |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 139 | #ifdef CONFIG_X86_64 |
| 140 | |
| 141 | #define VSYSCALL_ADDR (-10*1024*1024) |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 142 | |
Anders Kaseorg | d223246 | 2009-09-16 16:44:26 -0400 | [diff] [blame] | 143 | #define VLOAD_OFFSET (VSYSCALL_ADDR - __vsyscall_0 + LOAD_OFFSET) |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 144 | #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET) |
| 145 | |
Anders Kaseorg | d223246 | 2009-09-16 16:44:26 -0400 | [diff] [blame] | 146 | #define VVIRT_OFFSET (VSYSCALL_ADDR - __vsyscall_0) |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 147 | #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) |
| 148 | |
Anders Kaseorg | d223246 | 2009-09-16 16:44:26 -0400 | [diff] [blame] | 149 | . = ALIGN(4096); |
| 150 | __vsyscall_0 = .; |
| 151 | |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 152 | . = VSYSCALL_ADDR; |
Anders Kaseorg | d223246 | 2009-09-16 16:44:26 -0400 | [diff] [blame] | 153 | .vsyscall_0 : AT(VLOAD(.vsyscall_0)) { |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 154 | *(.vsyscall_0) |
| 155 | } :user |
| 156 | |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 157 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); |
| 158 | .vsyscall_fn : AT(VLOAD(.vsyscall_fn)) { |
| 159 | *(.vsyscall_fn) |
| 160 | } |
| 161 | |
| 162 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); |
| 163 | .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data)) { |
| 164 | *(.vsyscall_gtod_data) |
| 165 | } |
| 166 | |
| 167 | vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data); |
| 168 | .vsyscall_clock : AT(VLOAD(.vsyscall_clock)) { |
| 169 | *(.vsyscall_clock) |
| 170 | } |
| 171 | vsyscall_clock = VVIRT(.vsyscall_clock); |
| 172 | |
| 173 | |
| 174 | .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1)) { |
| 175 | *(.vsyscall_1) |
| 176 | } |
| 177 | .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2)) { |
| 178 | *(.vsyscall_2) |
| 179 | } |
| 180 | |
| 181 | .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) { |
| 182 | *(.vgetcpu_mode) |
| 183 | } |
| 184 | vgetcpu_mode = VVIRT(.vgetcpu_mode); |
| 185 | |
| 186 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); |
| 187 | .jiffies : AT(VLOAD(.jiffies)) { |
| 188 | *(.jiffies) |
| 189 | } |
| 190 | jiffies = VVIRT(.jiffies); |
| 191 | |
| 192 | .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) { |
| 193 | *(.vsyscall_3) |
| 194 | } |
| 195 | |
Anders Kaseorg | d223246 | 2009-09-16 16:44:26 -0400 | [diff] [blame] | 196 | . = __vsyscall_0 + PAGE_SIZE; |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 197 | |
| 198 | #undef VSYSCALL_ADDR |
Sam Ravnborg | ff6f87e | 2009-04-29 09:47:24 +0200 | [diff] [blame] | 199 | #undef VLOAD_OFFSET |
| 200 | #undef VLOAD |
| 201 | #undef VVIRT_OFFSET |
| 202 | #undef VVIRT |
| 203 | |
| 204 | #endif /* CONFIG_X86_64 */ |
Sam Ravnborg | dfc20895 | 2009-04-29 09:47:21 +0200 | [diff] [blame] | 205 | |
Sam Ravnborg | e58bdaa | 2009-04-29 09:47:25 +0200 | [diff] [blame] | 206 | /* Init code and data - will be freed after init */ |
| 207 | . = ALIGN(PAGE_SIZE); |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 208 | .init.begin : AT(ADDR(.init.begin) - LOAD_OFFSET) { |
Ingo Molnar | fd07319 | 2009-04-29 12:56:58 +0200 | [diff] [blame] | 209 | __init_begin = .; /* paired with __init_end */ |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | #if defined(CONFIG_X86_64) && defined(CONFIG_SMP) |
| 213 | /* |
| 214 | * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the |
| 215 | * output PHDR, so the next output section - .init.text - should |
| 216 | * start another segment - init. |
| 217 | */ |
| 218 | PERCPU_VADDR(0, :percpu) |
| 219 | #endif |
| 220 | |
Tim Abbott | 123f3e1 | 2009-09-16 16:44:30 -0400 | [diff] [blame] | 221 | INIT_TEXT_SECTION(PAGE_SIZE) |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 222 | #ifdef CONFIG_X86_64 |
| 223 | :init |
| 224 | #endif |
Sam Ravnborg | e58bdaa | 2009-04-29 09:47:25 +0200 | [diff] [blame] | 225 | |
Tim Abbott | 123f3e1 | 2009-09-16 16:44:30 -0400 | [diff] [blame] | 226 | INIT_DATA_SECTION(16) |
Sam Ravnborg | e58bdaa | 2009-04-29 09:47:25 +0200 | [diff] [blame] | 227 | |
| 228 | .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) { |
| 229 | __x86_cpu_dev_start = .; |
| 230 | *(.x86_cpu_dev.init) |
| 231 | __x86_cpu_dev_end = .; |
| 232 | } |
| 233 | |
Sam Ravnborg | ae61836 | 2009-04-29 09:47:26 +0200 | [diff] [blame] | 234 | . = ALIGN(8); |
| 235 | .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) { |
| 236 | __parainstructions = .; |
| 237 | *(.parainstructions) |
| 238 | __parainstructions_end = .; |
| 239 | } |
| 240 | |
| 241 | . = ALIGN(8); |
| 242 | .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { |
| 243 | __alt_instructions = .; |
| 244 | *(.altinstructions) |
| 245 | __alt_instructions_end = .; |
| 246 | } |
| 247 | |
| 248 | .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) { |
| 249 | *(.altinstr_replacement) |
| 250 | } |
| 251 | |
Sam Ravnborg | bf6a574 | 2009-04-29 09:47:27 +0200 | [diff] [blame] | 252 | /* |
| 253 | * .exit.text is discard at runtime, not link time, to deal with |
| 254 | * references from .altinstructions and .eh_frame |
| 255 | */ |
| 256 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { |
| 257 | EXIT_TEXT |
| 258 | } |
| 259 | |
| 260 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { |
| 261 | EXIT_DATA |
| 262 | } |
| 263 | |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 264 | #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) |
Sam Ravnborg | 9d16e78 | 2009-04-29 09:47:28 +0200 | [diff] [blame] | 265 | PERCPU(PAGE_SIZE) |
| 266 | #endif |
| 267 | |
| 268 | . = ALIGN(PAGE_SIZE); |
Ingo Molnar | fd07319 | 2009-04-29 12:56:58 +0200 | [diff] [blame] | 269 | |
Sam Ravnborg | 9d16e78 | 2009-04-29 09:47:28 +0200 | [diff] [blame] | 270 | /* freed after init ends here */ |
Ingo Molnar | fd07319 | 2009-04-29 12:56:58 +0200 | [diff] [blame] | 271 | .init.end : AT(ADDR(.init.end) - LOAD_OFFSET) { |
| 272 | __init_end = .; |
| 273 | } |
Sam Ravnborg | 9d16e78 | 2009-04-29 09:47:28 +0200 | [diff] [blame] | 274 | |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 275 | /* |
| 276 | * smp_locks might be freed after init |
| 277 | * start/end must be page aligned |
| 278 | */ |
| 279 | . = ALIGN(PAGE_SIZE); |
| 280 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { |
| 281 | __smp_locks = .; |
| 282 | *(.smp_locks) |
| 283 | __smp_locks_end = .; |
| 284 | . = ALIGN(PAGE_SIZE); |
| 285 | } |
| 286 | |
Sam Ravnborg | 9d16e78 | 2009-04-29 09:47:28 +0200 | [diff] [blame] | 287 | #ifdef CONFIG_X86_64 |
| 288 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { |
Jan Beulich | c62e432 | 2009-08-25 14:50:53 +0100 | [diff] [blame] | 289 | NOSAVE_DATA |
| 290 | } |
Sam Ravnborg | 9d16e78 | 2009-04-29 09:47:28 +0200 | [diff] [blame] | 291 | #endif |
| 292 | |
Sam Ravnborg | 091e52c | 2009-04-29 09:47:29 +0200 | [diff] [blame] | 293 | /* BSS */ |
| 294 | . = ALIGN(PAGE_SIZE); |
| 295 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { |
| 296 | __bss_start = .; |
| 297 | *(.bss.page_aligned) |
| 298 | *(.bss) |
| 299 | . = ALIGN(4); |
| 300 | __bss_stop = .; |
| 301 | } |
Sam Ravnborg | 9d16e78 | 2009-04-29 09:47:28 +0200 | [diff] [blame] | 302 | |
Sam Ravnborg | 091e52c | 2009-04-29 09:47:29 +0200 | [diff] [blame] | 303 | . = ALIGN(PAGE_SIZE); |
| 304 | .brk : AT(ADDR(.brk) - LOAD_OFFSET) { |
| 305 | __brk_base = .; |
| 306 | . += 64 * 1024; /* 64k alignment slop space */ |
| 307 | *(.brk_reservation) /* areas brk users have reserved */ |
| 308 | __brk_limit = .; |
| 309 | } |
| 310 | |
| 311 | .end : AT(ADDR(.end) - LOAD_OFFSET) { |
| 312 | _end = .; |
| 313 | } |
| 314 | |
Sam Ravnborg | 444e0ae | 2009-04-29 09:47:20 +0200 | [diff] [blame] | 315 | STABS_DEBUG |
| 316 | DWARF_DEBUG |
Tejun Heo | 023bf6f | 2009-07-09 11:27:40 +0900 | [diff] [blame] | 317 | |
| 318 | /* Sections to be discarded */ |
| 319 | DISCARDS |
| 320 | /DISCARD/ : { *(.eh_frame) } |
Sam Ravnborg | 444e0ae | 2009-04-29 09:47:20 +0200 | [diff] [blame] | 321 | } |
| 322 | |
Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 323 | |
| 324 | #ifdef CONFIG_X86_32 |
H. Peter Anvin | d2ba8b2 | 2009-08-03 14:44:54 -0700 | [diff] [blame] | 325 | . = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE), |
| 326 | "kernel image bigger than KERNEL_IMAGE_SIZE"); |
Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 327 | #else |
| 328 | /* |
| 329 | * Per-cpu symbols which need to be offset from __per_cpu_load |
| 330 | * for the boot processor. |
| 331 | */ |
| 332 | #define INIT_PER_CPU(x) init_per_cpu__##x = per_cpu__##x + __per_cpu_load |
| 333 | INIT_PER_CPU(gdt_page); |
| 334 | INIT_PER_CPU(irq_stack_union); |
| 335 | |
| 336 | /* |
| 337 | * Build-time check on the image size: |
| 338 | */ |
H. Peter Anvin | d2ba8b2 | 2009-08-03 14:44:54 -0700 | [diff] [blame] | 339 | . = ASSERT((_end - _text <= KERNEL_IMAGE_SIZE), |
| 340 | "kernel image bigger than KERNEL_IMAGE_SIZE"); |
Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 341 | |
| 342 | #ifdef CONFIG_SMP |
H. Peter Anvin | d2ba8b2 | 2009-08-03 14:44:54 -0700 | [diff] [blame] | 343 | . = ASSERT((per_cpu__irq_stack_union == 0), |
| 344 | "irq_stack_union is not at start of per-cpu area"); |
Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 345 | #endif |
| 346 | |
| 347 | #endif /* CONFIG_X86_32 */ |
| 348 | |
| 349 | #ifdef CONFIG_KEXEC |
| 350 | #include <asm/kexec.h> |
| 351 | |
H. Peter Anvin | d2ba8b2 | 2009-08-03 14:44:54 -0700 | [diff] [blame] | 352 | . = ASSERT(kexec_control_code_size <= KEXEC_CONTROL_CODE_MAX_SIZE, |
| 353 | "kexec control code size is too big"); |
Sam Ravnborg | 17ce265 | 2009-04-29 09:47:18 +0200 | [diff] [blame] | 354 | #endif |
| 355 | |