Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge commit '63cc8c75156462d4b42cbdd76c293b7eee7ddbfe':

"percpu: introduce DEFINE_PER_CPU_PAGE_ALIGNED() macro"

into x86/core

Conflicts:
arch/x86/kernel/cpu/common.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>

+10 -1
+1 -1
arch/x86/kernel/cpu/common.c
··· 24 24 25 25 static struct cpu_dev *this_cpu __cpuinitdata; 26 26 27 - DEFINE_PER_CPU(struct gdt_page, gdt_page) = { .gdt = { 27 + DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = { 28 28 [GDT_ENTRY_KERNEL_CS] = { { { 0x0000ffff, 0x00cf9a00 } } }, 29 29 [GDT_ENTRY_KERNEL_DS] = { { { 0x0000ffff, 0x00cf9200 } } }, 30 30 [GDT_ENTRY_DEFAULT_USER_CS] = { { { 0x0000ffff, 0x00cffa00 } } },
+1
arch/x86/kernel/vmlinux_32.lds.S
··· 180 180 . = ALIGN(PAGE_SIZE); 181 181 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { 182 182 __per_cpu_start = .; 183 + *(.data.percpu.page_aligned) 183 184 *(.data.percpu) 184 185 *(.data.percpu.shared_aligned) 185 186 __per_cpu_end = .;
+1
include/asm-generic/vmlinux.lds.h
··· 385 385 . = ALIGN(align); \ 386 386 VMLINUX_SYMBOL(__per_cpu_start) = .; \ 387 387 .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { \ 388 + *(.data.percpu.page_aligned) \ 388 389 *(.data.percpu) \ 389 390 *(.data.percpu.shared_aligned) \ 390 391 } \
+7
include/linux/percpu.h
··· 23 23 __attribute__((__section__(SHARED_ALIGNED_SECTION))) \ 24 24 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ 25 25 ____cacheline_aligned_in_smp 26 + 27 + #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ 28 + __attribute__((__section__(".data.percpu.page_aligned"))) \ 29 + PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name 26 30 #else 27 31 #define DEFINE_PER_CPU(type, name) \ 28 32 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name 29 33 30 34 #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ 35 + DEFINE_PER_CPU(type, name) 36 + 37 + #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \ 31 38 DEFINE_PER_CPU(type, name) 32 39 #endif 33 40