Date: Tue, 4 Jan 2022 15:24:56 GMT From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 3a9688f8bc48 - main - busdma: Fix powerpc DMA alignment check Message-ID: <202201041524.204FOu0A010851@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=3a9688f8bc488b16bf5676057fa86263554312b0 commit 3a9688f8bc488b16bf5676057fa86263554312b0 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2022-01-04 15:22:04 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> CommitDate: 2022-01-04 15:24:03 +0000 busdma: Fix powerpc DMA alignment check The original logic was to check if there's no filter and the address is misaligned relative to the requirements. The refactoring in c606ab59e7f9423f7027320e9a4514c7db39658d missed this, and instead caused it to return failure if the address *is* properly aligned. --- sys/powerpc/powerpc/busdma_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c index f75d3e1efcf9..95eb98a5cbab 100644 --- a/sys/powerpc/powerpc/busdma_machdep.c +++ b/sys/powerpc/powerpc/busdma_machdep.c @@ -172,7 +172,7 @@ run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) paddr > dmat->lowaddr && paddr <= dmat->highaddr) retval = 1; if (dmat->filter == NULL && - vm_addr_align_ok(paddr, dmat->alignment)) + !vm_addr_align_ok(paddr, dmat->alignment)) retval = 1; if (dmat->filter != NULL && (*dmat->filter)(dmat->filterarg, paddr) != 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201041524.204FOu0A010851>