freebsd-dev/sys/mips
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
..
adm5120 Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
alchemy Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
atheros [ar934x] do an ethernet analog reset; apparently some boards don't. 2017-05-06 06:09:50 +00:00
beri Switch BERI Programmable Interrupt Controller to INTRNG. 2017-04-18 17:20:03 +00:00
broadcom Add support for dumping bcma/siba EROM tables to the console via a new 2017-04-24 18:35:25 +00:00
cavium Add cavium octeon 'bootoctlinux' boot argument support 2017-03-16 00:49:59 +00:00
conf [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code. 2017-05-06 06:20:34 +00:00
gxemul Allow the use of soft-interrupts for sending IPIs. 2016-09-08 17:37:13 +00:00
idt Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
include Add initial support for the floating point implementation register. 2017-05-09 17:35:16 +00:00
ingenic Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges 2017-03-07 22:42:44 +00:00
malta Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
mediatek [mediatek] [gpio] add PPS / interrupt support. 2017-05-06 06:22:14 +00:00
mips Avoid use of contiguous memory allocations in busdma when possible. 2017-05-16 14:21:37 +00:00
nlm Fix build: include machine/bus.h before uart.h 2017-03-02 17:09:14 +00:00
rmi Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
rt305x Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
sibyte Convert PCIe Hot Plug to using pci_request_feature 2017-02-25 06:11:59 +00:00