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

alpha: unbreak percpu again

Commit 9b8de7479d0dbab1ed98b5b015d44232c9d3d08e ("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>

authored by

Tejun Heo and committed by
Linus Torvalds
9aa7a7d5 f993004d

+25 -1
+25 -1
arch/alpha/include/asm/percpu.h
··· 1 1 #ifndef __ALPHA_PERCPU_H 2 2 #define __ALPHA_PERCPU_H 3 + 3 4 #include <linux/compiler.h> 4 5 #include <linux/threads.h> 6 + #include <linux/percpu-defs.h> 5 7 6 8 /* 7 9 * Determine the real variable name from the name visible in the ··· 75 73 76 74 #endif /* SMP */ 77 75 78 - #include <asm-generic/percpu.h> 76 + #ifdef CONFIG_SMP 77 + #define PER_CPU_BASE_SECTION ".data.percpu" 78 + #else 79 + #define PER_CPU_BASE_SECTION ".data" 80 + #endif 81 + 82 + #ifdef CONFIG_SMP 83 + 84 + #ifdef MODULE 85 + #define PER_CPU_SHARED_ALIGNED_SECTION "" 86 + #else 87 + #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" 88 + #endif 89 + #define PER_CPU_FIRST_SECTION ".first" 90 + 91 + #else 92 + 93 + #define PER_CPU_SHARED_ALIGNED_SECTION "" 94 + #define PER_CPU_FIRST_SECTION "" 95 + 96 + #endif 97 + 98 + #define PER_CPU_ATTRIBUTES 79 99 80 100 #endif /* __ALPHA_PERCPU_H */