Merge tag 'powerpc-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

- Four commits fixing various things in the new C VDSO code

- One fix for a 32-bit VMAP stack bug

- Two minor build fixes

Thanks to Cédric Le Goater, Christophe Leroy, and Will Springer.

* tag 'powerpc-5.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/32: Fix vmap stack - Properly set r1 before activating MMU on syscall too
powerpc/vdso: Fix DOTSYM for 32-bit LE VDSO
powerpc/vdso: Don't pass 64-bit ABI cflags to 32-bit VDSO
powerpc/vdso: Block R_PPC_REL24 relocations
powerpc/smp: Add __init to init_big_cores()
powerpc/time: Force inlining of get_tb()
powerpc/boot: Fix build of dts/fsl

+30 -16
+2
arch/powerpc/boot/Makefile
··· 373 373 targets += $(image-y) $(initrd-y) 374 374 targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ 375 375 $(patsubst $(x).%, dts/%.dtb, $(filter $(x).%, $(image-y)))) 376 + targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ 377 + $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, $(image-y)))) 376 378 377 379 $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz 378 380
+6 -1
arch/powerpc/include/asm/ppc_asm.h
··· 180 180 #define VCPU_GPR(n) __VCPU_GPR(__REG_##n) 181 181 182 182 #ifdef __KERNEL__ 183 - #ifdef CONFIG_PPC64 183 + 184 + /* 185 + * We use __powerpc64__ here because we want the compat VDSO to use the 32-bit 186 + * version below in the else case of the ifdef. 187 + */ 188 + #ifdef __powerpc64__ 184 189 185 190 #define STACKFRAMESIZE 256 186 191 #define __STK_REG(i) (112 + ((i)-14)*8)
+1 -1
arch/powerpc/include/asm/vdso/timebase.h
··· 49 49 return mftb(); 50 50 } 51 51 52 - static inline u64 get_tb(void) 52 + static __always_inline u64 get_tb(void) 53 53 { 54 54 unsigned int tbhi, tblo, tbhi2; 55 55
+17 -10
arch/powerpc/kernel/head_32.h
··· 121 121 #ifdef CONFIG_VMAP_STACK 122 122 mfspr r11, SPRN_SRR0 123 123 mtctr r11 124 - #endif 124 + andi. r11, r9, MSR_PR 125 + mr r11, r1 126 + lwz r1,TASK_STACK-THREAD(r12) 127 + beq- 99f 128 + addi r1, r1, THREAD_SIZE - INT_FRAME_SIZE 129 + li r10, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */ 130 + mtmsr r10 131 + isync 132 + tovirt(r12, r12) 133 + stw r11,GPR1(r1) 134 + stw r11,0(r1) 135 + mr r11, r1 136 + #else 125 137 andi. r11, r9, MSR_PR 126 138 lwz r11,TASK_STACK-THREAD(r12) 127 139 beq- 99f 128 140 addi r11, r11, THREAD_SIZE - INT_FRAME_SIZE 129 - #ifdef CONFIG_VMAP_STACK 130 - li r10, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */ 131 - mtmsr r10 132 - isync 141 + tophys(r11, r11) 142 + stw r1,GPR1(r11) 143 + stw r1,0(r11) 144 + tovirt(r1, r11) /* set new kernel sp */ 133 145 #endif 134 - tovirt_vmstack r12, r12 135 - tophys_novmstack r11, r11 136 146 mflr r10 137 147 stw r10, _LINK(r11) 138 148 #ifdef CONFIG_VMAP_STACK ··· 150 140 #else 151 141 mfspr r10,SPRN_SRR0 152 142 #endif 153 - stw r1,GPR1(r11) 154 - stw r1,0(r11) 155 - tovirt_novmstack r1, r11 /* set new kernel sp */ 156 143 stw r10,_NIP(r11) 157 144 mfcr r10 158 145 rlwinm r10,r10,0,4,2 /* Clear SO bit in CR */
+1 -1
arch/powerpc/kernel/smp.c
··· 990 990 { NULL, }, 991 991 }; 992 992 993 - static int init_big_cores(void) 993 + static int __init init_big_cores(void) 994 994 { 995 995 int cpu; 996 996
+2 -2
arch/powerpc/kernel/vdso32/Makefile
··· 2 2 3 3 # List of files in the vdso, has to be asm only for now 4 4 5 - ARCH_REL_TYPE_ABS := R_PPC_JUMP_SLOT|R_PPC_GLOB_DAT|R_PPC_ADDR32|R_PPC_ADDR24|R_PPC_ADDR16|R_PPC_ADDR16_LO|R_PPC_ADDR16_HI|R_PPC_ADDR16_HA|R_PPC_ADDR14|R_PPC_ADDR14_BRTAKEN|R_PPC_ADDR14_BRNTAKEN 5 + ARCH_REL_TYPE_ABS := R_PPC_JUMP_SLOT|R_PPC_GLOB_DAT|R_PPC_ADDR32|R_PPC_ADDR24|R_PPC_ADDR16|R_PPC_ADDR16_LO|R_PPC_ADDR16_HI|R_PPC_ADDR16_HA|R_PPC_ADDR14|R_PPC_ADDR14_BRTAKEN|R_PPC_ADDR14_BRNTAKEN|R_PPC_REL24 6 6 include $(srctree)/lib/vdso/Makefile 7 7 8 8 obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o ··· 27 27 CC32FLAGS := 28 28 ifdef CONFIG_PPC64 29 29 CC32FLAGS += -m32 30 - KBUILD_CFLAGS := $(filter-out -mcmodel=medium,$(KBUILD_CFLAGS)) 30 + KBUILD_CFLAGS := $(filter-out -mcmodel=medium -mabi=elfv1 -mabi=elfv2 -mcall-aixdesc,$(KBUILD_CFLAGS)) 31 31 endif 32 32 33 33 targets := $(obj-vdso32) vdso32.so.dbg
+1 -1
arch/powerpc/kernel/vdso64/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 # List of files in the vdso, has to be asm only for now 3 3 4 - ARCH_REL_TYPE_ABS := R_PPC_JUMP_SLOT|R_PPC_GLOB_DAT|R_PPC_ADDR32|R_PPC_ADDR24|R_PPC_ADDR16|R_PPC_ADDR16_LO|R_PPC_ADDR16_HI|R_PPC_ADDR16_HA|R_PPC_ADDR14|R_PPC_ADDR14_BRTAKEN|R_PPC_ADDR14_BRNTAKEN 4 + ARCH_REL_TYPE_ABS := R_PPC_JUMP_SLOT|R_PPC_GLOB_DAT|R_PPC_ADDR32|R_PPC_ADDR24|R_PPC_ADDR16|R_PPC_ADDR16_LO|R_PPC_ADDR16_HI|R_PPC_ADDR16_HA|R_PPC_ADDR14|R_PPC_ADDR14_BRTAKEN|R_PPC_ADDR14_BRNTAKEN|R_PPC_REL24 5 5 include $(srctree)/lib/vdso/Makefile 6 6 7 7 obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o