projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19d0aee
)
Revert "xen/swiotlb: add alignment check for dma buffers"
author
Ben Hutchings
<ben@decadent.org.uk>
Mon, 24 Feb 2025 01:02:26 +0000
(
02:02
+0100)
committer
Ben Hutchings
<benh@debian.org>
Mon, 24 Feb 2025 01:11:58 +0000
(
02:11
+0100)
Bug-Debian: https://bugs.debian.org/
1087807
Bug-Debian: https://bugs.debian.org/
1088159
Bug-Debian: https://bugs.debian.org/
1093371
This reverts commit
a0a8b7bebe1b1f9017b09e1e045f16725e871f9c
, which
was commit
9f40ec84a7976d95c34e7cc070939deb103652b0
upstream. This
caused regressions for a number of drivers under Xen.
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name revert-xen-swiotlb-add-alignment-check-for-dma-buffe.patch
drivers/xen/swiotlb-xen.c
patch
|
blob
|
history
diff --git
a/drivers/xen/swiotlb-xen.c
b/drivers/xen/swiotlb-xen.c
index 000d02ea4f7d8a7a9ba8282968e9082694a61666..ad3ee4857e154ee6be967551fe772abb679bc727 100644
(file)
--- a/
drivers/xen/swiotlb-xen.c
+++ b/
drivers/xen/swiotlb-xen.c
@@
-91,15
+91,9
@@
static inline int range_straddles_page_boundary(phys_addr_t p, size_t size)
{
unsigned long next_bfn, xen_pfn = XEN_PFN_DOWN(p);
unsigned int i, nr_pages = XEN_PFN_UP(xen_offset_in_page(p) + size);
- phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
next_bfn = pfn_to_bfn(xen_pfn);
- /* If buffer is physically aligned, ensure DMA alignment. */
- if (IS_ALIGNED(p, algn) &&
- !IS_ALIGNED((phys_addr_t)next_bfn << XEN_PAGE_SHIFT, algn))
- return 1;
-
for (i = 1; i < nr_pages; i++)
if (pfn_to_bfn(++xen_pfn) != ++next_bfn)
return 1;