From nobody Thu Dec 21 13:43:59 2023 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 4Sws8w3WQSz54q15; Thu, 21 Dec 2023 13:44:00 +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 4Sws8w0R9nz4PT5; Thu, 21 Dec 2023 13:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703166240; 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=mchxLVlJoOdTPYs7BnKw9aLDc7sR3klKi++jkZ3gmBU=; b=nSjER/V1mwhbwnAxFv4dg8J3jRmukVni7URSm2nX9Cjclapx57diay7ePvg4VZZewqRaKc jbD/YSIli6OALbWKW3ZUJc9N7d6Jm9VVkC3/mCMRNGuuqnLIxx+Bmeew/5nYnui9qcd784 jKsT5FZ0QOU4YIlrrMDHOwZe40T2XUTXjX5DlUGqR5mXc0t+I4yhcRS+lUKL6qmevlzQli 8udPwkymcAJchmT3wYCie0m1Gn8ACfmfBxZbu7knHguib3de4jH85iQA1P1Q7PO+gK4lwf k6Hy4ldM7M0pGBwEBXfytWe1A8m+Li6oSerEu8NO4YBDpOtSmvqIwazr1EvpDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703166240; a=rsa-sha256; cv=none; b=Rc7LixmKeX2DmCk0vV5ZI+paO3uTIqUF5P9WtSQQ7IT+WhHJIpiaDhNxs982cgnUbMOPTe qaMXdxUvyRdLJF5VMRoqiksfEmLtf3S0jZ5y8JDrRiOjMHjobZk2vT82/+KYMJOaZQ30SY /wjZe+uG3jOO2Q0N58YDwdLRHSxVtg+cleIXK+CueiigqPZcoCBwyme7Y4V0y2R0FN42mh EIUoA6ZqYWa9BlW9SKzHaUs6TijBb7tBOg0Q+1TtL/28+wzw4eNztPschkbCDgcuklkcDq T4+T+avhr3jx7q8gmPCYE21SNlOCupVr3422bkOixhcCQrvXg5JSGq7xkI5+Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703166240; 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=mchxLVlJoOdTPYs7BnKw9aLDc7sR3klKi++jkZ3gmBU=; b=PWgFa5Kc0e3jsQOPlnYPXMUqrjN9FPw3s068Clqnnn6AzmSinBegpwObJDnHCWdc+S8az6 EbtEjOagZ7i/XiXcdgDXBeAehSzOMTiLU5HAolBKox2V3eyePpxcLwtbAver7Dl0wZ2dsP zXLKkWmL4rXsjrGCAtWoGuqws3raMnJBAATzQUc5NmFc/FxjNgcA2Df0Hqn0SKaEHcfguZ YSlTU+TZGaEmftlibl9p1oXgYCKQlcadfEURrEVZsNe5g2eV2o6RLhqhBogqm4gfQV03uT 0REIWdjHhEycx4yPs+Ac9z2vUfEeKZe6kz7/oyKtsTYYycyBtVpMYFgsqrHZnQ== 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 4Sws8v6dFgzb5t; Thu, 21 Dec 2023 13:43:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BLDhxDO080103; Thu, 21 Dec 2023 13:43:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BLDhxrc080100; Thu, 21 Dec 2023 13:43:59 GMT (envelope-from git) Date: Thu, 21 Dec 2023 13:43:59 GMT Message-Id: <202312211343.3BLDhxrc080100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 89af1555b4ef - stable/13 - linuxkpi: dma_get_cache_alignment(): Fix off-by-one result 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 89af1555b4ef7efbd8caedf905956b2a2a5df141 Auto-Submitted: auto-generated The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=89af1555b4ef7efbd8caedf905956b2a2a5df141 commit 89af1555b4ef7efbd8caedf905956b2a2a5df141 Author: Olivier Certner AuthorDate: 2023-10-13 15:13:28 +0000 Commit: Olivier Certner CommitDate: 2023-12-21 13:40:09 +0000 linuxkpi: dma_get_cache_alignment(): Fix off-by-one result Substituting 'uma_align_cache' by the appropriately named accessor uma_get_cache_align_mask() made apparent that dma_get_cache_alignment() was off by one, since it was defined to be the mask derived from the alignment value. Reviewed by: markj, bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42264 (cherry picked from commit 2c7dd66d09a1b92a4698232996cded6e5315b3bd) Approved by: markj (mentor) --- sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index fb63a45ac307..d0ada4df3e26 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -351,7 +351,7 @@ dma_max_mapping_size(struct device *dev) #define dma_unmap_len(p, name) ((p)->name) #define dma_unmap_len_set(p, name, v) (((p)->name) = (v)) -#define dma_get_cache_alignment() uma_get_cache_align_mask() +#define dma_get_cache_alignment() (uma_get_cache_align_mask() + 1) static inline int