Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54dee406 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull arm64 fixes from Will Deacon:

 - Fix SPE probe failure when backing auxbuf with high-order pages

 - Fix handling of DMA allocations from outside of the vmalloc area

 - Fix generation of build-id ELF section for vDSO object

 - Disable huge I/O mappings if kernel page table dumping is enabled

 - A few other minor fixes (comments, kconfig etc)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: vdso: Explicitly add build-id option
  arm64/mm: Inhibit huge-vmap with ptdump
  arm64: Print physical address of page table base in show_pte()
  arm64: don't trash config with compat symbol if COMPAT is disabled
  arm64: assembler: Update comment above cond_yield_neon() macro
  drivers/perf: arm_spe: Don't error on high-order pages for aux buf
  arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable
parents 651bae98 7a0a93c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ config ARM64
	select ARCH_SUPPORTS_ATOMIC_RMW
	select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANG
	select ARCH_SUPPORTS_NUMA_BALANCING
	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
	select ARCH_WANT_FRAME_POINTERS
	select ARCH_HAS_UBSAN_SANITIZE_ALL
	select ARM_AMBA
+5 −6
Original line number Diff line number Diff line
@@ -718,12 +718,11 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU
 * the output section, any use of such directives is undefined.
 *
 * The yield itself consists of the following:
 * - Check whether the preempt count is exactly 1, in which case disabling
 *   preemption once will make the task preemptible. If this is not the case,
 *   yielding is pointless.
 * - Check whether TIF_NEED_RESCHED is set, and if so, disable and re-enable
 *   kernel mode NEON (which will trigger a reschedule), and branch to the
 *   yield fixup code.
 * - Check whether the preempt count is exactly 1 and a reschedule is also
 *   needed. If so, calling of preempt_enable() in kernel_neon_end() will
 *   trigger a reschedule. If it is not the case, yielding is pointless.
 * - Disable and re-enable kernel mode NEON, and branch to the yield fixup
 *   code.
 *
 * This macro sequence may clobber all CPU state that is not guaranteed by the
 * AAPCS to be preserved across an ordinary function call.
+2 −2
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@ obj-vdso := gettimeofday.o note.o sigreturn.o
targets := $(obj-vdso) vdso.so vdso.so.dbg
obj-vdso := $(addprefix $(obj)/, $(obj-vdso))

ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 \
		$(call ld-option, --hash-style=sysv) -n -T
ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
		--build-id -n -T

# Disable gcov profiling for VDSO code
GCOV_PROFILE := n
+10 −0
Original line number Diff line number Diff line
@@ -249,6 +249,11 @@ static int __iommu_mmap_attrs(struct device *dev, struct vm_area_struct *vma,
	if (dma_mmap_from_dev_coherent(dev, vma, cpu_addr, size, &ret))
		return ret;

	if (!is_vmalloc_addr(cpu_addr)) {
		unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr));
		return __swiotlb_mmap_pfn(vma, pfn, size);
	}

	if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) {
		/*
		 * DMA_ATTR_FORCE_CONTIGUOUS allocations are always remapped,
@@ -272,6 +277,11 @@ static int __iommu_get_sgtable(struct device *dev, struct sg_table *sgt,
	unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT;
	struct vm_struct *area = find_vm_area(cpu_addr);

	if (!is_vmalloc_addr(cpu_addr)) {
		struct page *page = virt_to_page(cpu_addr);
		return __swiotlb_get_sgtable_page(sgt, page, size);
	}

	if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) {
		/*
		 * DMA_ATTR_FORCE_CONTIGUOUS allocations are always remapped,
+3 −2
Original line number Diff line number Diff line
@@ -171,9 +171,10 @@ static void show_pte(unsigned long addr)
		return;
	}

	pr_alert("%s pgtable: %luk pages, %u-bit VAs, pgdp = %p\n",
	pr_alert("%s pgtable: %luk pages, %u-bit VAs, pgdp=%016lx\n",
		 mm == &init_mm ? "swapper" : "user", PAGE_SIZE / SZ_1K,
		 mm == &init_mm ? VA_BITS : (int) vabits_user, mm->pgd);
		 mm == &init_mm ? VA_BITS : (int)vabits_user,
		 (unsigned long)virt_to_phys(mm->pgd));
	pgdp = pgd_offset(mm, addr);
	pgd = READ_ONCE(*pgdp);
	pr_alert("[%016lx] pgd=%016llx", addr, pgd_val(pgd));
Loading