Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106942740
D46238.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46238.diff
View Options
diff --git a/sys/arm64/arm64/busdma_bounce.c b/sys/arm64/arm64/busdma_bounce.c
--- a/sys/arm64/arm64/busdma_bounce.c
+++ b/sys/arm64/arm64/busdma_bounce.c
@@ -63,7 +63,9 @@
enum {
BF_COULD_BOUNCE = 0x01,
BF_MIN_ALLOC_COMP = 0x02,
- BF_KMEM_ALLOC = 0x04,
+ BF_KMEM_ALLOC_PAGES = 0x04,
+ BF_KMEM_ALLOC_CONTIG = 0x08,
+ BF_KMEM_ALLOC = BF_KMEM_ALLOC_PAGES | BF_KMEM_ALLOC_CONTIG,
BF_COHERENT = 0x10,
};
@@ -580,14 +582,14 @@
*vaddr = kmem_alloc_attr_domainset(
DOMAINSET_PREF(dmat->common.domain), dmat->alloc_size,
mflags, 0ul, dmat->common.lowaddr, attr);
- dmat->bounce_flags |= BF_KMEM_ALLOC;
+ dmat->bounce_flags |= BF_KMEM_ALLOC_PAGES;
} else {
*vaddr = kmem_alloc_contig_domainset(
DOMAINSET_PREF(dmat->common.domain), dmat->alloc_size,
mflags, 0ul, dmat->common.lowaddr,
dmat->alloc_alignment != 0 ? dmat->alloc_alignment : 1ul,
dmat->common.boundary, attr);
- dmat->bounce_flags |= BF_KMEM_ALLOC;
+ dmat->bounce_flags |= BF_KMEM_ALLOC_CONTIG;
}
if (*vaddr == NULL) {
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
@@ -856,7 +858,8 @@
* Compute the segment size, and adjust counts.
*/
sgsize = buflen;
- if ((map->flags & DMAMAP_FROM_DMAMEM) == 0)
+ if ((map->flags & DMAMAP_FROM_DMAMEM) == 0 ||
+ (dmat->bounce_flags & BF_KMEM_ALLOC_CONTIG) == 0)
sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
if (map->pagesneeded != 0 &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 8:02 PM (2 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15726314
Default Alt Text
D46238.diff (1 KB)
Attached To
Mode
D46238: arm64: Clamp segment sizes properly in bounce_bus_dmamap_load_buffer()
Attached
Detach File
Event Timeline
Log In to Comment