From nobody Sun Jul 13 19:31:07 2025 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 4bgFtM6vxPz61Mwm; Sun, 13 Jul 2025 19:31:07 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bgFtM4dtMz3k2n; Sun, 13 Jul 2025 19:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752435067; 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=GxmZlHi8uIVYRBxXGAeqjirTCiW9awW0qYnSPq8Q+/U=; b=YbXMEXvcX6l1KLBWSFiM5F3/4yloxA8rCzbZB5rmuMmp0NnkohnJS5VORalQkiCcQqnDR9 2KhN6adzXgythgrP9VrhweIy+NOKXKKSoYnELnXcb34BJXQd1MswLp2fqPeMmd+WaiRLQb MzdgUNE6DkiJgcu3S4r2ykh4ZbYYLN3V9d7bPWZUVmhAVyIQ+GGmPvJ+F8slcmmRkMnyUX Bpg0J2B50/UZ87D/8TRX8IfgI6fGCys5R9Q6ynV+rGxH0KOD4Y/DicKY5xvVK7YHLZOnU9 rA7txyYThi9tGzjX845o5wy3BkFlM+qFk1kgYwSR9jv6J6BE5ZjL/y+7D8yWOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752435067; 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=GxmZlHi8uIVYRBxXGAeqjirTCiW9awW0qYnSPq8Q+/U=; b=Jc6pis8JDp+HNunWpTzC08lVM72zejyx6TELWynYPe5kQoiOcNSBkQPWYlsg12frzhAPy0 Liz5zxV7QW4rAXXqBmIRK4Rpyaf8DoU6CroaQJ4bTXbR2FNaldHaEdkdj4qzSquBb5y6te 32IcRhAnp+w8Ev0s/X92XesJfOQeh0kyReckRVBdm5ItHqLQSBFj0G6/U8GHkXgWDHfkNp okP9bbCXvud4WbArQsFAfBsfzfQi+ZZxpB2H9gFcHFfsX8Owv8qhHkF5H9hc4ZmTmoaMmI a8SlGxQgsCKHODQZXHoC/vuUl9GKX6dK/Eslyot1Tub1R351aKkQBrUIhKwxiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1752435067; a=rsa-sha256; cv=none; b=S6XtOrJe4kiotrHLRfAcK75Yj06NJgd4aJwTcA/3mbg++GbFExxX8t8KmyEzI0W/RrH33Z 9qp5fJfolQbO73vs8JimZYw0oZ5PMIP26+msSbDOkF91ebH0L475NLmq7X9sTPpOB+KME/ pxccThAwPjYczU8Np0n9BVAUUSH04jxuFQwDjGCjIVOwagoTW5ABQKlAIHStWCmCAjyI0N n2eImZBTUadmOsjIX3PjZTnaBTYhze3dQQJbIqjuk/KcYOVRNCQrFqDavJ/5VjoeRBiMeg 9rrEZ925SnEExsDsiHtzx4TYwEPUkKKINJZZNsJvjfukZz71lwjG8zN7oQXbtw== 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 4bgFtM3SDxz6Ym; Sun, 13 Jul 2025 19:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56DJV7vJ070012; Sun, 13 Jul 2025 19:31:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56DJV7cZ069997; Sun, 13 Jul 2025 19:31:07 GMT (envelope-from git) Date: Sun, 13 Jul 2025 19:31:07 GMT Message-Id: <202507131931.56DJV7cZ069997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 106294d5801f - stable/14 - LinuxKPI: Implement dma_map_resource/dma_unmap_resource functions 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 106294d5801f6c617812534f773ea101bfbc7655 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=106294d5801f6c617812534f773ea101bfbc7655 commit 106294d5801f6c617812534f773ea101bfbc7655 Author: Bjoern A. Zeeb AuthorDate: 2025-04-01 14:51:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-07-13 19:25:03 +0000 LinuxKPI: Implement dma_map_resource/dma_unmap_resource functions dma_map_resource() and dma_unmap_resource() functions are used to map and unmap of memory-mapped IO resources so they can be accessed by the device. Required by drm-kmod v5.5 to be built. While for drm-kmod 6.6-lts only amdgpu uses these in one place and the code apparently has not been exercised a lot it has been around like this for years. With changing the underlying implementations bring it into the tree; should we find errors with it they can also be fixed here. Bump __FreeBSD version to be able to detect this change. Obtained from: D30933 (by wulf) Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D49625 (cherry picked from commit a02180cf60a6a0102669b678e9c81ad9f1aa4d91) --- UPDATING | 4 ++++ sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/UPDATING b/UPDATING index c1778cc50d83..4d06a05650bf 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,10 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20250713: + LinuxKPI dma-mapping.h were pulled into the tree from drm-kmod. + Bump _FreeBSD_version to 1403503 to be able to detect this change. + 20250707: Commit f5195b1a63df removed in6_maxmtu and its setter in6_setmaxmtu(). in6_maxmtu is used to store the max IPv6 MTU of all interfaces, diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 09d5e4b6bc22..2d8e1196d3d3 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -214,6 +214,20 @@ dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, lkpi_dma_unmap(dev, dma_address, size, direction, 0); } +static inline dma_addr_t +dma_map_resource(struct device *dev, phys_addr_t paddr, size_t size, + enum dma_data_direction direction, unsigned long attrs) +{ + return (lkpi_dma_map_phys(dev, paddr, size, direction, attrs)); +} + +static inline void +dma_unmap_resource(struct device *dev, dma_addr_t dma, size_t size, + enum dma_data_direction direction, unsigned long attrs) +{ + lkpi_dma_unmap(dev, dma, size, direction, attrs); +} + static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma, size_t size, enum dma_data_direction direction)