diff options
author | Christophe Leroy <christophe.leroy@c-s.fr> | 2018-07-05 12:24:57 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-07-30 08:48:16 -0400 |
commit | ec0c464cdbf38bf6ddabec8bfa595bd421cab203 (patch) | |
tree | b9e8e5c9b489fff773b505294f8c25e1d4dfdacd | |
parent | 36a7eeaff7d06cef253c8df6dfe363bfc4a553f8 (diff) |
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>
57 files changed, 73 insertions, 33 deletions
diff --git a/arch/powerpc/crypto/md5-asm.S b/arch/powerpc/crypto/md5-asm.S index 10cdf5bceebb..1834065362c7 100644 --- a/arch/powerpc/crypto/md5-asm.S +++ b/arch/powerpc/crypto/md5-asm.S | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | #include <asm/asm-offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/asm-compat.h> | ||
14 | 15 | ||
15 | #define rHP r3 | 16 | #define rHP r3 |
16 | #define rWP r4 | 17 | #define rWP r4 |
diff --git a/arch/powerpc/crypto/sha1-powerpc-asm.S b/arch/powerpc/crypto/sha1-powerpc-asm.S index c8951ce0dcc4..23e248beff71 100644 --- a/arch/powerpc/crypto/sha1-powerpc-asm.S +++ b/arch/powerpc/crypto/sha1-powerpc-asm.S | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <asm/ppc_asm.h> | 8 | #include <asm/ppc_asm.h> |
9 | #include <asm/asm-offsets.h> | 9 | #include <asm/asm-offsets.h> |
10 | #include <asm/asm-compat.h> | ||
10 | 11 | ||
11 | #ifdef __BIG_ENDIAN__ | 12 | #ifdef __BIG_ENDIAN__ |
12 | #define LWZ(rt, d, ra) \ | 13 | #define LWZ(rt, d, ra) \ |
diff --git a/arch/powerpc/include/asm/asm-compat.h b/arch/powerpc/include/asm/asm-compat.h index d2cf3593e987..19b70c5b5f18 100644 --- a/arch/powerpc/include/asm/asm-compat.h +++ b/arch/powerpc/include/asm/asm-compat.h | |||
@@ -1,21 +1,10 @@ | |||
1 | #ifndef _ASM_POWERPC_ASM_COMPAT_H | 1 | #ifndef _ASM_POWERPC_ASM_COMPAT_H |
2 | #define _ASM_POWERPC_ASM_COMPAT_H | 2 | #define _ASM_POWERPC_ASM_COMPAT_H |
3 | 3 | ||
4 | #include <asm/asm-const.h> | ||
4 | #include <asm/types.h> | 5 | #include <asm/types.h> |
5 | #include <asm/ppc-opcode.h> | 6 | #include <asm/ppc-opcode.h> |
6 | 7 | ||
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 | |||
19 | #ifdef __powerpc64__ | 8 | #ifdef __powerpc64__ |
20 | 9 | ||
21 | /* operations for longs and pointers */ | 10 | /* operations for longs and pointers */ |
diff --git a/arch/powerpc/include/asm/asm-const.h b/arch/powerpc/include/asm/asm-const.h new file mode 100644 index 000000000000..082c1538c562 --- /dev/null +++ b/arch/powerpc/include/asm/asm-const.h | |||
@@ -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 */ | ||
diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/asm/barrier.h index f67b3f6e36be..de1316874e45 100644 --- a/arch/powerpc/include/asm/barrier.h +++ b/arch/powerpc/include/asm/barrier.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #ifndef _ASM_POWERPC_BARRIER_H | 5 | #ifndef _ASM_POWERPC_BARRIER_H |
6 | #define _ASM_POWERPC_BARRIER_H | 6 | #define _ASM_POWERPC_BARRIER_H |
7 | 7 | ||
8 | #include <asm/asm-const.h> | ||
9 | |||
8 | /* | 10 | /* |
9 | * Memory barrier. | 11 | * Memory barrier. |
10 | * The sync instruction guarantees that all memory accesses initiated | 12 | * The sync instruction guarantees that all memory accesses initiated |
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h index 0387b155f13d..d52a51b2ce7b 100644 --- a/arch/powerpc/include/asm/book3s/64/hash.h +++ b/arch/powerpc/include/asm/book3s/64/hash.h | |||
@@ -3,6 +3,8 @@ | |||
3 | #define _ASM_POWERPC_BOOK3S_64_HASH_H | 3 | #define _ASM_POWERPC_BOOK3S_64_HASH_H |
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <asm/asm-const.h> | ||
7 | |||
6 | /* | 8 | /* |
7 | * Common bits between 4K and 64K pages in a linux-style PTE. | 9 | * Common bits between 4K and 64K pages in a linux-style PTE. |
8 | * Additional bits may be defined in pgtable-hash64-*.h | 10 | * Additional bits may be defined in pgtable-hash64-*.h |
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h index eee0b5b8a23f..2f74bdc805e0 100644 --- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h +++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h | |||
@@ -12,9 +12,9 @@ | |||
12 | * 2 of the License, or (at your option) any later version. | 12 | * 2 of the License, or (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/asm-compat.h> | ||
16 | #include <asm/page.h> | 15 | #include <asm/page.h> |
17 | #include <asm/bug.h> | 16 | #include <asm/bug.h> |
17 | #include <asm/asm-const.h> | ||
18 | 18 | ||
19 | /* | 19 | /* |
20 | * This is necessary to get the definition of PGTABLE_RANGE which we | 20 | * This is necessary to get the definition of PGTABLE_RANGE which we |
diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include/asm/book3s/64/radix.h index 3ab3f7aef022..77440e837869 100644 --- a/arch/powerpc/include/asm/book3s/64/radix.h +++ b/arch/powerpc/include/asm/book3s/64/radix.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #ifndef _ASM_POWERPC_PGTABLE_RADIX_H | 2 | #ifndef _ASM_POWERPC_PGTABLE_RADIX_H |
3 | #define _ASM_POWERPC_PGTABLE_RADIX_H | 3 | #define _ASM_POWERPC_PGTABLE_RADIX_H |
4 | 4 | ||
5 | #include <asm/asm-const.h> | ||
6 | |||
5 | #ifndef __ASSEMBLY__ | 7 | #ifndef __ASSEMBLY__ |
6 | #include <asm/cmpxchg.h> | 8 | #include <asm/cmpxchg.h> |
7 | #endif | 9 | #endif |
diff --git a/arch/powerpc/include/asm/cmpxchg.h b/arch/powerpc/include/asm/cmpxchg.h index 67ec1073ac97..27183871eb3b 100644 --- a/arch/powerpc/include/asm/cmpxchg.h +++ b/arch/powerpc/include/asm/cmpxchg.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
6 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
7 | #include <asm/synch.h> | 7 | #include <asm/synch.h> |
8 | #include <asm/asm-compat.h> | ||
9 | #include <linux/bug.h> | 8 | #include <linux/bug.h> |
10 | #include <asm/asm-405.h> | 9 | #include <asm/asm-405.h> |
11 | 10 | ||
diff --git a/arch/powerpc/include/asm/code-patching.h b/arch/powerpc/include/asm/code-patching.h index 812535f40124..9ecc7bfc8ae7 100644 --- a/arch/powerpc/include/asm/code-patching.h +++ b/arch/powerpc/include/asm/code-patching.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/ppc-opcode.h> | 14 | #include <asm/ppc-opcode.h> |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/kallsyms.h> | 16 | #include <linux/kallsyms.h> |
17 | #include <asm/asm-compat.h> | ||
17 | 18 | ||
18 | /* Flags for create_branch: | 19 | /* Flags for create_branch: |
19 | * "b" == create_branch(addr, target, 0); | 20 | * "b" == create_branch(addr, target, 0); |
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 82816a2043b9..751126c22ed9 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -4,9 +4,9 @@ | |||
4 | 4 | ||
5 | 5 | ||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <asm/asm-compat.h> | ||
8 | #include <asm/feature-fixups.h> | 7 | #include <asm/feature-fixups.h> |
9 | #include <uapi/asm/cputable.h> | 8 | #include <uapi/asm/cputable.h> |
9 | #include <asm/asm-const.h> | ||
10 | 10 | ||
11 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | 12 | ||
diff --git a/arch/powerpc/include/asm/dt_cpu_ftrs.h b/arch/powerpc/include/asm/dt_cpu_ftrs.h index 71515d909ed1..55113432fc91 100644 --- a/arch/powerpc/include/asm/dt_cpu_ftrs.h +++ b/arch/powerpc/include/asm/dt_cpu_ftrs.h | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <asm/asm-compat.h> | ||
14 | #include <asm/feature-fixups.h> | 13 | #include <asm/feature-fixups.h> |
15 | #include <uapi/asm/cputable.h> | 14 | #include <uapi/asm/cputable.h> |
16 | 15 | ||
diff --git a/arch/powerpc/include/asm/feature-fixups.h b/arch/powerpc/include/asm/feature-fixups.h index fcfd05672b1b..33b6f9c892c8 100644 --- a/arch/powerpc/include/asm/feature-fixups.h +++ b/arch/powerpc/include/asm/feature-fixups.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_POWERPC_FEATURE_FIXUPS_H | 1 | #ifndef __ASM_POWERPC_FEATURE_FIXUPS_H |
2 | #define __ASM_POWERPC_FEATURE_FIXUPS_H | 2 | #define __ASM_POWERPC_FEATURE_FIXUPS_H |
3 | 3 | ||
4 | #include <asm/asm-const.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h index 535add3f7791..ce8aab72c21b 100644 --- a/arch/powerpc/include/asm/firmware.h +++ b/arch/powerpc/include/asm/firmware.h | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | #ifdef __KERNEL__ | 15 | #ifdef __KERNEL__ |
16 | 16 | ||
17 | #include <asm/asm-compat.h> | ||
18 | #include <asm/feature-fixups.h> | 17 | #include <asm/feature-fixups.h> |
18 | #include <asm/asm-const.h> | ||
19 | 19 | ||
20 | /* firmware feature bitmask values */ | 20 | /* firmware feature bitmask values */ |
21 | 21 | ||
diff --git a/arch/powerpc/include/asm/futex.h b/arch/powerpc/include/asm/futex.h index 76c8648d0fa8..94542776a62d 100644 --- a/arch/powerpc/include/asm/futex.h +++ b/arch/powerpc/include/asm/futex.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
9 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
10 | #include <asm/synch.h> | 10 | #include <asm/synch.h> |
11 | #include <asm/asm-compat.h> | ||
12 | #include <asm/asm-405.h> | 11 | #include <asm/asm-405.h> |
13 | 12 | ||
14 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 13 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
diff --git a/arch/powerpc/include/asm/iommu.h b/arch/powerpc/include/asm/iommu.h index daa3ee5d7ad2..ab3a4fba38e3 100644 --- a/arch/powerpc/include/asm/iommu.h +++ b/arch/powerpc/include/asm/iommu.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
31 | #include <asm/types.h> | 31 | #include <asm/types.h> |
32 | #include <asm/pci-bridge.h> | 32 | #include <asm/pci-bridge.h> |
33 | #include <asm/asm-const.h> | ||
33 | 34 | ||
34 | #define IOMMU_PAGE_SHIFT_4K 12 | 35 | #define IOMMU_PAGE_SHIFT_4K 12 |
35 | #define IOMMU_PAGE_SIZE_4K (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K) | 36 | #define IOMMU_PAGE_SIZE_4K (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K) |
diff --git a/arch/powerpc/include/asm/jump_label.h b/arch/powerpc/include/asm/jump_label.h index 9a287e0ac8b1..a3b2cf940b4e 100644 --- a/arch/powerpc/include/asm/jump_label.h +++ b/arch/powerpc/include/asm/jump_label.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | 15 | ||
16 | #include <asm/feature-fixups.h> | 16 | #include <asm/feature-fixups.h> |
17 | #include <asm/asm-compat.h> | 17 | #include <asm/asm-const.h> |
18 | 18 | ||
19 | #define JUMP_ENTRY_TYPE stringify_in_c(FTR_ENTRY_LONG) | 19 | #define JUMP_ENTRY_TYPE stringify_in_c(FTR_ENTRY_LONG) |
20 | #define JUMP_LABEL_NOP_SIZE 4 | 20 | #define JUMP_LABEL_NOP_SIZE 4 |
diff --git a/arch/powerpc/include/asm/mmu-44x.h b/arch/powerpc/include/asm/mmu-44x.h index cb57f29f531d..9bdbe1d1c9b9 100644 --- a/arch/powerpc/include/asm/mmu-44x.h +++ b/arch/powerpc/include/asm/mmu-44x.h | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <asm/page.h> | 8 | #include <asm/page.h> |
9 | #include <asm/asm-const.h> | ||
9 | 10 | ||
10 | #define PPC44x_MMUCR_TID 0x000000ff | 11 | #define PPC44x_MMUCR_TID 0x000000ff |
11 | #define PPC44x_MMUCR_STS 0x00010000 | 12 | #define PPC44x_MMUCR_STS 0x00010000 |
diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index 61d15ce92278..8418d83b5eb0 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h | |||
@@ -5,8 +5,8 @@ | |||
5 | 5 | ||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | 7 | ||
8 | #include <asm/asm-compat.h> | ||
9 | #include <asm/feature-fixups.h> | 8 | #include <asm/feature-fixups.h> |
9 | #include <asm/asm-const.h> | ||
10 | 10 | ||
11 | /* | 11 | /* |
12 | * MMU features bit definitions | 12 | * MMU features bit definitions |
diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h index dd0c7236208f..fe05b3e03cf1 100644 --- a/arch/powerpc/include/asm/nohash/64/pgtable.h +++ b/arch/powerpc/include/asm/nohash/64/pgtable.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <asm/nohash/64/pgtable-4k.h> | 9 | #include <asm/nohash/64/pgtable-4k.h> |
10 | #include <asm/barrier.h> | 10 | #include <asm/barrier.h> |
11 | #include <asm/asm-const.h> | ||
11 | 12 | ||
12 | #ifdef CONFIG_PPC_64K_PAGES | 13 | #ifdef CONFIG_PPC_64K_PAGES |
13 | #error "Page size not supported" | 14 | #error "Page size not supported" |
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index a9fbefaacf10..f6a1265face2 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #else | 16 | #else |
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #endif | 18 | #endif |
19 | #include <asm/asm-compat.h> | 19 | #include <asm/asm-const.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * On regular PPC32 page size is 4K (but we support 4K/16K/64K/256K pages | 22 | * On regular PPC32 page size is 4K (but we support 4K/16K/64K/256K pages |
diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h index af04acdb873f..c0ce17e909ef 100644 --- a/arch/powerpc/include/asm/page_64.h +++ b/arch/powerpc/include/asm/page_64.h | |||
@@ -10,6 +10,8 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <asm/asm-const.h> | ||
14 | |||
13 | /* | 15 | /* |
14 | * We always define HW_PAGE_SHIFT to 12 as use of 64K pages remains Linux | 16 | * We always define HW_PAGE_SHIFT to 12 as use of 64K pages remains Linux |
15 | * specific, every notion of page number shared with the firmware, TCEs, | 17 | * specific, every notion of page number shared with the firmware, TCEs, |
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index c103caf99897..954edf935158 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define _ASM_POWERPC_PPC_OPCODE_H | 13 | #define _ASM_POWERPC_PPC_OPCODE_H |
14 | 14 | ||
15 | #include <linux/stringify.h> | 15 | #include <linux/stringify.h> |
16 | #include <asm/asm-compat.h> | 16 | #include <asm/asm-const.h> |
17 | 17 | ||
18 | #define __REG_R0 0 | 18 | #define __REG_R0 0 |
19 | #define __REG_R1 1 | 19 | #define __REG_R1 1 |
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index e4923686e43a..447cbd1bee99 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define _ASM_POWERPC_PTRACE_H | 24 | #define _ASM_POWERPC_PTRACE_H |
25 | 25 | ||
26 | #include <uapi/asm/ptrace.h> | 26 | #include <uapi/asm/ptrace.h> |
27 | #include <asm/asm-const.h> | ||
27 | 28 | ||
28 | 29 | ||
29 | #ifdef __powerpc64__ | 30 | #ifdef __powerpc64__ |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 562568414cf4..d4a8dc71a057 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/stringify.h> | 14 | #include <linux/stringify.h> |
15 | #include <asm/cputable.h> | 15 | #include <asm/cputable.h> |
16 | #include <asm/asm-const.h> | ||
16 | 17 | ||
17 | /* Pickup Book E specific registers. */ | 18 | /* Pickup Book E specific registers. */ |
18 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) | 19 | #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) |
diff --git a/arch/powerpc/include/asm/reg_a2.h b/arch/powerpc/include/asm/reg_a2.h index 3ba9c6f096fc..74c2c57c492a 100644 --- a/arch/powerpc/include/asm/reg_a2.h +++ b/arch/powerpc/include/asm/reg_a2.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __ASM_POWERPC_REG_A2_H__ | 12 | #ifndef __ASM_POWERPC_REG_A2_H__ |
13 | #define __ASM_POWERPC_REG_A2_H__ | 13 | #define __ASM_POWERPC_REG_A2_H__ |
14 | 14 | ||
15 | #include <asm/asm-const.h> | ||
16 | |||
15 | #define SPRN_TENSR 0x1b5 | 17 | #define SPRN_TENSR 0x1b5 |
16 | #define SPRN_TENS 0x1b6 /* Thread ENable Set */ | 18 | #define SPRN_TENS 0x1b6 /* Thread ENable Set */ |
17 | #define SPRN_TENC 0x1b7 /* Thread ENable Clear */ | 19 | #define SPRN_TENC 0x1b7 /* Thread ENable Clear */ |
diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h index 7ec38f4ee927..685c72310f5d 100644 --- a/arch/powerpc/include/asm/spinlock.h +++ b/arch/powerpc/include/asm/spinlock.h | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <asm/paca.h> | 24 | #include <asm/paca.h> |
25 | #include <asm/hvcall.h> | 25 | #include <asm/hvcall.h> |
26 | #endif | 26 | #endif |
27 | #include <asm/asm-compat.h> | ||
28 | #include <asm/synch.h> | 27 | #include <asm/synch.h> |
29 | #include <asm/ppc-opcode.h> | 28 | #include <asm/ppc-opcode.h> |
30 | #include <asm/asm-405.h> | 29 | #include <asm/asm-405.h> |
diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch.h index 6ec546090ba1..f6f8c75bbb24 100644 --- a/arch/powerpc/include/asm/synch.h +++ b/arch/powerpc/include/asm/synch.h | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/stringify.h> | 6 | #include <linux/stringify.h> |
7 | #include <asm/feature-fixups.h> | 7 | #include <asm/feature-fixups.h> |
8 | #include <asm/asm-const.h> | ||
8 | 9 | ||
9 | #ifndef __ASSEMBLY__ | 10 | #ifndef __ASSEMBLY__ |
10 | extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup; | 11 | extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup; |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index f308dfeb2746..ae554b6fe6b9 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _ASM_POWERPC_THREAD_INFO_H | 9 | #ifndef _ASM_POWERPC_THREAD_INFO_H |
10 | #define _ASM_POWERPC_THREAD_INFO_H | 10 | #define _ASM_POWERPC_THREAD_INFO_H |
11 | 11 | ||
12 | #include <asm/asm-const.h> | ||
13 | |||
12 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
13 | 15 | ||
14 | #define THREAD_SHIFT CONFIG_THREAD_SHIFT | 16 | #define THREAD_SHIFT CONFIG_THREAD_SHIFT |
diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h index 468653ce844c..643cfbd5bcb5 100644 --- a/arch/powerpc/include/asm/uaccess.h +++ b/arch/powerpc/include/asm/uaccess.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #ifndef _ARCH_POWERPC_UACCESS_H | 2 | #ifndef _ARCH_POWERPC_UACCESS_H |
3 | #define _ARCH_POWERPC_UACCESS_H | 3 | #define _ARCH_POWERPC_UACCESS_H |
4 | 4 | ||
5 | #include <asm/asm-compat.h> | ||
6 | #include <asm/ppc_asm.h> | 5 | #include <asm/ppc_asm.h> |
7 | #include <asm/processor.h> | 6 | #include <asm/processor.h> |
8 | #include <asm/page.h> | 7 | #include <asm/page.h> |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 0357f87a013c..f62d9ddc0312 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/ppc-opcode.h> | 38 | #include <asm/ppc-opcode.h> |
39 | #include <asm/barrier.h> | 39 | #include <asm/barrier.h> |
40 | #include <asm/export.h> | 40 | #include <asm/export.h> |
41 | #include <asm/asm-compat.h> | ||
41 | #ifdef CONFIG_PPC_BOOK3S | 42 | #ifdef CONFIG_PPC_BOOK3S |
42 | #include <asm/exception-64s.h> | 43 | #include <asm/exception-64s.h> |
43 | #else | 44 | #else |
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index 6c509f39bbde..07c913fd5aba 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
26 | #include <asm/ptrace.h> | 26 | #include <asm/ptrace.h> |
27 | #include <asm/export.h> | 27 | #include <asm/export.h> |
28 | #include <asm/asm-compat.h> | ||
28 | 29 | ||
29 | #ifdef CONFIG_VSX | 30 | #ifdef CONFIG_VSX |
30 | #define __REST_32FPVSRS(n,c,base) \ | 31 | #define __REST_32FPVSRS(n,c,base) \ |
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index d85d5515a091..436caa9d6eec 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/exception-64s.h> | 23 | #include <asm/exception-64s.h> |
24 | #include <asm/book3s/64/mmu-hash.h> | 24 | #include <asm/book3s/64/mmu-hash.h> |
25 | #include <asm/mmu.h> | 25 | #include <asm/mmu.h> |
26 | #include <asm/asm-compat.h> | ||
26 | 27 | ||
27 | #undef DEBUG | 28 | #undef DEBUG |
28 | 29 | ||
diff --git a/arch/powerpc/kernel/kvm_emul.S b/arch/powerpc/kernel/kvm_emul.S index e100ff324a85..c005088f6c9c 100644 --- a/arch/powerpc/kernel/kvm_emul.S +++ b/arch/powerpc/kernel/kvm_emul.S | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/reg.h> | 23 | #include <asm/reg.h> |
24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
26 | #include <asm/asm-compat.h> | ||
26 | 27 | ||
27 | #define KVM_MAGIC_PAGE (-4096) | 28 | #define KVM_MAGIC_PAGE (-4096) |
28 | 29 | ||
diff --git a/arch/powerpc/kernel/ppc_save_regs.S b/arch/powerpc/kernel/ppc_save_regs.S index 8afbe213d729..6d1b42ee797c 100644 --- a/arch/powerpc/kernel/ppc_save_regs.S +++ b/arch/powerpc/kernel/ppc_save_regs.S | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | #include <asm/asm-offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/asm-compat.h> | ||
15 | 16 | ||
16 | /* | 17 | /* |
17 | * Grab the register values as they are now. | 18 | * Grab the register values as they are now. |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index f314fd475491..21165da0052d 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <asm/page.h> | 8 | #include <asm/page.h> |
9 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
10 | #include <asm/export.h> | 10 | #include <asm/export.h> |
11 | #include <asm/asm-compat.h> | ||
11 | 12 | ||
12 | /* | 13 | /* |
13 | * Load state from memory into VMX registers including VSCR. | 14 | * Load state from memory into VMX registers including VSCR. |
diff --git a/arch/powerpc/kvm/book3s_64_slb.S b/arch/powerpc/kvm/book3s_64_slb.S index 688722acd692..d293485c1a60 100644 --- a/arch/powerpc/kvm/book3s_64_slb.S +++ b/arch/powerpc/kvm/book3s_64_slb.S | |||
@@ -17,6 +17,8 @@ | |||
17 | * Authors: Alexander Graf <agraf@suse.de> | 17 | * Authors: Alexander Graf <agraf@suse.de> |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <asm/asm-compat.h> | ||
21 | |||
20 | #define SHADOW_SLB_ENTRY_LEN 0x10 | 22 | #define SHADOW_SLB_ENTRY_LEN 0x10 |
21 | #define OFFSET_ESID(x) (SHADOW_SLB_ENTRY_LEN * x) | 23 | #define OFFSET_ESID(x) (SHADOW_SLB_ENTRY_LEN * x) |
22 | #define OFFSET_VSID(x) ((SHADOW_SLB_ENTRY_LEN * x) + 8) | 24 | #define OFFSET_VSID(x) ((SHADOW_SLB_ENTRY_LEN * x) + 8) |
diff --git a/arch/powerpc/kvm/book3s_hv_interrupts.S b/arch/powerpc/kvm/book3s_hv_interrupts.S index 82f2ff9410b6..4218073eea1f 100644 --- a/arch/powerpc/kvm/book3s_hv_interrupts.S +++ b/arch/powerpc/kvm/book3s_hv_interrupts.S | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/asm-offsets.h> | 27 | #include <asm/asm-offsets.h> |
28 | #include <asm/exception-64s.h> | 28 | #include <asm/exception-64s.h> |
29 | #include <asm/ppc-opcode.h> | 29 | #include <asm/ppc-opcode.h> |
30 | #include <asm/asm-compat.h> | ||
30 | 31 | ||
31 | /***************************************************************************** | 32 | /***************************************************************************** |
32 | * * | 33 | * * |
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 6e4554b273f1..7405222a4e28 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/opal.h> | 32 | #include <asm/opal.h> |
33 | #include <asm/xive-regs.h> | 33 | #include <asm/xive-regs.h> |
34 | #include <asm/thread_info.h> | 34 | #include <asm/thread_info.h> |
35 | #include <asm/asm-compat.h> | ||
35 | 36 | ||
36 | /* Sign-extend HDEC if not on POWER9 */ | 37 | /* Sign-extend HDEC if not on POWER9 */ |
37 | #define EXTEND_HDEC(reg) \ | 38 | #define EXTEND_HDEC(reg) \ |
diff --git a/arch/powerpc/kvm/book3s_interrupts.S b/arch/powerpc/kvm/book3s_interrupts.S index c18e845019ec..d71dab16dc6f 100644 --- a/arch/powerpc/kvm/book3s_interrupts.S +++ b/arch/powerpc/kvm/book3s_interrupts.S | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/asm-offsets.h> | 24 | #include <asm/asm-offsets.h> |
25 | #include <asm/exception-64s.h> | 25 | #include <asm/exception-64s.h> |
26 | #include <asm/asm-compat.h> | ||
26 | 27 | ||
27 | #if defined(CONFIG_PPC_BOOK3S_64) | 28 | #if defined(CONFIG_PPC_BOOK3S_64) |
28 | #ifdef PPC64_ELF_ABI_v2 | 29 | #ifdef PPC64_ELF_ABI_v2 |
diff --git a/arch/powerpc/kvm/book3s_rmhandlers.S b/arch/powerpc/kvm/book3s_rmhandlers.S index 34a5adeff084..b0089e04c8c8 100644 --- a/arch/powerpc/kvm/book3s_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_rmhandlers.S | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/mmu.h> | 23 | #include <asm/mmu.h> |
24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/asm-offsets.h> | 25 | #include <asm/asm-offsets.h> |
26 | #include <asm/asm-compat.h> | ||
26 | 27 | ||
27 | #ifdef CONFIG_PPC_BOOK3S_64 | 28 | #ifdef CONFIG_PPC_BOOK3S_64 |
28 | #include <asm/exception-64s.h> | 29 | #include <asm/exception-64s.h> |
diff --git a/arch/powerpc/kvm/book3s_segment.S b/arch/powerpc/kvm/book3s_segment.S index 98ccc7ec5d48..7fec258bb072 100644 --- a/arch/powerpc/kvm/book3s_segment.S +++ b/arch/powerpc/kvm/book3s_segment.S | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | /* Real mode helpers */ | 20 | /* Real mode helpers */ |
21 | 21 | ||
22 | #include <asm/asm-compat.h> | ||
23 | |||
22 | #if defined(CONFIG_PPC_BOOK3S_64) | 24 | #if defined(CONFIG_PPC_BOOK3S_64) |
23 | 25 | ||
24 | #define GET_SHADOW_VCPU(reg) \ | 26 | #define GET_SHADOW_VCPU(reg) \ |
diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index 506677395681..65244263b6a3 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/ppc_asm.h> | 10 | #include <asm/ppc_asm.h> |
11 | #include <asm/export.h> | 11 | #include <asm/export.h> |
12 | #include <asm/asm-compat.h> | ||
12 | 13 | ||
13 | #ifdef __BIG_ENDIAN__ | 14 | #ifdef __BIG_ENDIAN__ |
14 | #define sLd sld /* Shift towards low-numbered address. */ | 15 | #define sLd sld /* Shift towards low-numbered address. */ |
diff --git a/arch/powerpc/lib/feature-fixups-test.S b/arch/powerpc/lib/feature-fixups-test.S index f16cec989506..ee7c5fd5fc64 100644 --- a/arch/powerpc/lib/feature-fixups-test.S +++ b/arch/powerpc/lib/feature-fixups-test.S | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <asm/feature-fixups.h> | 11 | #include <asm/feature-fixups.h> |
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | #include <asm/synch.h> | 13 | #include <asm/synch.h> |
14 | #include <asm/asm-compat.h> | ||
14 | 15 | ||
15 | .text | 16 | .text |
16 | 17 | ||
diff --git a/arch/powerpc/lib/ldstfp.S b/arch/powerpc/lib/ldstfp.S index ae15eba49c1f..32e91994b6b2 100644 --- a/arch/powerpc/lib/ldstfp.S +++ b/arch/powerpc/lib/ldstfp.S | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/ppc-opcode.h> | 15 | #include <asm/ppc-opcode.h> |
16 | #include <asm/reg.h> | 16 | #include <asm/reg.h> |
17 | #include <asm/asm-offsets.h> | 17 | #include <asm/asm-offsets.h> |
18 | #include <asm/asm-compat.h> | ||
18 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
19 | 20 | ||
20 | #ifdef CONFIG_PPC_FPU | 21 | #ifdef CONFIG_PPC_FPU |
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S index 8d8265be1a59..26ea02b7311f 100644 --- a/arch/powerpc/lib/memcpy_64.S +++ b/arch/powerpc/lib/memcpy_64.S | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/ppc_asm.h> | 10 | #include <asm/ppc_asm.h> |
11 | #include <asm/export.h> | 11 | #include <asm/export.h> |
12 | #include <asm/asm-compat.h> | ||
12 | 13 | ||
13 | .align 7 | 14 | .align 7 |
14 | _GLOBAL_TOC(memcpy) | 15 | _GLOBAL_TOC(memcpy) |
diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S index 048b8e9f4492..505a3d010c47 100644 --- a/arch/powerpc/mm/tlb_nohash_low.S +++ b/arch/powerpc/mm/tlb_nohash_low.S | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/asm-offsets.h> | 34 | #include <asm/asm-offsets.h> |
35 | #include <asm/processor.h> | 35 | #include <asm/processor.h> |
36 | #include <asm/bug.h> | 36 | #include <asm/bug.h> |
37 | #include <asm/asm-compat.h> | ||
37 | 38 | ||
38 | #if defined(CONFIG_40x) | 39 | #if defined(CONFIG_40x) |
39 | 40 | ||
diff --git a/arch/powerpc/net/bpf_jit32.h b/arch/powerpc/net/bpf_jit32.h index a8cd7e289ecd..6f4daacad296 100644 --- a/arch/powerpc/net/bpf_jit32.h +++ b/arch/powerpc/net/bpf_jit32.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef _BPF_JIT32_H | 13 | #ifndef _BPF_JIT32_H |
14 | #define _BPF_JIT32_H | 14 | #define _BPF_JIT32_H |
15 | 15 | ||
16 | #include <asm/asm-compat.h> | ||
16 | #include "bpf_jit.h" | 17 | #include "bpf_jit.h" |
17 | 18 | ||
18 | #ifdef CONFIG_PPC64 | 19 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/net/bpf_jit_asm.S b/arch/powerpc/net/bpf_jit_asm.S index 3dd9c43d40c9..c80280dc2e04 100644 --- a/arch/powerpc/net/bpf_jit_asm.S +++ b/arch/powerpc/net/bpf_jit_asm.S | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <asm/ppc_asm.h> | 12 | #include <asm/ppc_asm.h> |
13 | #include <asm/asm-compat.h> | ||
13 | #include "bpf_jit32.h" | 14 | #include "bpf_jit32.h" |
14 | 15 | ||
15 | /* | 16 | /* |
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 5b061fc81df3..d5bfe24bb3b5 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/moduleloader.h> | 13 | #include <linux/moduleloader.h> |
14 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
15 | #include <asm/asm-compat.h> | ||
15 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
16 | #include <linux/filter.h> | 17 | #include <linux/filter.h> |
17 | #include <linux/if_vlan.h> | 18 | #include <linux/if_vlan.h> |
diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c index 380cbf9a40d9..b8de5244a58c 100644 --- a/arch/powerpc/net/bpf_jit_comp64.c +++ b/arch/powerpc/net/bpf_jit_comp64.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/moduleloader.h> | 14 | #include <linux/moduleloader.h> |
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/asm-compat.h> | ||
16 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
17 | #include <linux/filter.h> | 18 | #include <linux/filter.h> |
18 | #include <linux/if_vlan.h> | 19 | #include <linux/if_vlan.h> |
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S index a8d9b4089c31..4016e3c3d18b 100644 --- a/arch/powerpc/platforms/powernv/opal-wrappers.S +++ b/arch/powerpc/platforms/powernv/opal-wrappers.S | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/hvcall.h> | 14 | #include <asm/hvcall.h> |
15 | #include <asm/asm-offsets.h> | 15 | #include <asm/asm-offsets.h> |
16 | #include <asm/opal.h> | 16 | #include <asm/opal.h> |
17 | #include <asm/asm-compat.h> | ||
17 | 18 | ||
18 | .section ".text" | 19 | .section ".text" |
19 | 20 | ||
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 139f0af6c3d9..e14ccf32a97d 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -69,6 +69,7 @@ | |||
69 | #include <asm/kexec.h> | 69 | #include <asm/kexec.h> |
70 | #include <asm/isa-bridge.h> | 70 | #include <asm/isa-bridge.h> |
71 | #include <asm/security_features.h> | 71 | #include <asm/security_features.h> |
72 | #include <asm/asm-const.h> | ||
72 | 73 | ||
73 | #include "pseries.h" | 74 | #include "pseries.h" |
74 | 75 | ||
diff --git a/arch/powerpc/purgatory/trampoline.S b/arch/powerpc/purgatory/trampoline.S index 4aad9dd10ace..1e1129553fd7 100644 --- a/arch/powerpc/purgatory/trampoline.S +++ b/arch/powerpc/purgatory/trampoline.S | |||
@@ -12,15 +12,7 @@ | |||
12 | * Software Foundation (version 2 of the License). | 12 | * Software Foundation (version 2 of the License). |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #if defined(__LITTLE_ENDIAN__) | 15 | #include <asm/asm-compat.h> |
16 | #define STWX_BE stwbrx | ||
17 | #define LWZX_BE lwbrx | ||
18 | #elif defined(__BIG_ENDIAN__) | ||
19 | #define STWX_BE stwx | ||
20 | #define LWZX_BE lwzx | ||
21 | #else | ||
22 | #error no endianness defined! | ||
23 | #endif | ||
24 | 16 | ||
25 | .machine ppc64 | 17 | .machine ppc64 |
26 | .balign 256 | 18 | .balign 256 |
diff --git a/arch/powerpc/xmon/spr_access.S b/arch/powerpc/xmon/spr_access.S index 4099cbcddaaa..720a52afdd58 100644 --- a/arch/powerpc/xmon/spr_access.S +++ b/arch/powerpc/xmon/spr_access.S | |||
@@ -1,5 +1,6 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #include <asm/ppc_asm.h> | 2 | #include <asm/ppc_asm.h> |
3 | #include <asm/asm-compat.h> | ||
3 | 4 | ||
4 | /* unsigned long xmon_mfspr(sprn, default_value) */ | 5 | /* unsigned long xmon_mfspr(sprn, default_value) */ |
5 | _GLOBAL(xmon_mfspr) | 6 | _GLOBAL(xmon_mfspr) |
diff --git a/tools/testing/selftests/powerpc/copyloops/asm/asm-compat.h b/tools/testing/selftests/powerpc/copyloops/asm/asm-compat.h new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/tools/testing/selftests/powerpc/copyloops/asm/asm-compat.h | |||
diff --git a/tools/testing/selftests/powerpc/primitives/asm/asm-const.h b/tools/testing/selftests/powerpc/primitives/asm/asm-const.h new file mode 120000 index 000000000000..18d8be13e67f --- /dev/null +++ b/tools/testing/selftests/powerpc/primitives/asm/asm-const.h | |||
@@ -0,0 +1 @@ | |||
../../../../../../arch/powerpc/include/asm/asm-const.h \ No newline at end of file | |||