freebsd-skq/sys
Ian Lepore 53f93ed3ff Fix an alignment check that is wrong in half the busdma implementations.
This will enable the elimination of a workaround in the USB driver that
artifically allocates buffers twice as big as they need to be (which
actually saves memory for very small buffers on the buggy platforms).

When deciding how to allocate a dma buffer, armv4, armv6, mips, and
x86/iommu all correctly check for the tag alignment <= maxsize as enabling
simple uma/malloc based allocation.  Powerpc, sparc64, x86/bounce, and
arm64/bounce were all checking for alignment < maxsize; on those platforms
when alignment was equal to the max size it would fall back to page-based
allocators even for very small buffers.

This change makes all platforms use the <= check.  It should be noted that
on all platforms other than arm[v6] and mips, this check is relying on
undocumented behavior in malloc(9) that if you allocate a block of a given
size it will be aligned to the next larger power-of-2 boundary.  There is
nothing in the malloc(9) man page that makes that explicit promise (but the
busdma code has been relying on this behavior all along so I guess it works).

Arm and mips code uses the allocator in kern/subr_busdma_buffalloc.c, which
does explicitly implement this promise about size and alignment.  Other
platforms probably should switch to the aligned allocator.
2015-11-02 23:37:19 +00:00
..
amd64 pmap_change_attr: Only fixup DMAP for DMAPed ranges 2015-10-29 19:07:00 +00:00
arm Eliminate the last dregs of the old global arm_root_dma_tag. 2015-11-02 22:49:39 +00:00
arm64 Fix an alignment check that is wrong in half the busdma implementations. 2015-11-02 23:37:19 +00:00
boot Make vers.c creation atomic by using a temporary file, then moving 2015-10-24 21:59:58 +00:00
bsm
cam Don't try to replicate mode pages not present on this device. 2015-10-26 14:14:56 +00:00
cddl zfs: allow the lookup of extended attributes of an unlinked file 2015-11-02 10:07:21 +00:00
compat Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
conf Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
contrib Synchronize with latest upstream VCHI code: 2015-11-01 22:17:39 +00:00
crypto const'ify an arg that we don't update... 2015-07-29 23:37:15 +00:00
ddb Make kstack_pages a tunable on arm, x86, and powepc. On i386, the 2015-08-10 17:18:21 +00:00
dev drm/i915: Reduce diff with Linux 3.8 2015-11-01 19:55:32 +00:00
fs Ensure that when a blockable open of fifo returns success, a valid 2015-09-20 21:18:33 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom Remove compatibility shims for legacy ATA device names. 2015-10-11 13:01:51 +00:00
gnu Fixing a memory leak on module unloading. 2015-09-11 22:43:35 +00:00
i386 The prefix for CLFLUSHOPT is 0x66. It was right on amd64. 2015-10-30 09:53:33 +00:00
isa
kern Define fhard in pps_event(..) only when PPS_SYNC is defined to mute 2015-11-02 03:14:37 +00:00
kgssapi
libkern libkern: ffs, fls: s/4/3/ the 3rd BSD clause 2015-10-22 21:04:47 +00:00
mips mips: rate limit the trap handler output; add pid/tid/program name. 2015-11-02 03:36:15 +00:00
modules Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
net Fix three flowtable bugs, a) one lookup issue, b) a two cleaner issue. 2015-11-02 21:21:00 +00:00
net80211 net80211: add ieee80211_restart_all() call. 2015-10-27 20:40:57 +00:00
netgraph Bluetooth LE Security Management channel support. 2015-10-27 03:42:26 +00:00
netinet Set the proper direction to check for policies in this one case. 2015-10-29 21:26:32 +00:00
netinet6 Use m_cat() to reassembly IPv6 packets. 2015-10-27 22:11:09 +00:00
netipsec Turning on IPSEC used to introduce a slight amount of performance 2015-10-27 00:42:15 +00:00
netnatm
netpfil pf: Fix IPv6 checksums with route-to. 2015-10-29 20:45:53 +00:00
netsmb
nfs Wait up to 10 seconds for late-initializing network interfaces to arrive. 2015-09-26 13:55:55 +00:00
nfsclient
nfsserver
nlm
ofed Finish process of moving the LinuxKPI module into the default kernel build. 2015-10-29 08:28:39 +00:00
opencrypto Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
pc98 Remove compatibility shims for legacy ATA device names. 2015-10-11 13:01:51 +00:00
powerpc Fix an alignment check that is wrong in half the busdma implementations. 2015-11-02 23:37:19 +00:00
rpc Increase group limit for kerberized NFSv4 2015-09-26 16:30:16 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Fix an alignment check that is wrong in half the busdma implementations. 2015-11-02 23:37:19 +00:00
sys Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi) 2015-11-02 20:03:59 +00:00
teken Sync HPA and VPA implementations with CUP. 2015-08-24 07:49:27 +00:00
tools Rename the /usr/share/doc/legal files to driver.LICENSE to work around 2015-10-16 00:38:05 +00:00
ufs Do not perform read-ahead for BA_CLRBUF request when we are low on 2015-10-27 13:44:13 +00:00
vm Reduce the amount of calls to VOP_BMAP() made from the local vnode 2015-10-24 21:59:22 +00:00
x86 Fix an alignment check that is wrong in half the busdma implementations. 2015-11-02 23:37:19 +00:00
xdr
xen xen: Code cleanup and small bug fixes 2015-10-21 10:44:07 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00