aboutsummaryrefslogtreecommitdiff
path: root/include/vtv-change-permission.h
diff options
context:
space:
mode:
authorLulu Cheng <chenglulu@loongson.cn>2023-08-07 13:07:05 +0200
committerAlan Modra <amodra@gmail.com>2023-08-12 09:58:22 +0930
commita5e58a41647619c048335b91b60de621f88edd73 (patch)
treec8056ca05c95148684d69d53800f0fe9ae304285 /include/vtv-change-permission.h
parent0e75fc54bb2d093d3e0ea57f0ec60cb4b61a153c (diff)
downloadgdb-a5e58a41647619c048335b91b60de621f88edd73.zip
gdb-a5e58a41647619c048335b91b60de621f88edd73.tar.gz
gdb-a5e58a41647619c048335b91b60de621f88edd73.tar.bz2
Libvtv: Add loongarch support.
The loongarch64 specification permits page sizes of 4KiB, 16KiB and 64KiB, but only 16KiB pages are supported for now. Co-Authored-By: qijingwen <qijingwen@loongson.cn> include/ * vtv-change-permission.h (defined): Determines whether the macro __loongarch_lp64 is defined (VTV_PAGE_SIZE): Set VTV_PAGE_SIZE to 16KiB for loongarch64.
Diffstat (limited to 'include/vtv-change-permission.h')
-rw-r--r--include/vtv-change-permission.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vtv-change-permission.h b/include/vtv-change-permission.h
index 5906e7d..ffb5312 100644
--- a/include/vtv-change-permission.h
+++ b/include/vtv-change-permission.h
@@ -48,6 +48,10 @@ extern void __VLTChangePermission (int);
#else
#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