diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-04-03 19:41:32 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-04-03 19:41:32 -0400 |
commit | 6ea0c34dac89611126455537552cffe6c7e832ad (patch) | |
tree | 97c92d701d691442e2bc6b1573ff64c23bc4d884 /include/asm-generic | |
parent | 5f55924deaa62d6df687c131fb92aebe071ec787 (diff) |
percpu: Unify input section names
The two percpu helper macros have the section names duplicated. So create
a new define to merge the two. This also allows arches who need to link
things more directly themselves to avoid duplicating the input sections in
their linker script.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 32c45e5fe0ab..bf90fbc6688b 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -688,6 +688,28 @@ | |||
688 | } | 688 | } |
689 | 689 | ||
690 | /** | 690 | /** |
691 | * PERCPU_INPUT - the percpu input sections | ||
692 | * @cacheline: cacheline size | ||
693 | * | ||
694 | * The core percpu section names and core symbols which do not rely | ||
695 | * directly upon load addresses. | ||
696 | * | ||
697 | * @cacheline is used to align subsections to avoid false cacheline | ||
698 | * sharing between subsections for different purposes. | ||
699 | */ | ||
700 | #define PERCPU_INPUT(cacheline) \ | ||
701 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | ||
702 | *(.data..percpu..first) \ | ||
703 | . = ALIGN(PAGE_SIZE); \ | ||
704 | *(.data..percpu..page_aligned) \ | ||
705 | . = ALIGN(cacheline); \ | ||
706 | *(.data..percpu..readmostly) \ | ||
707 | . = ALIGN(cacheline); \ | ||
708 | *(.data..percpu) \ | ||
709 | *(.data..percpu..shared_aligned) \ | ||
710 | VMLINUX_SYMBOL(__per_cpu_end) = .; | ||
711 | |||
712 | /** | ||
691 | * PERCPU_VADDR - define output section for percpu area | 713 | * PERCPU_VADDR - define output section for percpu area |
692 | * @cacheline: cacheline size | 714 | * @cacheline: cacheline size |
693 | * @vaddr: explicit base address (optional) | 715 | * @vaddr: explicit base address (optional) |
@@ -715,16 +737,7 @@ | |||
715 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | 737 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
716 | .data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ | 738 | .data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \ |
717 | - LOAD_OFFSET) { \ | 739 | - LOAD_OFFSET) { \ |
718 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | 740 | PERCPU_INPUT(cacheline) \ |
719 | *(.data..percpu..first) \ | ||
720 | . = ALIGN(PAGE_SIZE); \ | ||
721 | *(.data..percpu..page_aligned) \ | ||
722 | . = ALIGN(cacheline); \ | ||
723 | *(.data..percpu..readmostly) \ | ||
724 | . = ALIGN(cacheline); \ | ||
725 | *(.data..percpu) \ | ||
726 | *(.data..percpu..shared_aligned) \ | ||
727 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | ||
728 | } phdr \ | 741 | } phdr \ |
729 | . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu); | 742 | . = VMLINUX_SYMBOL(__per_cpu_load) + SIZEOF(.data..percpu); |
730 | 743 | ||
@@ -745,16 +758,7 @@ | |||
745 | . = ALIGN(align); \ | 758 | . = ALIGN(align); \ |
746 | .data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \ | 759 | .data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \ |
747 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ | 760 | VMLINUX_SYMBOL(__per_cpu_load) = .; \ |
748 | VMLINUX_SYMBOL(__per_cpu_start) = .; \ | 761 | PERCPU_INPUT(cacheline) \ |
749 | *(.data..percpu..first) \ | ||
750 | . = ALIGN(PAGE_SIZE); \ | ||
751 | *(.data..percpu..page_aligned) \ | ||
752 | . = ALIGN(cacheline); \ | ||
753 | *(.data..percpu..readmostly) \ | ||
754 | . = ALIGN(cacheline); \ | ||
755 | *(.data..percpu) \ | ||
756 | *(.data..percpu..shared_aligned) \ | ||
757 | VMLINUX_SYMBOL(__per_cpu_end) = .; \ | ||
758 | } | 762 | } |
759 | 763 | ||
760 | 764 | ||