aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/vmlinux.lds.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-01-18 22:21:28 -0500
committerTejun Heo <tj@kernel.org>2009-01-19 22:29:20 -0500
commit6b7c38d55587f43bcd2cbce3a98b1c0826982090 (patch)
tree63de0468a7bb17b3a6e3c130aeee709ca0fb4602 /include/asm-generic/vmlinux.lds.h
parent0d974d4592708f85044751817da4b7016e1b0602 (diff)
linker script: kill PERCPU_VADDR_PREALLOC()
Impact: cleanup With .data.percpu.first in place, PERCPU_VADDR_PREALLOC() is no longer necessary. Kill it. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r--include/asm-generic/vmlinux.lds.h45
1 files changed, 8 insertions, 37 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 32bbf50d3055..53e21f36a802 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -430,22 +430,10 @@
430 *(.initcall7.init) \ 430 *(.initcall7.init) \
431 *(.initcall7s.init) 431 *(.initcall7s.init)
432 432
433#define PERCPU_PROLOG(vaddr) \
434 VMLINUX_SYMBOL(__per_cpu_load) = .; \
435 .data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
436 - LOAD_OFFSET) { \
437 VMLINUX_SYMBOL(__per_cpu_start) = .;
438
439#define PERCPU_EPILOG(phdr) \
440 VMLINUX_SYMBOL(__per_cpu_end) = .; \
441 } phdr \
442 . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data.percpu);
443
444/** 433/**
445 * PERCPU_VADDR_PREALLOC - define output section for percpu area with prealloc 434 * PERCPU_VADDR - define output section for percpu area
446 * @vaddr: explicit base address (optional) 435 * @vaddr: explicit base address (optional)
447 * @phdr: destination PHDR (optional) 436 * @phdr: destination PHDR (optional)
448 * @prealloc: the size of prealloc area
449 * 437 *
450 * Macro which expands to output section for percpu area. If @vaddr 438 * Macro which expands to output section for percpu area. If @vaddr
451 * is not blank, it specifies explicit base address and all percpu 439 * is not blank, it specifies explicit base address and all percpu
@@ -457,40 +445,23 @@
457 * section in the linker script will go there too. @phdr should have 445 * section in the linker script will go there too. @phdr should have
458 * a leading colon. 446 * a leading colon.
459 * 447 *
460 * If @prealloc is non-zero, the specified number of bytes will be
461 * reserved at the start of percpu area. As the prealloc area is
462 * likely to break alignment, this macro puts areas in increasing
463 * alignment order.
464 *
465 * This macro defines three symbols, __per_cpu_load, __per_cpu_start 448 * This macro defines three symbols, __per_cpu_load, __per_cpu_start
466 * and __per_cpu_end. The first one is the vaddr of loaded percpu 449 * and __per_cpu_end. The first one is the vaddr of loaded percpu
467 * init data. __per_cpu_start equals @vaddr and __per_cpu_end is the 450 * init data. __per_cpu_start equals @vaddr and __per_cpu_end is the
468 * end offset. 451 * end offset.
469 */ 452 */
470#define PERCPU_VADDR_PREALLOC(vaddr, segment, prealloc) \
471 PERCPU_PROLOG(vaddr) \
472 . += prealloc; \
473 *(.data.percpu) \
474 *(.data.percpu.shared_aligned) \
475 *(.data.percpu.page_aligned) \
476 PERCPU_EPILOG(segment)
477
478/**
479 * PERCPU_VADDR - define output section for percpu area
480 * @vaddr: explicit base address (optional)
481 * @phdr: destination PHDR (optional)
482 *
483 * Macro which expands to output section for percpu area. Mostly
484 * identical to PERCPU_VADDR_PREALLOC(@vaddr, @phdr, 0) other than
485 * using slighly different layout.
486 */
487#define PERCPU_VADDR(vaddr, phdr) \ 453#define PERCPU_VADDR(vaddr, phdr) \
488 PERCPU_PROLOG(vaddr) \ 454 VMLINUX_SYMBOL(__per_cpu_load) = .; \
455 .data.percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
456 - LOAD_OFFSET) { \
457 VMLINUX_SYMBOL(__per_cpu_start) = .; \
489 *(.data.percpu.first) \ 458 *(.data.percpu.first) \
490 *(.data.percpu.page_aligned) \ 459 *(.data.percpu.page_aligned) \
491 *(.data.percpu) \ 460 *(.data.percpu) \
492 *(.data.percpu.shared_aligned) \ 461 *(.data.percpu.shared_aligned) \
493 PERCPU_EPILOG(phdr) 462 VMLINUX_SYMBOL(__per_cpu_end) = .; \
463 } phdr \
464 . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data.percpu);
494 465
495/** 466/**
496 * PERCPU - define output section for percpu area, simple version 467 * PERCPU - define output section for percpu area, simple version