Commit ea4b3d29 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 7476b043 fe663df7
...@@ -421,14 +421,14 @@ InstructionTLBMiss: ...@@ -421,14 +421,14 @@ InstructionTLBMiss:
*/ */
/* Get PTE (linux-style) and check access */ /* Get PTE (linux-style) and check access */
mfspr r3,SPRN_IMISS mfspr r3,SPRN_IMISS
#ifdef CONFIG_MODULES #if defined(CONFIG_MODULES) || defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
lis r1, TASK_SIZE@h /* check if kernel address */ lis r1, TASK_SIZE@h /* check if kernel address */
cmplw 0,r1,r3 cmplw 0,r1,r3
#endif #endif
mfspr r2, SPRN_SDR1 mfspr r2, SPRN_SDR1
li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC | _PAGE_USER li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC | _PAGE_USER
rlwinm r2, r2, 28, 0xfffff000 rlwinm r2, r2, 28, 0xfffff000
#ifdef CONFIG_MODULES #if defined(CONFIG_MODULES) || defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
bgt- 112f bgt- 112f
lis r2, (swapper_pg_dir - PAGE_OFFSET)@ha /* if kernel address, use */ lis r2, (swapper_pg_dir - PAGE_OFFSET)@ha /* if kernel address, use */
li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC
......
...@@ -3264,12 +3264,14 @@ void emulate_update_regs(struct pt_regs *regs, struct instruction_op *op) ...@@ -3264,12 +3264,14 @@ void emulate_update_regs(struct pt_regs *regs, struct instruction_op *op)
case BARRIER_EIEIO: case BARRIER_EIEIO:
eieio(); eieio();
break; break;
#ifdef CONFIG_PPC64
case BARRIER_LWSYNC: case BARRIER_LWSYNC:
asm volatile("lwsync" : : : "memory"); asm volatile("lwsync" : : : "memory");
break; break;
case BARRIER_PTESYNC: case BARRIER_PTESYNC:
asm volatile("ptesync" : : : "memory"); asm volatile("ptesync" : : : "memory");
break; break;
#endif
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment