freebsd-dev/sys/arm64/arm64
Hans Petter Selasky 65b017b420 Avoid use of contiguous memory allocations in busdma when possible.
This patch improves the boundary checks in busdma to allow more cases
using the regular page based kernel memory allocator. Especially in
the case of having a non-zero boundary in the parent DMA tag. For
example AMD64 based platforms set the PCI DMA tag boundary to
PCI_DMA_BOUNDARY, 4GB, which before this patch caused contiguous
memory allocations to be preferred when allocating more than PAGE_SIZE
bytes. Even if the required alignment was less than PAGE_SIZE bytes.

This patch also fixes the nsegments check for using kmem_alloc_attr()
when the maximum segment size is less than PAGE_SIZE bytes.

Updated some comments describing the code in question.

Differential Revision:	https://reviews.freebsd.org/D10645
Reviewed by:		kib, jhb, gallatin, scottl
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-05-16 14:21:37 +00:00
..
autoconf.c Finish removing the non-INTRNG support from sys/arm64. 2016-07-14 17:31:29 +00:00
bus_machdep.c Add support for bus_space_read_region and bus_space_write_region. This is 2015-08-14 09:55:25 +00:00
bus_space_asm.S Add support for bus_space_read_region and bus_space_write_region. This is 2015-08-14 09:55:25 +00:00
busdma_bounce.c Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
busdma_machdep.c Port x86 busdma to ARM64 2015-05-08 18:47:19 +00:00
bzero.S Add bzero.S to ARM64 machdep 2016-04-04 07:11:33 +00:00
clock.c
copyinout.S In ARMv8.1 ARM has added a process state bit to disable access to userspace 2017-04-13 13:46:01 +00:00
copystr.c Correctly handle the case where copystr(9) is given a string longer than 2016-02-02 10:11:56 +00:00
cpufunc_asm.S Remove arm64_tlb_flushID_SE, it's unused and may be wrong. 2017-02-06 17:50:09 +00:00
db_disasm.c Use designated initialisers for the db disassembler interface to help with 2016-02-09 10:18:22 +00:00
db_interface.c Use kdb_jmpbuf and setjmp to handle accessing invalid addresses in the 2015-08-25 17:02:28 +00:00
db_trace.c Add a missing opt_ddb.h include from places that include debug_moditor.h 2016-09-13 16:20:31 +00:00
debug_monitor.c Add a missing opt_ddb.h include from places that include debug_moditor.h 2016-09-13 16:20:31 +00:00
disassem.c ARM64 disassembler: support for LDR instructions 2016-02-11 06:50:11 +00:00
dump_machdep.c
elf_machdep.c Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall 2016-01-09 20:18:53 +00:00
exception.S Push loading curthread into assembly in the synchronous exception handlers. 2017-04-20 13:56:30 +00:00
genassym.c Push loading curthread into assembly in the synchronous exception handlers. 2017-04-20 13:56:30 +00:00
gic_v3_fdt.c Add the missing gic_common.h include for GIC_BUS_FDT. 2016-12-06 15:16:00 +00:00
gic_v3_reg.h Initialize GIC[DR]_IGROUPRn registers for GICv3 2016-12-18 08:31:01 +00:00
gic_v3_var.h Create two GIC ivars to find the bus type and GIC hardware version. These 2016-12-06 15:12:14 +00:00
gic_v3.c Use proper fields to check for interrupt trigger mode. 2017-04-13 14:23:27 +00:00
gicv3_its.c Move the common bit manipulation macros from the GICv3 header to the 2016-12-06 13:55:19 +00:00
identcpu.c Fix improper use of "its". 2016-11-08 23:59:41 +00:00
in_cksum.c
locore.S Add SCTLR bits added in ARMv8.1 and ARMv8.2 and start to use them in the 2017-04-13 11:56:27 +00:00
machdep.c Print all virtual addresses in the show vtop ddb command. The results may 2017-05-03 12:24:31 +00:00
mem.c Drop support for using mmap() with /dev/kmem. 2016-10-14 20:01:07 +00:00
memcpy.S Import the Cortex String memcpy and memmove into the kernel. On ThunderX 2016-10-25 14:04:35 +00:00
memmove.S Import the Cortex String memcpy and memmove into the kernel. On ThunderX 2016-10-25 14:04:35 +00:00
minidump_machdep.c All these files need sys/vmmeter.h, but now they got it implicitly 2017-04-17 17:07:00 +00:00
mp_machdep.c In ARMv8.1 ARM has added a process state bit to disable access to userspace 2017-04-13 13:46:01 +00:00
nexus.c Add the missing DEVMETHOD_ENDs to the arm64 nexus ACPI and FDT drivers. 2016-11-22 19:31:32 +00:00
ofw_machdep.c Allow callers of OF_decode_addr to get the size of the found mapping. This 2016-02-16 15:18:12 +00:00
pmap.c Add reclaim_pv_chunk on arm64. This is based on the amd64 code so should 2017-05-05 10:01:27 +00:00
stack_machdep.c Add stack_save_td_running(), a function to trace the kernel stack of a 2015-09-11 03:54:37 +00:00
support.S In ARMv8.1 ARM has added a process state bit to disable access to userspace 2017-04-13 13:46:01 +00:00
swtch.S Load the new sp_el0 with interrupts disabled in fork_trampoline. If an 2017-02-15 14:56:47 +00:00
sys_machdep.c
trap.c Restrict the arm64 supervisor all instructions to only allow a zero 2017-04-20 15:53:20 +00:00
uio_machdep.c Add ARM64TODO markers to unimplemented functionality 2015-07-30 14:20:36 +00:00
uma_machdep.c All these files need sys/vmmeter.h, but now they got it implicitly 2017-04-17 17:07:00 +00:00
unwind.c Check the frame pointer is within the kernel before accessing it. 2015-08-24 17:28:19 +00:00
vfp.c Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
vm_machdep.c Call the PSCI reset from cpu_reset on arm64. When rebooting from DDB the 2017-04-24 11:06:10 +00:00