Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jul 2022 17:05:07 GMT
From:      Doug Moore <dougm@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1334074959c1 - stable/13 - busdma_iommu: Eliminate a redundant trunc_page()
Message-ID:  <202207061705.266H57BW083788@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dougm:

URL: https://cgit.FreeBSD.org/src/commit/?id=1334074959c19a3378387d4a892879c12b573816

commit 1334074959c19a3378387d4a892879c12b573816
Author:     Alan Cox <alc@FreeBSD.org>
AuthorDate: 2022-06-20 18:40:42 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2022-07-06 16:52:52 +0000

    busdma_iommu: Eliminate a redundant trunc_page()
    
    Since OFF_TO_IDX() inherently truncates the given value, there is no
    need to perform trunc_page() on it.
    
    MFC after:      2 weeks
    
    (cherry picked from commit 32e82bcc152783dfe0d03ffdd864cedfddbc80d7)
---
 sys/dev/iommu/busdma_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c
index da2318eac393..81d9e6ab969a 100644
--- a/sys/dev/iommu/busdma_iommu.c
+++ b/sys/dev/iommu/busdma_iommu.c
@@ -633,7 +633,7 @@ iommu_bus_dmamap_load_something1(struct bus_dma_tag_iommu *tag,
 		segs[seg].ds_addr = entry->start + offset;
 		segs[seg].ds_len = buflen1;
 
-		idx += OFF_TO_IDX(trunc_page(offset + buflen1));
+		idx += OFF_TO_IDX(offset + buflen1);
 		offset += buflen1;
 		offset &= IOMMU_PAGE_MASK;
 		buflen -= buflen1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207061705.266H57BW083788>