From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 57FC83854154; Mon, 11 Jul 2022 11:52:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57FC83854154 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Include the psind in data returned by mincore(2). X-Act-Checkin: newlib-cygwin X-Git-Author: Mark Johnston X-Git-Refname: refs/heads/master X-Git-Oldrev: d066d123f1b05bb986fd91743a5e92b7b7cb0690 X-Git-Newrev: 1a5f14a0c547c6c7ecddaeb5171a80ed28ab3316 Message-Id: <20220711115224.57FC83854154@sourceware.org> Date: Mon, 11 Jul 2022 11:52:24 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 11:52:24 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D1a5f14a0c54= 7c6c7ecddaeb5171a80ed28ab3316 commit 1a5f14a0c547c6c7ecddaeb5171a80ed28ab3316 Author: Mark Johnston Date: Wed Sep 2 18:16:43 2020 +0000 Include the psind in data returned by mincore(2). =20 Currently we use a single bit to indicate whether the virtual page is part of a superpage. To support a forthcoming implementation of non-transparent 1GB superpages, it is useful to provide more detailed information about large page sizes. =20 The change converts MINCORE_SUPER into a mask for MINCORE_PSIND(psind) values, indicating a mapping of size psind, where psind is an index into the pagesizes array returned by getpagesizes(3), which in turn comes from the hw.pagesizes sysctl. MINCORE_PSIND(1) is equal to the old value of MINCORE_SUPER. =20 For now, two bits are used to record the page size, permitting values of MAXPAGESIZES up to 4. =20 Reviewed by: alc, kib Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26238 Diff: --- newlib/libc/sys/rtems/include/sys/mman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rte= ms/include/sys/mman.h index 99c1eb8b3..6d861422d 100644 --- a/newlib/libc/sys/rtems/include/sys/mman.h +++ b/newlib/libc/sys/rtems/include/sys/mman.h @@ -179,7 +179,8 @@ #define MINCORE_MODIFIED 0x4 /* Page has been modified by us */ #define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */ #define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */ -#define MINCORE_SUPER 0x20 /* Page is a "super" page */ +#define MINCORE_SUPER 0x60 /* Page is a "super" page */ +#define MINCORE_PSIND(i) (((i) << 5) & MINCORE_SUPER) /* Page size */ =20 /* * Anonymous object constant for shm_open().