Skip to content

Commit 76bfdcf

Browse files
mpeozbenh
authored andcommitted
powerpc: Use PPC_LONG and PPC_LONG_ALIGN in lib/string.S
Replace ifdef clutter with the PPC_LONG and PPC_LONG_ALIGN macros for readability. No change to the generated code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent 551c3c0 commit 76bfdcf

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

‎arch/powerpc/lib/string.S‎

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@
1313
#include <asm/ppc_asm.h>
1414

1515
.section __ex_table,"a"
16-
#ifdef CONFIG_PPC64
17-
.align 3
18-
#define EXTBL .llong
19-
#else
20-
.align 2
21-
#define EXTBL .long
22-
#endif
16+
PPC_LONG_ALIGN
2317
.text
2418

2519
_GLOBAL(strcpy)
@@ -160,9 +154,9 @@ _GLOBAL(__clear_user)
160154
blr
161155

162156
.section __ex_table,"a"
163-
EXTBL 11b,90b
164-
EXTBL 1b,91b
165-
EXTBL 8b,92b
157+
PPC_LONG 11b,90b
158+
PPC_LONG 1b,91b
159+
PPC_LONG 8b,92b
166160
.text
167161

168162
_GLOBAL(__strncpy_from_user)
@@ -183,7 +177,7 @@ _GLOBAL(__strncpy_from_user)
183177
blr
184178

185179
.section __ex_table,"a"
186-
EXTBL 1b,99b
180+
PPC_LONG 1b,99b
187181
.text
188182

189183
/* r3 = str, r4 = len (> 0), r5 = top (highest addr) */
@@ -208,4 +202,4 @@ _GLOBAL(__strnlen_user)
208202
blr
209203

210204
.section __ex_table,"a"
211-
EXTBL 1b,99b
205+
PPC_LONG 1b,99b

0 commit comments

Comments
 (0)