From nobody Fri Jul 24 19:35:01 2026 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 4h6J9L1lTxz6mcxs for ; Fri, 24 Jul 2026 19:35:02 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h6J9K62qZz3Pkr for ; Fri, 24 Jul 2026 19:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784921701; 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=8K2M9C0M4QOCgamE+GlBPzY+b5KrkSeWqPGeJrPduXI=; b=vHpYTyGEzPqdbGo/zFnstw1OWetAQjLboC0ou7Mi9g358kEMlz5DFzsGEr5dBhIAOdqTre ZThU+9XqW8LY+PahVuR153NGqLuhI7K0NpLGZfjaA1zEFwPdBVwTdQ4wU8a/ok+r5AhZw1 Xr69nQVXEJekZT/wzCPrFkqU5Tq64H2AMOIwzElH6V1kCEIzsm3x5gtKZW7qQz8xvPh/HW 1quNHAISjvyfDBHczGfl/P6EHvp0csZJDJWqm/sYvW3nrbjsNn7pSNSgvLudj5CAfiT0Ff dUkCKR9s9JSzz7JIIP77d61CgRxd4jktn3bGPP2g7M9DvHJIWiPwxxjoIP2+EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784921701; a=rsa-sha256; cv=none; b=ozFkd3s9lQr83jadH507fnAeRGxnY5tsSA7U7Z81no6es8hHDVv0dszFVoJxJUyiwtfqsd Or5UuYzLmgVHJEEer2e6KOjLETmyg78kmdUVxDvjdwP/AOIo9q6o3/3KYH6y1k+eQLZ//3 uF8hwjkqEo4FkJdObiyrcElh8qIBidfHXut5DUKovuJwiXGfhy3pghmOW/C/8KvkVfLI+E tzz6lbEGpbOLG8VnB9v1dhMQBtEzVM3nCZCyZj8tUjAgPYeJRcBh8rfxWMd0zLpeOgPnkj G6/bvVhBE/OYOsxLyMgwPFs39f6J8Y73jVBHQMZA8Dl74xnVJnGMPc5TMgnz0w== 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=1784921701; 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=8K2M9C0M4QOCgamE+GlBPzY+b5KrkSeWqPGeJrPduXI=; b=f7SB9IWbLEnkcol9rHJnIiSa/89114B2w43r131cteDtjOiGQTizXwyfNm+XE7dhP4JnFS gDB9Teidn+708JzDPCrXSuew2O8lcXwl8awqrlz7pcDrzZs7wQrDYWaWdpCFxyk0bB0w+P SGbLKp1oQ5T76M1hlyclUQGuiE+w3uimBGNguTSypDFoTvoxfrZH7Wr8ZDICy1hGerC06L BoPLneCKuUSdpWQH5AbWKy0iBXj6QMuYr3aepK3yeWFPabINcGqCd89ZD2Uf21pZ4eLzgf ZViwet8vxivJezTY8cNWGycQLgwDvkKxotNSU6Xms4hpFDUubbusmdtuZiJRNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h6J9K4R59z14XN for ; Fri, 24 Jul 2026 19:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25afc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Jul 2026 19:35:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 0845efe88b35 - main - LinuxKPI: move clear_page() within the linux/page.h file 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: 0845efe88b355547b103dca90e69e46a3ebdd016 Auto-Submitted: auto-generated Date: Fri, 24 Jul 2026 19:35:01 +0000 Message-Id: <6a63be65.25afc.810a496@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0845efe88b355547b103dca90e69e46a3ebdd016 commit 0845efe88b355547b103dca90e69e46a3ebdd016 Author: Bjoern A. Zeeb AuthorDate: 2026-07-17 12:53:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-07-24 19:33:56 +0000 LinuxKPI: move clear_page() within the linux/page.h file clear_page() would normally live in asm/page.h but adding the file and fixing the dependencies would be too much for a single line. Move the function to the end of the file with a clear separator and make it clear that it does not operate on a 'struct page' but on a page address by changing the argument name and leaving a comment. The function is currently used by at least mthca(4) as the only in-tree consumer, and drm-kmod ttm_pool.c. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D58296 --- sys/compat/linuxkpi/common/include/linux/page.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/page.h b/sys/compat/linuxkpi/common/include/linux/page.h index 6f5f37d2fd0f..a8e266af95fd 100644 --- a/sys/compat/linuxkpi/common/include/linux/page.h +++ b/sys/compat/linuxkpi/common/include/linux/page.h @@ -79,7 +79,6 @@ pgprot2cachemode(pgprot_t prot) #define nth_page(page,n) pfn_to_page(page_to_pfn(page) + (n)) #define page_to_phys(page) VM_PAGE_TO_PHYS(page) -#define clear_page(page) memset(page, 0, PAGE_SIZE) #define pgprot_noncached(prot) \ (((prot) & VM_PROT_ALL) | cachemode2protval(VM_MEMATTR_UNCACHEABLE)) #ifdef VM_MEMATTR_WRITE_COMBINING @@ -129,4 +128,11 @@ clflush_cache_range(void *addr, unsigned int size) int lkpi_set_pages_attr(struct page *page, int numpages, vm_memattr_t ma); +/* -------------------------------------------------------------------------- */ +/* + * clear_page() is called on kmem allocated page addresses, thus zeros a page + * not a 'struct page'. Really belongs into . + */ +#define clear_page(_pa) memset(_pa, 0, PAGE_SIZE) + #endif /* _LINUXKPI_LINUX_PAGE_H_ */