Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp652825lqa; Sat, 27 Apr 2024 20:05:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYzgCF8G+dYjsZppmjDrvHK3bWRtTVHAW68T9ZiD2OpTkyUXHxMNZ6ii0ZT43gruH15pspX/3mZsjZ/ElWQOAXuGDzourxHSMiap1yIQ== X-Google-Smtp-Source: AGHT+IEBVlRmZQ+jG91pRqmazubxOaGGuz5EO/woWMSAIWrIseQVBQ08rVBDa1E5h17SH/ONZoF2 X-Received: by 2002:a17:903:18b:b0:1e8:b81d:e193 with SMTP id z11-20020a170903018b00b001e8b81de193mr8808818plg.12.1714273556306; Sat, 27 Apr 2024 20:05:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714273556; cv=pass; d=google.com; s=arc-20160816; b=nQqRLh6FA+P7SDyZB7WCdX0uA0bT98vHQIZCqfEfkR5KKUIBnpk01s9mnQX0wUVvk1 oRQT01DSt2DZGtk4BS3qPkWTQGckiRvvQH3yDVMC3h7T+hR2m2UUT2viMh/1ru0mMndx DcgCdHSIdbKxKgZnisXQEqrfBgYjlo7oohEtjor0QssYgfusNoJSWYutX8yeOu2XHe6V /SBRjaICpsJtiarXmB0a04vqSZMqwGmmV9bdMu1OcKS/zvC3xCJzlUdbwsT73HLVsjt4 9V9iCqHW0FOOdI/9miWWV8rY+vLZm1dvIHKdYVR0ZFglbtOQwd7+RQZud8/Lor7zHj5j gsQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=4aWiOyCuGKHoG0ecjAf9ft439TrsZSN3U6+HpEiHQGE=; fh=EuUwgqCKIF6/f0bf/giyix/QuDeZK7TSrOSzpwW5mAU=; b=VjHtJLbz6q3X7PS9nH/jUMnHsAryddrVJNBqzRteCoOpVXX8HDq2P4EMJdqzcyyMQq XnR/diakGC/ddj4kyumRfltxZncllgga3TbUXytt4m2LOC/DU4LmLBuym8lo+JBgm5Lx jV5dm4u63BvPupyaSB+RIwS1W75IfEBl8chvpnFyJpIYxPy7XyMbMjLlPSpWg4kBZr4V ioVMdhCqC+ZJ4W/7gGaaYG9xeCp3Uskk/TfY37HumIRNrlGcpK45q9bI/tLWoroeJ39W uHu8AWMfHFajb/9UyWam6BPeCV3G4nSPLFzxMvQ5QL8iQvaaOKyxTN54snutyL7OBszp 1b0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-161232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161232-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m4-20020a170902db0400b001e832ed6fc0si17878638plx.606.2024.04.27.20.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Apr 2024 20:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-161232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161232-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B90F32824C3 for ; Sun, 28 Apr 2024 03:05:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4530553A1; Sun, 28 Apr 2024 03:05:41 +0000 (UTC) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A50C15C9; Sun, 28 Apr 2024 03:05:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.242.206.163 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714273540; cv=none; b=M7CnpH6NG84NIc5hS3BdJT/w6/CVCQhKDsVtl+UKNR1YiY2z8WD4GQtIyuQ0jTRkurMd1ZzhQ9mjwQR2lbdIu5hUdiAffZU3Kf4Zdq8CNMbyJeXAHTfpjoPwnMYg4bMywyFBoeYPZfxko9wZzOVKm5dUkepltA2Gi/kpO+VRm24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714273540; c=relaxed/simple; bh=2Te3zCx/07WchGhDGUyXNgv0rWRyoDuNSfqoFEGcKeA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=onzkQoFtp03Z2UcaFQ1Htol+U29yBBxP5wrl6Wu4x2XxjXh2H5OpXkPJvLDREgDpBbejJdvgbRkf2RfL4j8EO3OPcDL7cam/Cm6xthDurVwDbw6qW1tA5dsEgMUFtO73sa4rU2sneRsFgz6Y2e7/7LYfX3hSPE9lNXcBiWaCO3k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn; spf=pass smtp.mailfrom=loongson.cn; arc=none smtp.client-ip=114.242.206.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8DxmOn_vC1mNDcEAA--.3384S3; Sun, 28 Apr 2024 11:05:35 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxHlX6vC1mZOcHAA--.5433S3; Sun, 28 Apr 2024 11:05:32 +0800 (CST) From: Tiezhu Yang To: Shuah Khan , Andrew Morton , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino Cc: Kees Cook , Mark Brown , Muhammad Usama Anjum , linux-kselftest@vger.kernel.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/2] selftests/vDSO: Fix building errors on LoongArch Date: Sun, 28 Apr 2024 11:05:29 +0800 Message-ID: <20240428030530.24399-2-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240428030530.24399-1-yangtiezhu@loongson.cn> References: <20240428030530.24399-1-yangtiezhu@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:AQAAf8CxHlX6vC1mZOcHAA--.5433S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7KF4kZr48Kw18uFW3JrWkAFc_yoW8XFW5pa n7G3s0kw4xKa4fK34fJ398Wa1YkrZ3AFWxJr43W3y3Ary5Jws7XrZ7KFZIgFW2939YqwsY yFyIgw4S9F1kJwbCm3ZEXasCq-sJn29KB7ZKAUJUUUUD529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUB2b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1a6r1DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1ln4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q 6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41lc7CjxVAaw2AFwI0_Jw0_GFyl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_ Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_Xr0_Ar1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUoEfOUUUUU There exist the following errors when build vDSO selftests on LoongArch: # make headers && 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 the following code in arch/loongarch/vdso/vdso.lds.S: VERSION { LINUX_5.10 { global: __vdso_getcpu; __vdso_clock_getres; __vdso_clock_gettime; __vdso_gettimeofday; __vdso_rt_sigreturn; local: *; }; } so VDSO_VERSION should be 6 and VDSO_NAMES should be 1 for LoongArch, add them to fix the building errors on LoongArch. Signed-off-by: Tiezhu Yang Reviewed-by: Muhammad Usama Anjum --- 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 cdfed403ba13..7b543e7f04d7 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] = { -- 2.42.0