From patchwork Tue Sep 7 21:24:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1525503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H3z2B25Tcz9t0Y for ; Wed, 8 Sep 2021 07:30:10 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 25D773851C07 for ; Tue, 7 Sep 2021 21:30:08 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 4B9E3385F02C for ; Tue, 7 Sep 2021 21:24:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B9E3385F02C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: IaEfuHrfL3Dpp5dMHRBJoGexmKQh1RpU1gSQzoiiQO8gVT5AGD5ZbXV/TjjzQyGdV3NTUPGB+V 0NDp/6Y7CI9AKef087HLF7sVr5wvQ2WYdow4oFzeS/BnQEhnUIstK08yEgWUVGJmslwbnt87jQ 957X9+Ps+opJM3sBLt1bjxghjcE+f6oyMgcnaEoh0QieOuxbfAF3LsUv2wI0SQ5EU81z/ERIfz mJnDy6cEyh28bjwHa4PmMXjisd94tRXvQSHl0vBbCvyUJKcDYnaACBGGo50SgiwhPw5qVMR6RN EP5LVds4Xnji/RqBj3Nd9aWG X-IronPort-AV: E=Sophos;i="5.85,276,1624348800"; d="scan'208";a="65600050" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 07 Sep 2021 13:24:15 -0800 IronPort-SDR: N4VQe644Ibst6FLQHQgDQfDng97LuElBWk/0T3beOc2Bo6Y8hkb3/gZfrpFvzrDKvuZhCBnPHk dTz0oPQUNrcPKpaTKVAtSFbsYN/UDoYg8i4PIgK1NbeSF7wpznwhbDdqxtzE2JKbGQ/psSzRBT AHuCOMS3x1hdfkgcoK6r3Ydms1IWom/ONEf1aZitdmMRw+SnrWlubUnKaIkH32F4Wzg4wg80bW 5zP0djSqvtGtVAfoM2MnXkx1ksqVEvBjVWn7hBiLzmTHVZHHD9HrMzkOm9C7CyOFnkslE6W9Kj ME0= Date: Tue, 7 Sep 2021 21:24:10 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Subject: Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3124.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Linux 5.14 adds constants MADV_POPULATE_READ and MADV_POPULATE_WRITE (with the same values on all architectures). Add these to glibc's bits/mman-linux.h. Tested for x86_64. Reviewed-by: DJ Delorie diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h index 3b1ae418e0..31451c28d9 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -89,6 +89,10 @@ # define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */ # define MADV_COLD 20 /* Deactivate these pages. */ # define MADV_PAGEOUT 21 /* Reclaim these pages. */ +# define MADV_POPULATE_READ 22 /* Populate (prefault) page tables + readable. */ +# define MADV_POPULATE_WRITE 23 /* Populate (prefault) page tables + writable. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif