percpu: make PER_CPU_BASE_SECTION overridable by arches
Impact: bug fix IA-64 needs to put percpu data in the seperate section even on UP. Fixes regression caused by "percpu: refactor percpu.h" Signed-off-by: Brian Gerst <brgerst@gmail.com> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -27,12 +27,12 @@ extern void *per_cpu_init(void);
|
|||||||
|
|
||||||
#else /* ! SMP */
|
#else /* ! SMP */
|
||||||
|
|
||||||
#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
|
|
||||||
|
|
||||||
#define per_cpu_init() (__phys_per_cpu_start)
|
#define per_cpu_init() (__phys_per_cpu_start)
|
||||||
|
|
||||||
#endif /* SMP */
|
#endif /* SMP */
|
||||||
|
|
||||||
|
#define PER_CPU_BASE_SECTION ".data.percpu"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Be extremely careful when taking the address of this variable! Due to virtual
|
* Be extremely careful when taking the address of this variable! Due to virtual
|
||||||
* remapping, it is different from the canonical address returned by __get_cpu_var(var)!
|
* remapping, it is different from the canonical address returned by __get_cpu_var(var)!
|
||||||
|
@@ -8,8 +8,15 @@
|
|||||||
|
|
||||||
#include <asm/percpu.h>
|
#include <asm/percpu.h>
|
||||||
|
|
||||||
|
#ifndef PER_CPU_BASE_SECTION
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
#define PER_CPU_BASE_SECTION ".data.percpu"
|
#define PER_CPU_BASE_SECTION ".data.percpu"
|
||||||
|
#else
|
||||||
|
#define PER_CPU_BASE_SECTION ".data"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
||||||
@@ -20,7 +27,6 @@
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define PER_CPU_BASE_SECTION ".data"
|
|
||||||
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
#define PER_CPU_SHARED_ALIGNED_SECTION ""
|
||||||
#define PER_CPU_FIRST_SECTION ""
|
#define PER_CPU_FIRST_SECTION ""
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user