Skip to content

Commit ea4b3d2

Browse files
committed
Merge tag 'powerpc-5.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: - Fix boot failure on 603 with DEBUG_PAGEALLOC and KFENCE - Fix 32-build with newer binutils that rejects 'ptesync' etc Thanks to Anders Roxell, Christophe Leroy, and Maxime Bizon. * tag 'powerpc-5.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/lib/sstep: fix 'ptesync' build error powerpc/603: Fix boot failure with DEBUG_PAGEALLOC and KFENCE
2 parents 7476b04 + fe663df commit ea4b3d2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

arch/powerpc/kernel/head_book3s_32.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,14 @@ InstructionTLBMiss:
421421
*/
422422
/* Get PTE (linux-style) and check access */
423423
mfspr r3,SPRN_IMISS
424-
#ifdef CONFIG_MODULES
424+
#if defined(CONFIG_MODULES) || defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
425425
lis r1, TASK_SIZE@h /* check if kernel address */
426426
cmplw 0,r1,r3
427427
#endif
428428
mfspr r2, SPRN_SDR1
429429
li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC | _PAGE_USER
430430
rlwinm r2, r2, 28, 0xfffff000
431-
#ifdef CONFIG_MODULES
431+
#if defined(CONFIG_MODULES) || defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
432432
bgt- 112f
433433
lis r2, (swapper_pg_dir - PAGE_OFFSET)@ha /* if kernel address, use */
434434
li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC

arch/powerpc/lib/sstep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,12 +3264,14 @@ void emulate_update_regs(struct pt_regs *regs, struct instruction_op *op)
32643264
case BARRIER_EIEIO:
32653265
eieio();
32663266
break;
3267+
#ifdef CONFIG_PPC64
32673268
case BARRIER_LWSYNC:
32683269
asm volatile("lwsync" : : : "memory");
32693270
break;
32703271
case BARRIER_PTESYNC:
32713272
asm volatile("ptesync" : : : "memory");
32723273
break;
3274+
#endif
32733275
}
32743276
break;
32753277

0 commit comments

Comments
 (0)