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

Pull arm64 fixes from Catalin Marinas:

- clear buffers allocated with FORCE_CONTIGUOUS explicitly until the
CMA code honours __GFP_ZERO

- notrace annotation for secondary_start_kernel()

- use early_param() instead of __setup() for "kpti=" as it is needed
for the cpufeature callback remapping swapper to non-global mappings

- ensure writes to swapper are ordered wrt subsequent cache maintenance
in the kpti non-global remapping code

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: mm: Ensure writes to swapper are ordered wrt subsequent cache maintenance
arm64: kpti: Use early_param for kpti= command-line option
arm64: make secondary_start_kernel() notrace
arm64: dma-mapping: clear buffers allocated with FORCE_CONTIGUOUS flag

+10 -8
+1 -1
arch/arm64/kernel/cpufeature.c
··· 937 937 __kpti_forced = enabled ? 1 : -1; 938 938 return 0; 939 939 } 940 - __setup("kpti=", parse_kpti); 940 + early_param("kpti", parse_kpti); 941 941 #endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */ 942 942 943 943 #ifdef CONFIG_ARM64_HW_AFDBM
+1 -1
arch/arm64/kernel/smp.c
··· 179 179 * This is the secondary CPU boot entry. We're using this CPUs 180 180 * idle thread stack, but a set of temporary page tables. 181 181 */ 182 - asmlinkage void secondary_start_kernel(void) 182 + asmlinkage notrace void secondary_start_kernel(void) 183 183 { 184 184 u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; 185 185 struct mm_struct *mm = &init_mm;
+5 -4
arch/arm64/mm/dma-mapping.c
··· 583 583 size >> PAGE_SHIFT); 584 584 return NULL; 585 585 } 586 - if (!coherent) 587 - __dma_flush_area(page_to_virt(page), iosize); 588 - 589 586 addr = dma_common_contiguous_remap(page, size, VM_USERMAP, 590 587 prot, 591 588 __builtin_return_address(0)); 592 - if (!addr) { 589 + if (addr) { 590 + memset(addr, 0, size); 591 + if (!coherent) 592 + __dma_flush_area(page_to_virt(page), iosize); 593 + } else { 593 594 iommu_dma_unmap_page(dev, *handle, iosize, 0, attrs); 594 595 dma_release_from_contiguous(dev, page, 595 596 size >> PAGE_SHIFT);
+3 -2
arch/arm64/mm/proc.S
··· 217 217 218 218 .macro __idmap_kpti_put_pgtable_ent_ng, type 219 219 orr \type, \type, #PTE_NG // Same bit for blocks and pages 220 - str \type, [cur_\()\type\()p] // Update the entry and ensure it 221 - dc civac, cur_\()\type\()p // is visible to all CPUs. 220 + str \type, [cur_\()\type\()p] // Update the entry and ensure 221 + dmb sy // that it is visible to all 222 + dc civac, cur_\()\type\()p // CPUs. 222 223 .endm 223 224 224 225 /*