Skip to content

Commit 9aa7a7d

Browse files
htejuntorvalds
authored andcommitted
alpha: unbreak percpu again
Commit 9b8de74 ("FRV: Fix the section attribute on UP DECLARE_PER_CPU()") cleaned up DECLARE/DEFINE_PER_CPU() macros and in the process made alpha percpu.h include include/asm-generic/percpu.h which breaks compilation due to duplicate definitions. Remove inclusion of generic asm helper file and define whatever necessary in alpha header proper. In the longer term, percpu definitions will be unified and all these little subtlties will be removed. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: David Howells <dhowells@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f993004 commit 9aa7a7d

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎arch/alpha/include/asm/percpu.h‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#ifndef __ALPHA_PERCPU_H
22
#define __ALPHA_PERCPU_H
3+
34
#include <linux/compiler.h>
45
#include <linux/threads.h>
6+
#include <linux/percpu-defs.h>
57

68
/*
79
* Determine the real variable name from the name visible in the
@@ -73,6 +75,28 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
7375

7476
#endif /* SMP */
7577

76-
#include <asm-generic/percpu.h>
78+
#ifdef CONFIG_SMP
79+
#define PER_CPU_BASE_SECTION ".data.percpu"
80+
#else
81+
#define PER_CPU_BASE_SECTION ".data"
82+
#endif
83+
84+
#ifdef CONFIG_SMP
85+
86+
#ifdef MODULE
87+
#define PER_CPU_SHARED_ALIGNED_SECTION ""
88+
#else
89+
#define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned"
90+
#endif
91+
#define PER_CPU_FIRST_SECTION ".first"
92+
93+
#else
94+
95+
#define PER_CPU_SHARED_ALIGNED_SECTION ""
96+
#define PER_CPU_FIRST_SECTION ""
97+
98+
#endif
99+
100+
#define PER_CPU_ATTRIBUTES
77101

78102
#endif /* __ALPHA_PERCPU_H */

0 commit comments

Comments
 (0)