From patchwork Fri Jun 9 09:50:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 105531 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp850415vqr; Fri, 9 Jun 2023 03:39:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6O0QRPM5elNatE0dBV1aRBXhGU8im13WdgOHTCIc7k52ZGKdTpknlasKnwQFp9ak8BMrry X-Received: by 2002:a17:903:191:b0:1b2:2c0c:d400 with SMTP id z17-20020a170903019100b001b22c0cd400mr715507plg.52.1686307186844; Fri, 09 Jun 2023 03:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686307186; cv=none; d=google.com; s=arc-20160816; b=IeO65OSjROy8gTSaUbhAWaOVAb5s1VzqrH75Qr3GbEDd4JbnqZMnS/WW0OhvrBJkHQ +mGpFr1pO0DuHXSDpoPBnmiQS0iBHSK392OZ4G2eDI/vSsk65exwgNbOJurbt2+Nzx4j YugsTn7FF5M2R3WIrzELhrVpPPmELEdYcL3VF20DYeHrKCGMT+Qcwq0KP9sev0yYJMsN vpzaGxKE3eVYL8FspVYqAWd/kBnAAXi2/QhssHToBKba7z+NBnbeTtTBrWiXz5aigtJT WYSiqueTMESX2l5+A3hn5qdukNwdCn+xWRj4CDtgnk/1u87f8eIBiMV0iu1ag9c/Ea9x vuSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=CG7O6AwYt2okwVJOPDELchTDoQWDQ96eylgdKYwia4A=; b=fgjSXgSLUSmBpv2L0C23NjbNipRGIkl+d9k8Js0wU0iU40PJPDeukRLgeFBk6V3gXU jw/uT+fD5lsSm6D8n7pmLKlt3+6t6R5Ja5EIV4NacOY0kRtNQdrRxHXdk5jupSKJPUY9 3uB+P0Cap51n1pp8fIyi5h472eA+qRmymqaIqPicM62h9+xbDa7TXO2yB340ELkH1QNQ 5cXj1KYgECX1HJAL4RqFgpuBNAWKAvg3uu7pH74ypzFcH8HH3sXNFfWHihb7N3cDV8Eg vIn03haRK88P/fS6f1bXlnPHiBVCHmMiHUPFYJMHUtGebG3N6s/gCzlB1b6sFv3mKMOk jiqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170902f7ce00b001ab1a00d95dsi2537217plw.250.2023.06.09.03.39.32; Fri, 09 Jun 2023 03:39:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241983AbjFIJ6w (ORCPT + 99 others); Fri, 9 Jun 2023 05:58:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241217AbjFIJ5y (ORCPT ); Fri, 9 Jun 2023 05:57:54 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 113F24ED4; Fri, 9 Jun 2023 02:50:09 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Cx8OjQ9YJkWwIBAA--.1208S3; Fri, 09 Jun 2023 17:50:08 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxCOXP9YJkRpsKAA--.32216S3; Fri, 09 Jun 2023 17:50:08 +0800 (CST) From: Tiezhu Yang To: Shuah Khan , Shuah Khan , Thomas Gleixner Cc: linux-kselftest@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH 1/2] selftests/vDSO: Add support for LoongArch Date: Fri, 9 Jun 2023 17:50:06 +0800 Message-Id: <1686304207-13045-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1686304207-13045-1-git-send-email-yangtiezhu@loongson.cn> References: <1686304207-13045-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf8CxCOXP9YJkRpsKAA--.32216S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7Wr4UWrWDXw43Aw4ftF13trc_yoW8JrWDpa n7G3s8Kr4xK3W3t3WfJ3s8Ww4YkrZxAFW8tr43W3y7Zr15Awn7Xrs7KFW3XFW2939Yqrs5 Ar1Igw4a9F48J3XCm3ZEXasCq-sJn29KB7ZKAUJUUUUx529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUB2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r126r13M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVWxJr0_GcWln4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q 6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_ Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4eMKDUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768221244619741980?= X-GMAIL-MSGID: =?utf-8?q?1768221244619741980?= There exist the following errors when build vDSO selftests on LoongArch: # cd tools/testing/selftests/vDSO && make ... error: 'VDSO_VERSION' undeclared (first use in this function) ... error: 'VDSO_NAMES' undeclared (first use in this function) We can see that VDSO_VERSION should be LINUX_5.10 and VDSO_NAMES should be 1 for LoongArch in arch/loongarch/vdso/vdso.lds.S, add them to support LoongArch. Signed-off-by: Tiezhu Yang --- tools/testing/selftests/vDSO/vdso_config.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/selftests/vDSO/vdso_config.h index cdfed40..7b543e7 100644 --- a/tools/testing/selftests/vDSO/vdso_config.h +++ b/tools/testing/selftests/vDSO/vdso_config.h @@ -53,15 +53,19 @@ #if __riscv_xlen == 32 #define VDSO_32BIT 1 #endif +#elif defined(__loongarch__) +#define VDSO_VERSION 6 +#define VDSO_NAMES 1 #endif -static const char *versions[6] = { +static const char *versions[7] = { "LINUX_2.6", "LINUX_2.6.15", "LINUX_2.6.29", "LINUX_2.6.39", "LINUX_4", "LINUX_4.15", + "LINUX_5.10" }; static const char *names[2][6] = {