From patchwork Mon Sep 26 02:00:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenglulu X-Patchwork-Id: 1437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp1281230wrt; Sun, 25 Sep 2022 19:01:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4zXA33VUr+p3YWVi79juaCfSV4/+PPEz31t3d805HQteSfCNwJ+APLploO4EsemgiqJMvM X-Received: by 2002:a17:907:3d86:b0:782:1175:153f with SMTP id he6-20020a1709073d8600b007821175153fmr16517133ejc.226.1664157666253; Sun, 25 Sep 2022 19:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664157666; cv=none; d=google.com; s=arc-20160816; b=WnouIFNtn/SeE1G2jcZl5NdVQXaEvpTX2kVjdoP0NMA/Qxqwp9EWAJQv8sTNKNNaeu o3xsfrl2mN0X1NB5kZMF8ccr3bhtXy8+NXwpzznX04ZoXK3oXjgKB6rbqkrTsO0YaboH njX8VIXJNb58xs3Dsra3mhbR7C/9zl63R+ypjWbpKMhgrxcDUMYjDEgFBCohmYlKYuhB Q4wYLA5Ny00qB+aBhdNGMmD/mcIHlWAIXe6r2ElibDUyV7UrAMG5OErrff+A+4qfJhVK 9+K6bb+rCZSekrwSp5zzkvwSmoL+bCK04ZLR7LI9mxsh7pw1wHYML5zJu4Iw47XcX/Ze Wygg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dmarc-filter :delivered-to; bh=0jPuXhNKDOJHhTNjmR385utsva7OE5whP6wh9B2s364=; b=WjtT0eJ4CsBis+D2o2GdXY3Wlx8gl4KjL4ULlNmEhqeaHrL2dynwPynmmZf8g5TvpF WRclNoGydSrA+ENaumPN9eMbveVnEFkxZMcfFIFdc1fW18xyr43sJrwTd1Y60mncfNtT WNTQkKSw5Auzz3cZDBLeopANYULbuZy6do3ZOIF7nblYFByUrWToqRScuVAs2PdXEFIw pDwv8B5IlZInl/DLuqu+kKwKbBe7SCOP87zNXufzKsO1Onr356gsOvEtc/lizyE2VK7Q rOqWKxcxdsrN0+dj1JCVUS9BF19ZzVUZaNtUSacVjUp89gSvqkn2H1nD7EtLnpJpajh0 3ZIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a24-20020a1709065f9800b007707aab3171si13382760eju.848.2022.09.25.19.01.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 19:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C594A3858C52 for ; Mon, 26 Sep 2022 02:01:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id DE4A73858CDA for ; Mon, 26 Sep 2022 02:00:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE4A73858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from 5.5.5 (unknown [10.2.5.5]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxPGu4BzFjl_4hAA--.65388S2; Mon, 26 Sep 2022 10:00:29 +0800 (CST) From: Lulu Cheng To: gcc-patches@gcc.gnu.org, mliska@suse.cz Subject: [PATCH] LoongArch: Libvtv add LoongArch support. Date: Mon, 26 Sep 2022 10:00:10 +0800 Message-Id: <20220926020010.779566-1-chenglulu@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxPGu4BzFjl_4hAA--.65388S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Jw4xXr4xCFWxZrW7ZF4ktFb_yoWkZFb_Aa 47twsxJr4kZFWIk3yDXFy5JF4jka4kJF4v9rn5Wr12vr10qw43Xa1UW348KFs8KFsxWr95 ZFyYqr4xZr17XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb2AFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F 4UJVW0owAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv 7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r 1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE-syl 42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJV WUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAK I48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r 4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY 6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUUUU= X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qijingwen , xuchenghua@loongson.cn, Lulu Cheng , qijingwen@loongson.cn Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1744995788874731325?= X-GMAIL-MSGID: =?utf-8?q?1744995788874731325?= Co-Authored-By: qijingwen include/ChangeLog: * vtv-change-permission.h (defined): (VTV_PAGE_SIZE): 16k pages under loongarch64. libvtv/ChangeLog: * configure.tgt: Add loongarch support. --- include/vtv-change-permission.h | 2 ++ libvtv/configure.tgt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/vtv-change-permission.h b/include/vtv-change-permission.h index 70bdad92bca..47bcdb8057a 100644 --- a/include/vtv-change-permission.h +++ b/include/vtv-change-permission.h @@ -48,6 +48,8 @@ extern void __VLTChangePermission (int); #else #if defined(__sun__) && defined(__svr4__) && defined(__sparc__) #define VTV_PAGE_SIZE 8192 +#elif defined(__loongarch__) +#define VTV_PAGE_SIZE 16384 #else #define VTV_PAGE_SIZE 4096 #endif diff --git a/libvtv/configure.tgt b/libvtv/configure.tgt index aa2a3f675b8..6cdd1e97ab1 100644 --- a/libvtv/configure.tgt +++ b/libvtv/configure.tgt @@ -50,6 +50,9 @@ case "${target}" in ;; x86_64-*-darwin[1]* | i?86-*-darwin[1]*) ;; + loongarch*-*-linux*) + VTV_SUPPORTED=yes + ;; *) ;; esac