Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

- Fix max_pfn calculation when hotplugging memory so that it never
decreases

- Fix dereference of unused source register in the MOPS SET operation
fault handling

- Fix NULL calling in do_compat_alignment_fixup() when the 32-bit user
space does an unaligned LDREX/STREX

- Add the HiSilicon HIP09 processor to the Spectre-BHB affected CPUs

- Drop unused code pud accessors (special/mkspecial)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: Don't call NULL in do_compat_alignment_fixup()
arm64: Add support for HIP09 Spectre-BHB mitigation
arm64: mm: Drop dead code for pud special bit handling
arm64: mops: Do not dereference src reg for a set operation
arm64: mm: Correct the update of max_pfn

+9 -8
+2
arch/arm64/include/asm/cputype.h
··· 132 132 #define FUJITSU_CPU_PART_A64FX 0x001 133 133 134 134 #define HISI_CPU_PART_TSV110 0xD01 135 + #define HISI_CPU_PART_HIP09 0xD02 135 136 136 137 #define APPLE_CPU_PART_M1_ICESTORM 0x022 137 138 #define APPLE_CPU_PART_M1_FIRESTORM 0x023 ··· 219 218 #define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL) 220 219 #define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX) 221 220 #define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110) 221 + #define MIDR_HISI_HIP09 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP09) 222 222 #define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM) 223 223 #define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM) 224 224 #define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO)
-5
arch/arm64/include/asm/pgtable.h
··· 633 633 #define pud_pfn(pud) ((__pud_to_phys(pud) & PUD_MASK) >> PAGE_SHIFT) 634 634 #define pfn_pud(pfn,prot) __pud(__phys_to_pud_val((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot)) 635 635 636 - #ifdef CONFIG_ARCH_SUPPORTS_PUD_PFNMAP 637 - #define pud_special(pte) pte_special(pud_pte(pud)) 638 - #define pud_mkspecial(pte) pte_pud(pte_mkspecial(pud_pte(pud))) 639 - #endif 640 - 641 636 #define pmd_pgprot pmd_pgprot 642 637 static inline pgprot_t pmd_pgprot(pmd_t pmd) 643 638 {
+2 -2
arch/arm64/include/asm/traps.h
··· 109 109 int dstreg = ESR_ELx_MOPS_ISS_DESTREG(esr); 110 110 int srcreg = ESR_ELx_MOPS_ISS_SRCREG(esr); 111 111 int sizereg = ESR_ELx_MOPS_ISS_SIZEREG(esr); 112 - unsigned long dst, src, size; 112 + unsigned long dst, size; 113 113 114 114 dst = regs->regs[dstreg]; 115 - src = regs->regs[srcreg]; 116 115 size = regs->regs[sizereg]; 117 116 118 117 /* ··· 128 129 } 129 130 } else { 130 131 /* CPY* instruction */ 132 + unsigned long src = regs->regs[srcreg]; 131 133 if (!(option_a ^ wrong_option)) { 132 134 /* Format is from Option B */ 133 135 if (regs->pstate & PSR_N_BIT) {
+2
arch/arm64/kernel/compat_alignment.c
··· 368 368 return 1; 369 369 } 370 370 371 + if (!handler) 372 + return 1; 371 373 type = handler(addr, instr, regs); 372 374 373 375 if (type == TYPE_ERROR || type == TYPE_FAULT)
+1
arch/arm64/kernel/proton-pack.c
··· 901 901 MIDR_ALL_VERSIONS(MIDR_CORTEX_A77), 902 902 MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1), 903 903 MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD), 904 + MIDR_ALL_VERSIONS(MIDR_HISI_HIP09), 904 905 {}, 905 906 }; 906 907 static const struct midr_range spectre_bhb_k11_list[] = {
+2 -1
arch/arm64/mm/mmu.c
··· 1361 1361 __remove_pgd_mapping(swapper_pg_dir, 1362 1362 __phys_to_virt(start), size); 1363 1363 else { 1364 - max_pfn = PFN_UP(start + size); 1364 + /* Address of hotplugged memory can be smaller */ 1365 + max_pfn = max(max_pfn, PFN_UP(start + size)); 1365 1366 max_low_pfn = max_pfn; 1366 1367 } 1367 1368