From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by sourceware.org (Postfix) with ESMTPS id E0C403858D28; Mon, 7 Aug 2023 11:19:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E0C403858D28 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RKDNZ2vx9z9snx; Mon, 7 Aug 2023 13:19:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1691407150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=esNx7pm/rb59WxvKNhn87/HsRPGFD6dpl6sH+KGzKwE=; b=Ke68p3uPxXYZ92NxFZ+o5zO+7WWl3FFQpBgKMtoAey8Gfn4HRpoB1/nsIqgGQ+bFo0H6l8 g6Vy4Y8jpuu62dt0Ou9hTq9L0dUsYPoJP9uxPCf5xCbZ0tBJZJ5k9UhHFCfQYByGzhhazy AGCnBEjYKuE1zquYiSsSXZpe8Rm/iBb/wwGakNZlCMSY25MblYkM5ETMwIDXmjHRyiBuWz gJCftIvVYqfBc0l3W8/feMztgVySxzNI+udCAEVZnX63is7HV+hF1F/+YXCg8EAQMmFL9u JfsgxHoYth3Cj/2s2wWqFfGb/rp2aioCbJr7qF3V/J//DsdxEQtYqp3F/HZQ1w== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Lulu Cheng , qijingwen Subject: [PATCH 02/45] Libvtv: Add loongarch support. Date: Mon, 7 Aug 2023 13:07:05 +0200 Message-ID: <20230807111029.2320238-3-arsen@aarsen.me> In-Reply-To: <20230807111029.2320238-1-arsen@aarsen.me> References: <20230807111029.2320238-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4RKDNZ2vx9z9snx X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Lulu Cheng The loongarch64 specification permits page sizes of 4KiB, 16KiB and 64KiB, but only 16KiB pages are supported for now. Co-Authored-By: qijingwen include/ChangeLog: * vtv-change-permission.h (defined): Determines whether the macro __loongarch_lp64 is defined (VTV_PAGE_SIZE): Set VTV_PAGE_SIZE to 16KiB for loongarch64. --- include/vtv-change-permission.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/vtv-change-permission.h b/include/vtv-change-permission.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 #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 -- 2.41.0