From nobody Sat Feb 17 21:32:37 2024 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 4Tchpt2lLjz59l05; Sat, 17 Feb 2024 21:32:38 +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 4Tchpt04fMz4gr4; Sat, 17 Feb 2024 21:32:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205558; 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=LURjz6jNUOIqwReGTTHfUj8HNP6w51t/rZSEWmXKS/Q=; b=cBzA89z94mzqIPzoWexaprM7M1s7dsbaGpi5baa4//V8VkEuyFT9t1GlT1SumjlyWWw53b 9LW9Q+d3b3DF+i9fQGzgrBE0M6tApQaJpL2T+pg59sd4xMKfkz1qczm+zL2kOMDwKlW7rq Ygu6Jp01eUOb8sqffCUmkB1YM75skfBxVQKNziLyE0hx6+SOSa95XbNvql+wGgOia9plua 2/PJIVYES9NC3+fkJU3eiX3x55VmGlioAQxJvapQiw3LKl81+doPXrRSMexu60pf9f5QI7 7kkNL0hnVt4B4UfBXGRcQaURawcMZqpdJsoVQGw99LBL9PH7U/EOwRo9xz5Vpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205558; 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=LURjz6jNUOIqwReGTTHfUj8HNP6w51t/rZSEWmXKS/Q=; b=JwBMtYZYTnh474zR6mfXsEdkXEAPtLVvlYaxLVFQ8aNIhsalRly/Ujaf/GNJfpN+GshOlD lmkBQ4s1T+hMQwZ9HCQntvJbFat4z9dTnKJnUiXMdAOPS3HgiqArE0yjjAteGkYutE0pC1 1t/WNMhFWj9pEFnd/3/DqDwrljEMKkkjCkaeckhSXOerVksMxCxcVVtVhwIiilMdlY6kwx M1VHBVuDaJYQ+fqDAv4uumAEF6yj4ZO6jk7J5RjlLpe5LaJ5HMC+wQvCi9OMhKUDPKf+kT 5pazJAAYXp6piFx4R8DPM5XVEdWxgy4JadLIdrcPZOYyqx+SC41uLdlvziY4Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205558; a=rsa-sha256; cv=none; b=HjpNEs/bycXj8WkTHwSnOOCFRFHJuuYxJzwfvYnmEPF7i1igPaGjg8sY/yBmheI0LsSFIh TpXnlTb5RBqEDbIn0Bj+ZeR9INwTDEpyXMtbcIwKFDZ0vESyLGf0YMv/qvwoufcsL3pCuX 6bPz67aIRbRludy3YbA/GrBN7F7ctrT8jAkVtwTd/sscd7/0Ncs/t0+jpKkXcLwfLQKc0C WgG+QCySJu9X2jmrO6k7HUaAK2zeD1vd4ClwSK/afNL9RmqSpDZHvEAgvcrvE0ayWHx51y XX0o2/Q50v/4/jOwHdxHdeOZ8TnoPu4aUJQA/Lrrhsio6o5BYwcgGnfN6ZzREw== 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 4Tchps61YKzP85; Sat, 17 Feb 2024 21:32:37 +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 41HLWbv0019901; Sat, 17 Feb 2024 21:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLWbaR019898; Sat, 17 Feb 2024 21:32:37 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:32:37 GMT Message-Id: <202402172132.41HLWbaR019898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 843107faca66 - stable/14 - linuxkpi: Move `invalidate_mapping_pages()` to 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 843107faca6620565b2625e629e72884210172c6 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=843107faca6620565b2625e629e72884210172c6 commit 843107faca6620565b2625e629e72884210172c6 Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 17:07:00 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:35 +0000 linuxkpi: Move `invalidate_mapping_pages()` to [Why] This is consistent with Linux. [How] The definition is moved from to and the latter is included from the former. This is how it is done on Linux. Prototypes are also expanded with argument names. I got a build failure in the DRM 5.18 drivers because the compiler considered that the `pgoff_t` argument was there twice. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D43018 (cherry picked from commit 4e0d3f7b3c3295e51ded2bab39f36842f405b4eb) --- sys/compat/linuxkpi/common/include/linux/pagemap.h | 6 ++++++ sys/compat/linuxkpi/common/include/linux/shmem_fs.h | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pagemap.h b/sys/compat/linuxkpi/common/include/linux/pagemap.h index aa2e2a4e3950..7244b61257dc 100644 --- a/sys/compat/linuxkpi/common/include/linux/pagemap.h +++ b/sys/compat/linuxkpi/common/include/linux/pagemap.h @@ -33,6 +33,12 @@ #include #include +#define invalidate_mapping_pages(...) \ + linux_invalidate_mapping_pages(__VA_ARGS__) + +unsigned long linux_invalidate_mapping_pages(vm_object_t obj, pgoff_t start, + pgoff_t end); + static inline void release_pages(struct page **pages, int nr) { diff --git a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h index eb31c5ad827a..d373cfa1d611 100644 --- a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h +++ b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h @@ -29,14 +29,15 @@ #ifndef _LINUXKPI_LINUX_SHMEM_FS_H_ #define _LINUXKPI_LINUX_SHMEM_FS_H_ -/* Shared memory support */ -unsigned long linux_invalidate_mapping_pages(vm_object_t, pgoff_t, pgoff_t); -struct page *linux_shmem_read_mapping_page_gfp(vm_object_t, int, gfp_t); -struct linux_file *linux_shmem_file_setup(const char *, loff_t, unsigned long); -void linux_shmem_truncate_range(vm_object_t, loff_t, loff_t); +#include -#define invalidate_mapping_pages(...) \ - linux_invalidate_mapping_pages(__VA_ARGS__) +/* Shared memory support */ +struct page *linux_shmem_read_mapping_page_gfp(vm_object_t obj, int pindex, + gfp_t gfp); +struct linux_file *linux_shmem_file_setup(const char *name, loff_t size, + unsigned long flags); +void linux_shmem_truncate_range(vm_object_t obj, loff_t lstart, + loff_t lend); #define shmem_read_mapping_page(...) \ linux_shmem_read_mapping_page_gfp(__VA_ARGS__, 0)