aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/vmlinux.lds.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r--include/asm-generic/vmlinux.lds.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fc2f55f2dcd6..e53319cf29cb 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -441,9 +441,10 @@
441 . = __per_cpu_load + SIZEOF(.data.percpu); 441 . = __per_cpu_load + SIZEOF(.data.percpu);
442 442
443/** 443/**
444 * PERCPU_VADDR - define output section for percpu area 444 * PERCPU_VADDR_PREALLOC - define output section for percpu area with prealloc
445 * @vaddr: explicit base address (optional) 445 * @vaddr: explicit base address (optional)
446 * @phdr: destination PHDR (optional) 446 * @phdr: destination PHDR (optional)
447 * @prealloc: the size of prealloc area
447 * 448 *
448 * Macro which expands to output section for percpu area. If @vaddr 449 * Macro which expands to output section for percpu area. If @vaddr
449 * is not blank, it specifies explicit base address and all percpu 450 * is not blank, it specifies explicit base address and all percpu
@@ -455,11 +456,33 @@
455 * section in the linker script will go there too. @phdr should have 456 * section in the linker script will go there too. @phdr should have
456 * a leading colon. 457 * a leading colon.
457 * 458 *
459 * If @prealloc is non-zero, the specified number of bytes will be
460 * reserved at the start of percpu area. As the prealloc area is
461 * likely to break alignment, this macro puts areas in increasing
462 * alignment order.
463 *
458 * This macro defines three symbols, __per_cpu_load, __per_cpu_start 464 * This macro defines three symbols, __per_cpu_load, __per_cpu_start
459 * and __per_cpu_end. The first one is the vaddr of loaded percpu 465 * and __per_cpu_end. The first one is the vaddr of loaded percpu
460 * init data. __per_cpu_start equals @vaddr and __per_cpu_end is the 466 * init data. __per_cpu_start equals @vaddr and __per_cpu_end is the
461 * end offset. 467 * end offset.
462 */ 468 */
469#define PERCPU_VADDR_PREALLOC(vaddr, segment, prealloc) \
470 PERCPU_PROLOG(vaddr) \
471 . += prealloc; \
472 *(.data.percpu) \
473 *(.data.percpu.shared_aligned) \
474 *(.data.percpu.page_aligned) \
475 PERCPU_EPILOG(segment)
476
477/**
478 * PERCPU_VADDR - define output section for percpu area
479 * @vaddr: explicit base address (optional)
480 * @phdr: destination PHDR (optional)
481 *
482 * Macro which expands to output section for percpu area. Mostly
483 * identical to PERCPU_VADDR_PREALLOC(@vaddr, @phdr, 0) other than
484 * using slighly different layout.
485 */
463#define PERCPU_VADDR(vaddr, phdr) \ 486#define PERCPU_VADDR(vaddr, phdr) \
464 PERCPU_PROLOG(vaddr) \ 487 PERCPU_PROLOG(vaddr) \
465 *(.data.percpu.page_aligned) \ 488 *(.data.percpu.page_aligned) \