From nobody Tue Jan 04 15:24:56 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 74933193879B; Tue, 4 Jan 2022 15:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JSxHs1J41z3rdm; Tue, 4 Jan 2022 15:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C43F1B16C; Tue, 4 Jan 2022 15:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 204FOuuK010852; Tue, 4 Jan 2022 15:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 204FOu0A010851; Tue, 4 Jan 2022 15:24:56 GMT (envelope-from git) Date: Tue, 4 Jan 2022 15:24:56 GMT Message-Id: <202201041524.204FOu0A010851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 3a9688f8bc48 - main - busdma: Fix powerpc DMA alignment check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a9688f8bc488b16bf5676057fa86263554312b0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641309897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hltc9Q4Hq+ziCV7E/3b10aYICjn9NpO0cFiG799WWAU=; b=XAvuiGEqs7p71lcvWRXtqx1koq6en9ldHIOEz3MtvhHKFnLAYMEq41Gq6XPDwc/qWCY3JK t08611c08eBABjAZbtRJW/f2Zo+kIwYNiCszbOxtUERIvopv+4raCCPXeph8bZDcocC81r 3kmiOFKx0ntMM12ilR0DTQ++DL6/qQ94ru/uPiohXtXwX0LEeNf+rxCVOzueG+w85taX6q 2BCgF5HFQgu9aTSlCIQskGkKgAg8eJtDOUy4vN5IvkAsJm7yZgDg3I5gQs8QFPztMyaNpA I4yNL4K9bT8uHWPGGRAq+D9VRQ72T+LvbYvaOaQXeow4IPwKhoJY5l9lFtWW/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641309897; a=rsa-sha256; cv=none; b=DaPMfaBDqmCYx1fJmP57XlrsicvDJ7bP1Nj9UbS7la39BZMoUbuhzNiwIpQtRmnmWx5GYh xPU3lvuWpEWg+kayxY3WqQBupv0pn75fh/G6H9fb0lAeuW1GA9H4xAsD11DIdfgkcV0Bbz bDeLp7FrM4Hq7aV4hg5KJxeROGJM9bXEaXJueO9LX9nPHrGcswO6hFhEyzIrBBoWNs/gW1 6yOwQq9eRzBWHSm0tSaCT696B0oIM7H9GVePVF1pd1CXcFdcayZljedbRIolD6RBzapBdQ 68N0+DiVnqAX2Xnu9f28/86FRYJj9yoilqDpL27fYDKMo+drOYflxbLeh5WH3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=3a9688f8bc488b16bf5676057fa86263554312b0 commit 3a9688f8bc488b16bf5676057fa86263554312b0 Author: Justin Hibbits AuthorDate: 2022-01-04 15:22:04 +0000 Commit: Justin Hibbits 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)