ARM updates for v6.8-rc1
Development updates for v6.8-rc1 - add missing neon instructions for the neon support hook - arrange for davinci to select PINCTRL - try VMA lock-base page fault handling first - use memblock_alloc_try_nid_raw() for kasan shadow page - dma: use kvzalloc() rather than kzalloc()/vzalloc() -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAmWm7poACgkQ9OeQG+St rGQxCxAAotQ2uOX7Ud0H+hSgimOAwOzzHcSSQ1VNL8S5jeLydOiEqXqRntWqm9B9 rYTI0uSNAe3wRR4l55aVHanb5dAxPHmrK1pTbH3cUP7i4vGo3HcU9B+R1mJ7ZuP1 JBF7+NCNq2A735r7GsjHe+JFEeGAWMn9z0Cm6hNUBEutVdtqLDuLI06TCVpxkaYY WdTPGaDzlMDC0lY5+7fkavkiwpKMFYNw2GVMR/J0O0zPYt9YAdBjVJGdahYbKgBS xWd8I/H+w0mwTdY8c643nTt2wPRODV1xPyhIyP7qYsQZpMJ5ipYB7nhlqrJArMz0 4qE9i+1EdgDpp+4CLhoO57H6OULyHQqAlMKREx9AgxGZ9a+sCArbkha+hL7oXQLi o8OMnKjXrlfiqFReOgK+QDtJWSUhUvv4piEnJxtMD52YU2dMe5RkHpVnXFRcf0gE dCGZn/QaA1IrSHmAcHrkz15zpOutJIVuf015EkxLhMYKzcROFVxdNXZ16eCFoUfw NcJ9wRcCDJ2juhpxf0QqWgEUgrFAP1Pl532yh6C2W8JNuf2kWZw2uLxZurSZ+oLj junib4F/zCmge1Czbjk0QeuwUu+xbQtkp49GA5pPE4uMiRR4gHsPihBDzd+HfYzl nuDgv0T3GsnDNjfyeOVTtFX0e4nIVFmRc6GUks3cLonmEgvXzXA= =I9lX -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - add missing neon instructions for the neon support hook - arrange for davinci to select PINCTRL - try VMA lock-base page fault handling first - use memblock_alloc_try_nid_raw() for kasan shadow page - dma: use kvzalloc() rather than kzalloc()/vzalloc() * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9331/1: ARM/dma-mapping: replace kzalloc() and vzalloc() with kvzalloc() ARM: 9329/1: kasan: Use memblock_alloc_try_nid_raw for shadow page ARM: 9328/1: mm: try VMA lock-based page fault handling first ARM: 9330/1: davinci: also select PINCTRL ARM: 9327/1: vfp: Add missing VFP instructions to neon_support_hook
This commit is contained in:
commit
c4c6044d35
@ -35,6 +35,7 @@ config ARM
|
||||
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7
|
||||
select ARCH_SUPPORTS_ATOMIC_RMW
|
||||
select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE
|
||||
select ARCH_SUPPORTS_PER_VMA_LOCK
|
||||
select ARCH_USE_BUILTIN_BSWAP
|
||||
select ARCH_USE_CMPXCHG_LOCKREF
|
||||
select ARCH_USE_MEMTEST
|
||||
|
@ -11,6 +11,7 @@ menuconfig ARCH_DAVINCI
|
||||
select PM_GENERIC_DOMAINS_OF if PM && OF
|
||||
select REGMAP_MMIO
|
||||
select RESET_CONTROLLER
|
||||
select PINCTRL
|
||||
select PINCTRL_SINGLE
|
||||
|
||||
if ARCH_DAVINCI
|
||||
|
@ -859,10 +859,7 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size,
|
||||
int i = 0;
|
||||
int order_idx = 0;
|
||||
|
||||
if (array_size <= PAGE_SIZE)
|
||||
pages = kzalloc(array_size, GFP_KERNEL);
|
||||
else
|
||||
pages = vzalloc(array_size);
|
||||
pages = kvzalloc(array_size, GFP_KERNEL);
|
||||
if (!pages)
|
||||
return NULL;
|
||||
|
||||
|
@ -278,6 +278,35 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, addr);
|
||||
|
||||
if (!(flags & FAULT_FLAG_USER))
|
||||
goto lock_mmap;
|
||||
|
||||
vma = lock_vma_under_rcu(mm, addr);
|
||||
if (!vma)
|
||||
goto lock_mmap;
|
||||
|
||||
if (!(vma->vm_flags & vm_flags)) {
|
||||
vma_end_read(vma);
|
||||
goto lock_mmap;
|
||||
}
|
||||
fault = handle_mm_fault(vma, addr, flags | FAULT_FLAG_VMA_LOCK, regs);
|
||||
if (!(fault & (VM_FAULT_RETRY | VM_FAULT_COMPLETED)))
|
||||
vma_end_read(vma);
|
||||
|
||||
if (!(fault & VM_FAULT_RETRY)) {
|
||||
count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
|
||||
goto done;
|
||||
}
|
||||
count_vm_vma_lock_event(VMA_LOCK_RETRY);
|
||||
|
||||
/* Quick path to respond to signals */
|
||||
if (fault_signal_pending(fault, regs)) {
|
||||
if (!user_mode(regs))
|
||||
goto no_context;
|
||||
return 0;
|
||||
}
|
||||
lock_mmap:
|
||||
|
||||
retry:
|
||||
vma = lock_mm_and_find_vma(mm, addr, regs);
|
||||
if (unlikely(!vma)) {
|
||||
@ -316,6 +345,7 @@ retry:
|
||||
}
|
||||
|
||||
mmap_read_unlock(mm);
|
||||
done:
|
||||
|
||||
/*
|
||||
* Handle the "normal" case first - VM_FAULT_MAJOR
|
||||
|
@ -28,6 +28,12 @@ static pgd_t tmp_pgd_table[PTRS_PER_PGD] __initdata __aligned(PGD_SIZE);
|
||||
|
||||
pmd_t tmp_pmd_table[PTRS_PER_PMD] __page_aligned_bss;
|
||||
|
||||
static __init void *kasan_alloc_block_raw(size_t size)
|
||||
{
|
||||
return memblock_alloc_try_nid_raw(size, size, __pa(MAX_DMA_ADDRESS),
|
||||
MEMBLOCK_ALLOC_NOLEAKTRACE, NUMA_NO_NODE);
|
||||
}
|
||||
|
||||
static __init void *kasan_alloc_block(size_t size)
|
||||
{
|
||||
return memblock_alloc_try_nid(size, size, __pa(MAX_DMA_ADDRESS),
|
||||
@ -50,7 +56,7 @@ static void __init kasan_pte_populate(pmd_t *pmdp, unsigned long addr,
|
||||
if (!pte_none(READ_ONCE(*ptep)))
|
||||
continue;
|
||||
|
||||
p = kasan_alloc_block(PAGE_SIZE);
|
||||
p = kasan_alloc_block_raw(PAGE_SIZE);
|
||||
if (!p) {
|
||||
panic("%s failed to allocate shadow page for address 0x%lx\n",
|
||||
__func__, addr);
|
||||
|
@ -800,6 +800,24 @@ static struct undef_hook neon_support_hook[] = {{
|
||||
.cpsr_mask = PSR_T_BIT,
|
||||
.cpsr_val = PSR_T_BIT,
|
||||
.fn = vfp_support_entry,
|
||||
}, {
|
||||
.instr_mask = 0xff000800,
|
||||
.instr_val = 0xfc000800,
|
||||
.cpsr_mask = 0,
|
||||
.cpsr_val = 0,
|
||||
.fn = vfp_support_entry,
|
||||
}, {
|
||||
.instr_mask = 0xff000800,
|
||||
.instr_val = 0xfd000800,
|
||||
.cpsr_mask = 0,
|
||||
.cpsr_val = 0,
|
||||
.fn = vfp_support_entry,
|
||||
}, {
|
||||
.instr_mask = 0xff000800,
|
||||
.instr_val = 0xfe000800,
|
||||
.cpsr_mask = 0,
|
||||
.cpsr_val = 0,
|
||||
.fn = vfp_support_entry,
|
||||
}};
|
||||
|
||||
static struct undef_hook vfp_support_hook = {
|
||||
|
Loading…
Reference in New Issue
Block a user