aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/setup.h1
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S4
-rw-r--r--arch/powerpc/kernel/tm.S20
-rw-r--r--arch/powerpc/lib/checksum_64.S3
-rw-r--r--arch/powerpc/lib/code-patching.c6
-rw-r--r--arch/powerpc/mm/mem.c2
-rw-r--r--arch/powerpc/mm/numa.c7
-rw-r--r--arch/powerpc/mm/pkeys.c2
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda-tce.c2
-rw-r--r--tools/testing/selftests/powerpc/alignment/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/benchmarks/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/cache_shape/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/copyloops/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/dscr/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/math/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/mm/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/pmu/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/primitives/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/ptrace/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/signal/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/stringloops/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/switch_endian/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/syscalls/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/tm/Makefile1
-rw-r--r--tools/testing/selftests/powerpc/vphn/Makefile1
26 files changed, 55 insertions, 9 deletions
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
index 1a951b00465d..1fffbba8d6a5 100644
--- a/arch/powerpc/include/asm/setup.h
+++ b/arch/powerpc/include/asm/setup.h
@@ -9,6 +9,7 @@ extern void ppc_printk_progress(char *s, unsigned short hex);
9 9
10extern unsigned int rtas_data; 10extern unsigned int rtas_data;
11extern unsigned long long memory_limit; 11extern unsigned long long memory_limit;
12extern bool init_mem_is_free;
12extern unsigned long klimit; 13extern unsigned long klimit;
13extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask); 14extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);
14 15
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index ea04dfb8c092..2d8fc8c9da7a 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1314,9 +1314,7 @@ EXC_REAL_BEGIN(denorm_exception_hv, 0x1500, 0x100)
1314 1314
1315#ifdef CONFIG_PPC_DENORMALISATION 1315#ifdef CONFIG_PPC_DENORMALISATION
1316 mfspr r10,SPRN_HSRR1 1316 mfspr r10,SPRN_HSRR1
1317 mfspr r11,SPRN_HSRR0 /* save HSRR0 */
1318 andis. r10,r10,(HSRR1_DENORM)@h /* denorm? */ 1317 andis. r10,r10,(HSRR1_DENORM)@h /* denorm? */
1319 addi r11,r11,-4 /* HSRR0 is next instruction */
1320 bne+ denorm_assist 1318 bne+ denorm_assist
1321#endif 1319#endif
1322 1320
@@ -1382,6 +1380,8 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S)
1382 */ 1380 */
1383 XVCPSGNDP32(32) 1381 XVCPSGNDP32(32)
1384denorm_done: 1382denorm_done:
1383 mfspr r11,SPRN_HSRR0
1384 subi r11,r11,4
1385 mtspr SPRN_HSRR0,r11 1385 mtspr SPRN_HSRR0,r11
1386 mtcrf 0x80,r9 1386 mtcrf 0x80,r9
1387 ld r9,PACA_EXGEN+EX_R9(r13) 1387 ld r9,PACA_EXGEN+EX_R9(r13)
diff --git a/arch/powerpc/kernel/tm.S b/arch/powerpc/kernel/tm.S
index 6bffbc5affe7..7716374786bd 100644
--- a/arch/powerpc/kernel/tm.S
+++ b/arch/powerpc/kernel/tm.S
@@ -176,13 +176,27 @@ _GLOBAL(tm_reclaim)
176 std r1, PACATMSCRATCH(r13) 176 std r1, PACATMSCRATCH(r13)
177 ld r1, PACAR1(r13) 177 ld r1, PACAR1(r13)
178 178
179 /* Store the PPR in r11 and reset to decent value */
180 std r11, GPR11(r1) /* Temporary stash */ 179 std r11, GPR11(r1) /* Temporary stash */
181 180
181 /*
182 * Move the saved user r1 to the kernel stack in case PACATMSCRATCH is
183 * clobbered by an exception once we turn on MSR_RI below.
184 */
185 ld r11, PACATMSCRATCH(r13)
186 std r11, GPR1(r1)
187
188 /*
189 * Store r13 away so we can free up the scratch SPR for the SLB fault
190 * handler (needed once we start accessing the thread_struct).
191 */
192 GET_SCRATCH0(r11)
193 std r11, GPR13(r1)
194
182 /* Reset MSR RI so we can take SLB faults again */ 195 /* Reset MSR RI so we can take SLB faults again */
183 li r11, MSR_RI 196 li r11, MSR_RI
184 mtmsrd r11, 1 197 mtmsrd r11, 1
185 198
199 /* Store the PPR in r11 and reset to decent value */
186 mfspr r11, SPRN_PPR 200 mfspr r11, SPRN_PPR
187 HMT_MEDIUM 201 HMT_MEDIUM
188 202
@@ -207,11 +221,11 @@ _GLOBAL(tm_reclaim)
207 SAVE_GPR(8, r7) /* user r8 */ 221 SAVE_GPR(8, r7) /* user r8 */
208 SAVE_GPR(9, r7) /* user r9 */ 222 SAVE_GPR(9, r7) /* user r9 */
209 SAVE_GPR(10, r7) /* user r10 */ 223 SAVE_GPR(10, r7) /* user r10 */
210 ld r3, PACATMSCRATCH(r13) /* user r1 */ 224 ld r3, GPR1(r1) /* user r1 */
211 ld r4, GPR7(r1) /* user r7 */ 225 ld r4, GPR7(r1) /* user r7 */
212 ld r5, GPR11(r1) /* user r11 */ 226 ld r5, GPR11(r1) /* user r11 */
213 ld r6, GPR12(r1) /* user r12 */ 227 ld r6, GPR12(r1) /* user r12 */
214 GET_SCRATCH0(8) /* user r13 */ 228 ld r8, GPR13(r1) /* user r13 */
215 std r3, GPR1(r7) 229 std r3, GPR1(r7)
216 std r4, GPR7(r7) 230 std r4, GPR7(r7)
217 std r5, GPR11(r7) 231 std r5, GPR11(r7)
diff --git a/arch/powerpc/lib/checksum_64.S b/arch/powerpc/lib/checksum_64.S
index 886ed94b9c13..d05c8af4ac51 100644
--- a/arch/powerpc/lib/checksum_64.S
+++ b/arch/powerpc/lib/checksum_64.S
@@ -443,6 +443,9 @@ _GLOBAL(csum_ipv6_magic)
443 addc r0, r8, r9 443 addc r0, r8, r9
444 ld r10, 0(r4) 444 ld r10, 0(r4)
445 ld r11, 8(r4) 445 ld r11, 8(r4)
446#ifdef CONFIG_CPU_LITTLE_ENDIAN
447 rotldi r5, r5, 8
448#endif
446 adde r0, r0, r10 449 adde r0, r0, r10
447 add r5, r5, r7 450 add r5, r5, r7
448 adde r0, r0, r11 451 adde r0, r0, r11
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c
index 850f3b8f4da5..6ae2777c220d 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -28,6 +28,12 @@ static int __patch_instruction(unsigned int *exec_addr, unsigned int instr,
28{ 28{
29 int err; 29 int err;
30 30
31 /* Make sure we aren't patching a freed init section */
32 if (init_mem_is_free && init_section_contains(exec_addr, 4)) {
33 pr_debug("Skipping init section patching addr: 0x%px\n", exec_addr);
34 return 0;
35 }
36
31 __put_user_size(instr, patch_addr, 4, err); 37 __put_user_size(instr, patch_addr, 4, err);
32 if (err) 38 if (err)
33 return err; 39 return err;
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 5c8530d0c611..04ccb274a620 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -63,6 +63,7 @@
63#endif 63#endif
64 64
65unsigned long long memory_limit; 65unsigned long long memory_limit;
66bool init_mem_is_free;
66 67
67#ifdef CONFIG_HIGHMEM 68#ifdef CONFIG_HIGHMEM
68pte_t *kmap_pte; 69pte_t *kmap_pte;
@@ -396,6 +397,7 @@ void free_initmem(void)
396{ 397{
397 ppc_md.progress = ppc_printk_progress; 398 ppc_md.progress = ppc_printk_progress;
398 mark_initmem_nx(); 399 mark_initmem_nx();
400 init_mem_is_free = true;
399 free_initmem_default(POISON_FREE_INITMEM); 401 free_initmem_default(POISON_FREE_INITMEM);
400} 402}
401 403
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 35ac5422903a..59d07bd5374a 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1204,7 +1204,9 @@ int find_and_online_cpu_nid(int cpu)
1204 int new_nid; 1204 int new_nid;
1205 1205
1206 /* Use associativity from first thread for all siblings */ 1206 /* Use associativity from first thread for all siblings */
1207 vphn_get_associativity(cpu, associativity); 1207 if (vphn_get_associativity(cpu, associativity))
1208 return cpu_to_node(cpu);
1209
1208 new_nid = associativity_to_nid(associativity); 1210 new_nid = associativity_to_nid(associativity);
1209 if (new_nid < 0 || !node_possible(new_nid)) 1211 if (new_nid < 0 || !node_possible(new_nid))
1210 new_nid = first_online_node; 1212 new_nid = first_online_node;
@@ -1452,7 +1454,8 @@ static struct timer_list topology_timer;
1452 1454
1453static void reset_topology_timer(void) 1455static void reset_topology_timer(void)
1454{ 1456{
1455 mod_timer(&topology_timer, jiffies + topology_timer_secs * HZ); 1457 if (vphn_enabled)
1458 mod_timer(&topology_timer, jiffies + topology_timer_secs * HZ);
1456} 1459}
1457 1460
1458#ifdef CONFIG_SMP 1461#ifdef CONFIG_SMP
diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys.c
index 333b1f80c435..b271b283c785 100644
--- a/arch/powerpc/mm/pkeys.c
+++ b/arch/powerpc/mm/pkeys.c
@@ -45,7 +45,7 @@ static void scan_pkey_feature(void)
45 * Since any pkey can be used for data or execute, we will just treat 45 * Since any pkey can be used for data or execute, we will just treat
46 * all keys as equal and track them as one entity. 46 * all keys as equal and track them as one entity.
47 */ 47 */
48 pkeys_total = be32_to_cpu(vals[0]); 48 pkeys_total = vals[0];
49 pkeys_devtree_defined = true; 49 pkeys_devtree_defined = true;
50} 50}
51 51
diff --git a/arch/powerpc/platforms/powernv/pci-ioda-tce.c b/arch/powerpc/platforms/powernv/pci-ioda-tce.c
index 6c5db1acbe8d..fe9691040f54 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda-tce.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda-tce.c
@@ -276,7 +276,7 @@ long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 bus_offset,
276 level_shift = entries_shift + 3; 276 level_shift = entries_shift + 3;
277 level_shift = max_t(unsigned int, level_shift, PAGE_SHIFT); 277 level_shift = max_t(unsigned int, level_shift, PAGE_SHIFT);
278 278
279 if ((level_shift - 3) * levels + page_shift >= 60) 279 if ((level_shift - 3) * levels + page_shift >= 55)
280 return -EINVAL; 280 return -EINVAL;
281 281
282 /* Allocate TCE table */ 282 /* Allocate TCE table */
diff --git a/tools/testing/selftests/powerpc/alignment/Makefile b/tools/testing/selftests/powerpc/alignment/Makefile
index 93baacab7693..d056486f49de 100644
--- a/tools/testing/selftests/powerpc/alignment/Makefile
+++ b/tools/testing/selftests/powerpc/alignment/Makefile
@@ -1,5 +1,6 @@
1TEST_GEN_PROGS := copy_first_unaligned alignment_handler 1TEST_GEN_PROGS := copy_first_unaligned alignment_handler
2 2
3top_srcdir = ../../../../..
3include ../../lib.mk 4include ../../lib.mk
4 5
5$(TEST_GEN_PROGS): ../harness.c ../utils.c 6$(TEST_GEN_PROGS): ../harness.c ../utils.c
diff --git a/tools/testing/selftests/powerpc/benchmarks/Makefile b/tools/testing/selftests/powerpc/benchmarks/Makefile
index b4d7432a0ecd..d40300a65b42 100644
--- a/tools/testing/selftests/powerpc/benchmarks/Makefile
+++ b/tools/testing/selftests/powerpc/benchmarks/Makefile
@@ -4,6 +4,7 @@ TEST_GEN_FILES := exec_target
4 4
5CFLAGS += -O2 5CFLAGS += -O2
6 6
7top_srcdir = ../../../../..
7include ../../lib.mk 8include ../../lib.mk
8 9
9$(TEST_GEN_PROGS): ../harness.c 10$(TEST_GEN_PROGS): ../harness.c
diff --git a/tools/testing/selftests/powerpc/cache_shape/Makefile b/tools/testing/selftests/powerpc/cache_shape/Makefile
index 1be547434a49..ede4d3dae750 100644
--- a/tools/testing/selftests/powerpc/cache_shape/Makefile
+++ b/tools/testing/selftests/powerpc/cache_shape/Makefile
@@ -5,6 +5,7 @@ all: $(TEST_PROGS)
5 5
6$(TEST_PROGS): ../harness.c ../utils.c 6$(TEST_PROGS): ../harness.c ../utils.c
7 7
8top_srcdir = ../../../../..
8include ../../lib.mk 9include ../../lib.mk
9 10
10clean: 11clean:
diff --git a/tools/testing/selftests/powerpc/copyloops/Makefile b/tools/testing/selftests/powerpc/copyloops/Makefile
index 1cf89a34d97c..44574f3818b3 100644
--- a/tools/testing/selftests/powerpc/copyloops/Makefile
+++ b/tools/testing/selftests/powerpc/copyloops/Makefile
@@ -17,6 +17,7 @@ TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \
17 17
18EXTRA_SOURCES := validate.c ../harness.c stubs.S 18EXTRA_SOURCES := validate.c ../harness.c stubs.S
19 19
20top_srcdir = ../../../../..
20include ../../lib.mk 21include ../../lib.mk
21 22
22$(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES) 23$(OUTPUT)/copyuser_64_t%: copyuser_64.S $(EXTRA_SOURCES)
diff --git a/tools/testing/selftests/powerpc/dscr/Makefile b/tools/testing/selftests/powerpc/dscr/Makefile
index 55d7db7a616b..5df476364b4d 100644
--- a/tools/testing/selftests/powerpc/dscr/Makefile
+++ b/tools/testing/selftests/powerpc/dscr/Makefile
@@ -3,6 +3,7 @@ TEST_GEN_PROGS := dscr_default_test dscr_explicit_test dscr_user_test \
3 dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \ 3 dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test \
4 dscr_sysfs_thread_test 4 dscr_sysfs_thread_test
5 5
6top_srcdir = ../../../../..
6include ../../lib.mk 7include ../../lib.mk
7 8
8$(OUTPUT)/dscr_default_test: LDLIBS += -lpthread 9$(OUTPUT)/dscr_default_test: LDLIBS += -lpthread
diff --git a/tools/testing/selftests/powerpc/math/Makefile b/tools/testing/selftests/powerpc/math/Makefile
index 0dd3a01fdab9..11a10d7a2bbd 100644
--- a/tools/testing/selftests/powerpc/math/Makefile
+++ b/tools/testing/selftests/powerpc/math/Makefile
@@ -1,6 +1,7 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt 2TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt
3 3
4top_srcdir = ../../../../..
4include ../../lib.mk 5include ../../lib.mk
5 6
6$(TEST_GEN_PROGS): ../harness.c 7$(TEST_GEN_PROGS): ../harness.c
diff --git a/tools/testing/selftests/powerpc/mm/Makefile b/tools/testing/selftests/powerpc/mm/Makefile
index 8ebbe96d80a8..33ced6e0ad25 100644
--- a/tools/testing/selftests/powerpc/mm/Makefile
+++ b/tools/testing/selftests/powerpc/mm/Makefile
@@ -5,6 +5,7 @@ noarg:
5TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao segv_errors 5TEST_GEN_PROGS := hugetlb_vs_thp_test subpage_prot prot_sao segv_errors
6TEST_GEN_FILES := tempfile 6TEST_GEN_FILES := tempfile
7 7
8top_srcdir = ../../../../..
8include ../../lib.mk 9include ../../lib.mk
9 10
10$(TEST_GEN_PROGS): ../harness.c 11$(TEST_GEN_PROGS): ../harness.c
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile
index 6e1629bf5b09..19046db995fe 100644
--- a/tools/testing/selftests/powerpc/pmu/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/Makefile
@@ -5,6 +5,7 @@ noarg:
5TEST_GEN_PROGS := count_instructions l3_bank_test per_event_excludes 5TEST_GEN_PROGS := count_instructions l3_bank_test per_event_excludes
6EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c 6EXTRA_SOURCES := ../harness.c event.c lib.c ../utils.c
7 7
8top_srcdir = ../../../../..
8include ../../lib.mk 9include ../../lib.mk
9 10
10all: $(TEST_GEN_PROGS) ebb 11all: $(TEST_GEN_PROGS) ebb
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/Makefile b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
index c4e64bc2e265..bd5dfa509272 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/Makefile
+++ b/tools/testing/selftests/powerpc/pmu/ebb/Makefile
@@ -17,6 +17,7 @@ TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \
17 lost_exception_test no_handler_test \ 17 lost_exception_test no_handler_test \
18 cycles_with_mmcr2_test 18 cycles_with_mmcr2_test
19 19
20top_srcdir = ../../../../../..
20include ../../../lib.mk 21include ../../../lib.mk
21 22
22$(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c \ 23$(TEST_GEN_PROGS): ../../harness.c ../../utils.c ../event.c ../lib.c \
diff --git a/tools/testing/selftests/powerpc/primitives/Makefile b/tools/testing/selftests/powerpc/primitives/Makefile
index 175366db7be8..ea2b7bd09e36 100644
--- a/tools/testing/selftests/powerpc/primitives/Makefile
+++ b/tools/testing/selftests/powerpc/primitives/Makefile
@@ -2,6 +2,7 @@ CFLAGS += -I$(CURDIR)
2 2
3TEST_GEN_PROGS := load_unaligned_zeropad 3TEST_GEN_PROGS := load_unaligned_zeropad
4 4
5top_srcdir = ../../../../..
5include ../../lib.mk 6include ../../lib.mk
6 7
7$(TEST_GEN_PROGS): ../harness.c 8$(TEST_GEN_PROGS): ../harness.c
diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 28f5b781a553..923d531265f8 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -4,6 +4,7 @@ TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
4 ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \ 4 ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
5 perf-hwbreak 5 perf-hwbreak
6 6
7top_srcdir = ../../../../..
7include ../../lib.mk 8include ../../lib.mk
8 9
9all: $(TEST_PROGS) 10all: $(TEST_PROGS)
diff --git a/tools/testing/selftests/powerpc/signal/Makefile b/tools/testing/selftests/powerpc/signal/Makefile
index a7cbd5082e27..1fca25c6ace0 100644
--- a/tools/testing/selftests/powerpc/signal/Makefile
+++ b/tools/testing/selftests/powerpc/signal/Makefile
@@ -8,6 +8,7 @@ $(TEST_PROGS): ../harness.c ../utils.c signal.S
8CFLAGS += -maltivec 8CFLAGS += -maltivec
9signal_tm: CFLAGS += -mhtm 9signal_tm: CFLAGS += -mhtm
10 10
11top_srcdir = ../../../../..
11include ../../lib.mk 12include ../../lib.mk
12 13
13clean: 14clean:
diff --git a/tools/testing/selftests/powerpc/stringloops/Makefile b/tools/testing/selftests/powerpc/stringloops/Makefile
index 10b35c87a4f4..7fc0623d85c3 100644
--- a/tools/testing/selftests/powerpc/stringloops/Makefile
+++ b/tools/testing/selftests/powerpc/stringloops/Makefile
@@ -29,6 +29,7 @@ endif
29 29
30ASFLAGS = $(CFLAGS) 30ASFLAGS = $(CFLAGS)
31 31
32top_srcdir = ../../../../..
32include ../../lib.mk 33include ../../lib.mk
33 34
34$(TEST_GEN_PROGS): $(EXTRA_SOURCES) 35$(TEST_GEN_PROGS): $(EXTRA_SOURCES)
diff --git a/tools/testing/selftests/powerpc/switch_endian/Makefile b/tools/testing/selftests/powerpc/switch_endian/Makefile
index 30b8ff8fb82e..fcd2dcb8972b 100644
--- a/tools/testing/selftests/powerpc/switch_endian/Makefile
+++ b/tools/testing/selftests/powerpc/switch_endian/Makefile
@@ -5,6 +5,7 @@ ASFLAGS += -O2 -Wall -g -nostdlib -m64
5 5
6EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S 6EXTRA_CLEAN = $(OUTPUT)/*.o $(OUTPUT)/check-reversed.S
7 7
8top_srcdir = ../../../../..
8include ../../lib.mk 9include ../../lib.mk
9 10
10$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S 11$(OUTPUT)/switch_endian_test: $(OUTPUT)/check-reversed.S
diff --git a/tools/testing/selftests/powerpc/syscalls/Makefile b/tools/testing/selftests/powerpc/syscalls/Makefile
index da22ca7c38c1..161b8846336f 100644
--- a/tools/testing/selftests/powerpc/syscalls/Makefile
+++ b/tools/testing/selftests/powerpc/syscalls/Makefile
@@ -2,6 +2,7 @@ TEST_GEN_PROGS := ipc_unmuxed
2 2
3CFLAGS += -I../../../../../usr/include 3CFLAGS += -I../../../../../usr/include
4 4
5top_srcdir = ../../../../..
5include ../../lib.mk 6include ../../lib.mk
6 7
7$(TEST_GEN_PROGS): ../harness.c 8$(TEST_GEN_PROGS): ../harness.c
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index c0e45d2dde25..9fc2cf6fbc92 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -6,6 +6,7 @@ TEST_GEN_PROGS := tm-resched-dscr tm-syscall tm-signal-msr-resv tm-signal-stack
6 tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \ 6 tm-vmxcopy tm-fork tm-tar tm-tmspr tm-vmx-unavail tm-unavailable tm-trap \
7 $(SIGNAL_CONTEXT_CHK_TESTS) tm-sigreturn 7 $(SIGNAL_CONTEXT_CHK_TESTS) tm-sigreturn
8 8
9top_srcdir = ../../../../..
9include ../../lib.mk 10include ../../lib.mk
10 11
11$(TEST_GEN_PROGS): ../harness.c ../utils.c 12$(TEST_GEN_PROGS): ../harness.c ../utils.c
diff --git a/tools/testing/selftests/powerpc/vphn/Makefile b/tools/testing/selftests/powerpc/vphn/Makefile
index f8ced26748f8..fb82068c9fda 100644
--- a/tools/testing/selftests/powerpc/vphn/Makefile
+++ b/tools/testing/selftests/powerpc/vphn/Makefile
@@ -2,6 +2,7 @@ TEST_GEN_PROGS := test-vphn
2 2
3CFLAGS += -m64 3CFLAGS += -m64
4 4
5top_srcdir = ../../../../..
5include ../../lib.mk 6include ../../lib.mk
6 7
7$(TEST_GEN_PROGS): ../harness.c 8$(TEST_GEN_PROGS): ../harness.c