aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/include/asm/word-at-a-time.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/word-at-a-time.h b/arch/powerpc/include/asm/word-at-a-time.h
index 07cc121e8a79..ea52b51be401 100644
--- a/arch/powerpc/include/asm/word-at-a-time.h
+++ b/arch/powerpc/include/asm/word-at-a-time.h
@@ -116,6 +116,15 @@ static inline unsigned long prep_zero_mask(unsigned long a, unsigned long bits,
116 116
117#endif 117#endif
118 118
119/*
120 * We use load_unaligned_zero() in a selftest, which builds a userspace
121 * program. Some linker scripts seem to discard the .fixup section, so allow
122 * the test code to use a different section name.
123 */
124#ifndef FIXUP_SECTION
125#define FIXUP_SECTION ".fixup"
126#endif
127
119static inline unsigned long load_unaligned_zeropad(const void *addr) 128static inline unsigned long load_unaligned_zeropad(const void *addr)
120{ 129{
121 unsigned long ret, offset, tmp; 130 unsigned long ret, offset, tmp;
@@ -123,7 +132,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
123 asm( 132 asm(
124 "1: " PPC_LL "%[ret], 0(%[addr])\n" 133 "1: " PPC_LL "%[ret], 0(%[addr])\n"
125 "2:\n" 134 "2:\n"
126 ".section .fixup,\"ax\"\n" 135 ".section " FIXUP_SECTION ",\"ax\"\n"
127 "3: " 136 "3: "
128#ifdef __powerpc64__ 137#ifdef __powerpc64__
129 "clrrdi %[tmp], %[addr], 3\n\t" 138 "clrrdi %[tmp], %[addr], 3\n\t"
@@ -156,4 +165,6 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
156 return ret; 165 return ret;
157} 166}
158 167
168#undef FIXUP_SECTION
169
159#endif /* _ASM_WORD_AT_A_TIME_H */ 170#endif /* _ASM_WORD_AT_A_TIME_H */