From nobody Thu Nov 16 20:54:45 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 4SWXN53zNKz5150H; Thu, 16 Nov 2023 20:54:45 +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 4SWXN52QG6z4HQb; Thu, 16 Nov 2023 20:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168085; 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=8lo4k/wMrU+eCWPI8nBj1FBu+ujLp4ooHoCvry28Kv4=; b=L69/LbaFUc6V7kvKGxnBE1bQcCva3kEHtApZFy5fCdMV6l6rkQeJQn6LPeFEeVd2gI1j+P otWxg8q+mhl1IC0Msl32puxYorFCC+TF3SIWOPTVZdvRIfdfF6AjwFtMbG1BryNhmdoNs5 8SpbJgdPiLt8gBVWa5xyzSluLpD2rOXGLkHdy2LtXWIBMvoSPaCUIxs4S86fTPqbMEwR8x f+oJmd6wUzOhDVvgIaMVfcUagnxibsjSct+VKcORmzUqCOrDC7Vl7gtcfjyj2izM7EcxTj +ojCzgaH7qVWS8jJm5Nsolqm11YIDkn7A1LsbsVGzxcIr2r+RrmCDX+tsSSRXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700168085; 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=8lo4k/wMrU+eCWPI8nBj1FBu+ujLp4ooHoCvry28Kv4=; b=H2N0nRmB779z8RiGgG+d7Az6ldag6hh2IOMhf2P3HBrIW0BxIL8YRkyyh3JBkQmq59n4VQ p8xCq26ulcJ/n8MHo9vXbzVwq25CNrWM/GaAeQGRvBBmByHFw8dEPEeUsibkAD1ZtSgd57 s+CRfFJ+9CHpUUGbVYeCIahnOLhlErKsWK+WiUyzNnmRn28hQqfHeUwlmVelG+FmEUdoA+ SfXxmCFFPRZqoZOOUPtxV92jEQqaohfCxzk0Q7yYEaoWfcR+cmaOnVnWmbFuauFd4b1OlW 1Nu828FxOZ6dAa6HoAS0JS0+PN4A9oAajA20wbcfA81Tvdu2cQRvStFr1SGRjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700168085; a=rsa-sha256; cv=none; b=r41LXaWxDakGoEmxtUmFho/i756jARLGKVCEdlgkjkM9agEKGrAknpkkkSlW+PuPLOOm47 o/vmvXesY6m09ExVLH3o9lF/7ZkFKjmNjo22Vek7KjvsMG4z8+et//UI38tnYgo2Duo+Ff 2fyZGw1CtIyCFoG0UZI5ILeIWGuNHlznNtY8kL8uvpjsx6ZIekxCY5+UVIYf8RiW3FLfwG pe0yUsSTgHZrHKRD9xZ5F4mTFxO3oPVfn/roG3FK1T7CPScPE54bWr1bgdNuoya9SIvBId fs06P372ECFTlkwishd4oP93t9024TwSf0+RMRTerAJrad0AJEKugp420N+QGA== 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 4SWXN51XP1z1Ws; Thu, 16 Nov 2023 20:54:45 +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 3AGKsjqg053892; Thu, 16 Nov 2023 20:54:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AGKsjOB053889; Thu, 16 Nov 2023 20:54:45 GMT (envelope-from git) Date: Thu, 16 Nov 2023 20:54:45 GMT Message-Id: <202311162054.3AGKsjOB053889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f946a5ec9692 - stable/14 - 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f946a5ec9692973831db93691ad06a93240d5937 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f946a5ec9692973831db93691ad06a93240d5937 commit f946a5ec9692973831db93691ad06a93240d5937 Author: Olivier Certner AuthorDate: 2023-10-13 15:13:28 +0000 Commit: Mark Johnston CommitDate: 2023-11-16 15:07:18 +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 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42264 (cherry picked from commit 2c7dd66d09a1b92a4698232996cded6e5315b3bd) --- 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 53c59bea8ef2..84f0361de765 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