mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu, x86: Add arch-specific this_cpu_cmpxchg_double() support percpu: Generic support for this_cpu_cmpxchg_double() alpha: use L1_CACHE_BYTES for cacheline size in the linker script percpu: align percpu readmostly subsection to cacheline Fix up trivial conflict in arch/x86/kernel/vmlinux.lds.S due to the percpu alignment having changed ("x86: Reduce back the alignment of the per-CPU data section")
This commit is contained in:
commit
79d8a8f736
23 changed files with 279 additions and 33 deletions
|
@ -15,7 +15,7 @@
|
|||
* HEAD_TEXT_SECTION
|
||||
* INIT_TEXT_SECTION(PAGE_SIZE)
|
||||
* INIT_DATA_SECTION(...)
|
||||
* PERCPU(PAGE_SIZE)
|
||||
* PERCPU(CACHELINE_SIZE, PAGE_SIZE)
|
||||
* __init_end = .;
|
||||
*
|
||||
* _stext = .;
|
||||
|
@ -689,13 +689,18 @@
|
|||
|
||||
/**
|
||||
* PERCPU_VADDR - define output section for percpu area
|
||||
* @cacheline: cacheline size
|
||||
* @vaddr: explicit base address (optional)
|
||||
* @phdr: destination PHDR (optional)
|
||||
*
|
||||
* Macro which expands to output section for percpu area. If @vaddr
|
||||
* is not blank, it specifies explicit base address and all percpu
|
||||
* symbols will be offset from the given address. If blank, @vaddr
|
||||
* always equals @laddr + LOAD_OFFSET.
|
||||
* Macro which expands to output section for percpu area.
|
||||
*
|
||||
* @cacheline is used to align subsections to avoid false cacheline
|
||||
* sharing between subsections for different purposes.
|
||||
*
|
||||
* If @vaddr is not blank, it specifies explicit base address and all
|
||||
* percpu symbols will be offset from the given address. If blank,
|
||||
* @vaddr always equals @laddr + LOAD_OFFSET.
|
||||
*
|
||||
* @phdr defines the output PHDR to use if not blank. Be warned that
|
||||
* output PHDR is sticky. If @phdr is specified, the next output
|
||||
|
@ -706,7 +711,7 @@
|
|||
* If there is no need to put the percpu section at a predetermined
|
||||
* address, use PERCPU().
|
||||
*/
|
||||
#define PERCPU_VADDR(vaddr, phdr) \
|
||||
#define PERCPU_VADDR(cacheline, vaddr, phdr) \
|
||||
VMLINUX_SYMBOL(__per_cpu_load) = .; \
|
||||
.data..percpu vaddr : AT(VMLINUX_SYMBOL(__per_cpu_load) \
|
||||
- LOAD_OFFSET) { \
|
||||
|
@ -714,7 +719,9 @@
|
|||
*(.data..percpu..first) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
*(.data..percpu..page_aligned) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu..readmostly) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu) \
|
||||
*(.data..percpu..shared_aligned) \
|
||||
VMLINUX_SYMBOL(__per_cpu_end) = .; \
|
||||
|
@ -723,18 +730,18 @@
|
|||
|
||||
/**
|
||||
* PERCPU - define output section for percpu area, simple version
|
||||
* @cacheline: cacheline size
|
||||
* @align: required alignment
|
||||
*
|
||||
* Align to @align and outputs output section for percpu area. This
|
||||
* macro doesn't maniuplate @vaddr or @phdr and __per_cpu_load and
|
||||
* Align to @align and outputs output section for percpu area. This macro
|
||||
* doesn't manipulate @vaddr or @phdr and __per_cpu_load and
|
||||
* __per_cpu_start will be identical.
|
||||
*
|
||||
* This macro is equivalent to ALIGN(align); PERCPU_VADDR( , ) except
|
||||
* that __per_cpu_load is defined as a relative symbol against
|
||||
* .data..percpu which is required for relocatable x86_32
|
||||
* configuration.
|
||||
* This macro is equivalent to ALIGN(@align); PERCPU_VADDR(@cacheline,,)
|
||||
* except that __per_cpu_load is defined as a relative symbol against
|
||||
* .data..percpu which is required for relocatable x86_32 configuration.
|
||||
*/
|
||||
#define PERCPU(align) \
|
||||
#define PERCPU(cacheline, align) \
|
||||
. = ALIGN(align); \
|
||||
.data..percpu : AT(ADDR(.data..percpu) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__per_cpu_load) = .; \
|
||||
|
@ -742,7 +749,9 @@
|
|||
*(.data..percpu..first) \
|
||||
. = ALIGN(PAGE_SIZE); \
|
||||
*(.data..percpu..page_aligned) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu..readmostly) \
|
||||
. = ALIGN(cacheline); \
|
||||
*(.data..percpu) \
|
||||
*(.data..percpu..shared_aligned) \
|
||||
VMLINUX_SYMBOL(__per_cpu_end) = .; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue