From nobody Wed Dec 13 18:28:44 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 4Sr3s83wS7z547n0; Wed, 13 Dec 2023 18:28:44 +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 4Sr3s83G5jz4K0j; Wed, 13 Dec 2023 18:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702492124; 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=96JqSeblIukyTlfUpKrVSLBINX980kMSKPnL01x88Vw=; b=gttDcs93Y61a5zW39/Hjfu/8gGXWUsgOsbdJivuMGZUOLg03HcN6ysidpXzreguz1SkEae VQaRcGRrZA3x9cRDerlftLD5Ahk339vl+hZCaNp9gYlPn4q048H7muAwMRS64F+adx5t/Q L1FmlEKXPkHo9kRFdTZeB/xJzelT7k/bnzglYSB/ZVNO+nM79odUsnKcOQH+tCYk7esNJP 6iLbRFxg9XSBIaswZKv58Vdd/boeDU1fJxDPIxFsG8PEEbRkwo2lAIe47+YO7Or0n3a0Ph 7pHzIStCQtpoUPJC/HaUQB69fid4LfxgP60VSTbRlYr95CXqYLit9dsa5cmsuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702492124; a=rsa-sha256; cv=none; b=paC2ODRm8hJiJUiThhjWrT3JLawk4egd/Czpl17Uwkng7m/n8GodsHOBDfz7JvlKisxM/s 3tu4FtAEGF/UXBhyAEiF90leWk780wWNJyL6EShNKN53wcTm24VQSsklSmVCYCGs3aA0ZK bSh9fnz/S7CnnBHgWOTcjuIkwgtig5AnoDI/g75+J4O5Iqg79+eW5wMiQPM9O7gEFrNKSs ARbzdmdh0K9++wnjqcygej3u/pzdYFlD3eFBXSlQwVd9a8XG9dgQsADoBaAprg/X8EhJ2p pM0iiG6qRcZ5oh4ggJQWlszCYyw3SMV9dL1gSxVGC/KSc5eds9jMun3YndLSCg== 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=1702492124; 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=96JqSeblIukyTlfUpKrVSLBINX980kMSKPnL01x88Vw=; b=Z4L99IZBkpQNNSPnGmqVXKDPmrJ6szijBbXJ8vxlozMIkGdbJrM3xRu6wnW8PtrkIlIHK4 TPk2P/+b1JRjIkn3sdkWhVZJULxQAMMg9W6+UjJq5el4kfsSp0tb3tzloVOD2J1zLPBnIx tW1h2qs9sv4dkBzK10UPNh8OOpCCb9t1Likk3pAmjLWpmaYcscXPD9mmXwI0wCTr8v6IOK mXRFvC2494NAXV+n/45Ngy6pueygiNcX2/2Xmk1hDxHXCrhLz56JiJuAcdA7xSBa9ZwxFx icDiFyhQ6ZCQFG8r/+IpY7i2jMOligNLJ+3XuD+hZAWVy+VdqNpMnI3wOt7Low== 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 4Sr3s81lNFz17yG; Wed, 13 Dec 2023 18:28:44 +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 3BDISi5v018879; Wed, 13 Dec 2023 18:28:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BDISiDa018876; Wed, 13 Dec 2023 18:28:44 GMT (envelope-from git) Date: Wed, 13 Dec 2023 18:28:44 GMT Message-Id: <202312131828.3BDISiDa018876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 4e0d3f7b3c32 - main - 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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e0d3f7b3c3295e51ded2bab39f36842f405b4eb Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=4e0d3f7b3c3295e51ded2bab39f36842f405b4eb commit 4e0d3f7b3c3295e51ded2bab39f36842f405b4eb Author: Jean-Sébastien Pédron AuthorDate: 2023-12-08 17:07:00 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-12-13 18:18:46 +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 --- 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)