Skip to content

Commit ec0c464

Browse files
chleroympe
authored andcommitted
powerpc: move ASM_CONST and stringify_in_c() into asm-const.h
This patch moves ASM_CONST() and stringify_in_c() into dedicated asm-const.h, then cleans all related inclusions. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [mpe: asm-compat.h should include asm-const.h] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 36a7eea commit ec0c464

57 files changed

Lines changed: 73 additions & 33 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/powerpc/crypto/md5-asm.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
#include <asm/ppc_asm.h>
1313
#include <asm/asm-offsets.h>
14+
#include <asm/asm-compat.h>
1415

1516
#define rHP r3
1617
#define rWP r4

‎arch/powerpc/crypto/sha1-powerpc-asm.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <asm/ppc_asm.h>
99
#include <asm/asm-offsets.h>
10+
#include <asm/asm-compat.h>
1011

1112
#ifdef __BIG_ENDIAN__
1213
#define LWZ(rt, d, ra) \

‎arch/powerpc/include/asm/asm-compat.h‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#ifndef _ASM_POWERPC_ASM_COMPAT_H
22
#define _ASM_POWERPC_ASM_COMPAT_H
33

4+
#include <asm/asm-const.h>
45
#include <asm/types.h>
56
#include <asm/ppc-opcode.h>
67

7-
#ifdef __ASSEMBLY__
8-
# define stringify_in_c(...) __VA_ARGS__
9-
# define ASM_CONST(x) x
10-
#else
11-
/* This version of stringify will deal with commas... */
12-
# define __stringify_in_c(...) #__VA_ARGS__
13-
# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
14-
# define __ASM_CONST(x) x##UL
15-
# define ASM_CONST(x) __ASM_CONST(x)
16-
#endif
17-
18-
198
#ifdef __powerpc64__
209

2110
/* operations for longs and pointers */
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#ifndef _ASM_POWERPC_ASM_CONST_H
2+
#define _ASM_POWERPC_ASM_CONST_H
3+
4+
#ifdef __ASSEMBLY__
5+
# define stringify_in_c(...) __VA_ARGS__
6+
# define ASM_CONST(x) x
7+
#else
8+
/* This version of stringify will deal with commas... */
9+
# define __stringify_in_c(...) #__VA_ARGS__
10+
# define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
11+
# define __ASM_CONST(x) x##UL
12+
# define ASM_CONST(x) __ASM_CONST(x)
13+
#endif
14+
#endif /* _ASM_POWERPC_ASM_CONST_H */

‎arch/powerpc/include/asm/barrier.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef _ASM_POWERPC_BARRIER_H
66
#define _ASM_POWERPC_BARRIER_H
77

8+
#include <asm/asm-const.h>
9+
810
/*
911
* Memory barrier.
1012
* The sync instruction guarantees that all memory accesses initiated

‎arch/powerpc/include/asm/book3s/64/hash.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#define _ASM_POWERPC_BOOK3S_64_HASH_H
44
#ifdef __KERNEL__
55

6+
#include <asm/asm-const.h>
7+
68
/*
79
* Common bits between 4K and 64K pages in a linux-style PTE.
810
* Additional bits may be defined in pgtable-hash64-*.h

‎arch/powerpc/include/asm/book3s/64/mmu-hash.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
* 2 of the License, or (at your option) any later version.
1313
*/
1414

15-
#include <asm/asm-compat.h>
1615
#include <asm/page.h>
1716
#include <asm/bug.h>
17+
#include <asm/asm-const.h>
1818

1919
/*
2020
* This is necessary to get the definition of PGTABLE_RANGE which we

‎arch/powerpc/include/asm/book3s/64/radix.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef _ASM_POWERPC_PGTABLE_RADIX_H
33
#define _ASM_POWERPC_PGTABLE_RADIX_H
44

5+
#include <asm/asm-const.h>
6+
57
#ifndef __ASSEMBLY__
68
#include <asm/cmpxchg.h>
79
#endif

‎arch/powerpc/include/asm/cmpxchg.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#ifdef __KERNEL__
66
#include <linux/compiler.h>
77
#include <asm/synch.h>
8-
#include <asm/asm-compat.h>
98
#include <linux/bug.h>
109
#include <asm/asm-405.h>
1110

‎arch/powerpc/include/asm/code-patching.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <asm/ppc-opcode.h>
1515
#include <linux/string.h>
1616
#include <linux/kallsyms.h>
17+
#include <asm/asm-compat.h>
1718

1819
/* Flags for create_branch:
1920
* "b" == create_branch(addr, target, 0);

0 commit comments

Comments
 (0)