From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 103313858D1E; Sat, 12 Aug 2023 00:59:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 103313858D1E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Libvtv: Add loongarch support. X-Act-Checkin: binutils-gdb X-Git-Author: Lulu Cheng X-Git-Refname: refs/heads/master X-Git-Oldrev: 0e75fc54bb2d093d3e0ea57f0ec60cb4b61a153c X-Git-Newrev: a5e58a41647619c048335b91b60de621f88edd73 Message-Id: <20230812005902.103313858D1E@sourceware.org> Date: Sat, 12 Aug 2023 00:59:02 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Aug 2023 00:59:02 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Da5e58a416476= 19c048335b91b60de621f88edd73 commit a5e58a41647619c048335b91b60de621f88edd73 Author: Lulu Cheng Date: Mon Aug 7 13:07:05 2023 +0200 Libvtv: Add loongarch support. =20 The loongarch64 specification permits page sizes of 4KiB, 16KiB and 64K= iB, but only 16KiB pages are supported for now. =20 Co-Authored-By: qijingwen =20 include/ * vtv-change-permission.h (defined): Determines whether the mac= ro __loongarch_lp64 is defined (VTV_PAGE_SIZE): Set VTV_PAGE_SIZE to 16KiB for loongarch64. Diff: --- include/vtv-change-permission.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/vtv-change-permission.h b/include/vtv-change-permissio= n.h index 5906e7d78cc..ffb5312522c 100644 --- a/include/vtv-change-permission.h +++ b/include/vtv-change-permission.h @@ -48,6 +48,10 @@ extern void __VLTChangePermission (int); #else=20 #if defined(__sun__) && defined(__svr4__) && defined(__sparc__) #define VTV_PAGE_SIZE 8192 +#elif defined(__loongarch_lp64) +/* The page size is configurable by the kernel to be 4, 16 or 64 KiB. + For now, only the default page size of 16KiB is supported. */ +#define VTV_PAGE_SIZE 16384 #else #define VTV_PAGE_SIZE 4096 #endif