From patchwork Wed Aug 19 12:13:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 247960 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp404609ils; Wed, 19 Aug 2020 05:14:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuUAvBmxA0Ezxr+1rUVIBvZqG3Z+YFRuorEvFMfRINFkC8NcFQUbVtukQ4R/IKcupDqvjP X-Received: by 2002:a17:906:78e:: with SMTP id l14mr26443798ejc.67.1597839253566; Wed, 19 Aug 2020 05:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597839253; cv=none; d=google.com; s=arc-20160816; b=az4LyeYUJR3lJnb12FhKfwitCt27DDK31p5x/7pY0Udzvinl7zSZ3VWyYX+vhYOMDW dpuZ17sr7KpyONkVZlS/YHStCNVvPvES5HCInS3ikBkVPptWVNme1db40etI/8TOht+b OAiUJ6HGbuNtMLyP6yaNGIwjLf9Y3+3wX8Vz4lDyImESYFwoKcTM2XcFhSXuGoS7AJSB PY1jWsXDOnDWkzhC3iB4H5cI1iIqxrjLj482ESIL+PZuwMOVbO36BvSX6EK826HT4Rwv 4xZs6pqg7toyYDAIkBbhhtl6djaODzqUzL6VeBU82WveYyN2JjYyKvspFc6SkcIzP335 gcXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rzsL2X8+dIxcbWdscjZhV1ge9hK/Hg8ooAlJsiD1yD0=; b=c7Bd7d53SClep8W0JbGJEKzDAJCPTSEKv+kxbuUe1fUOZvQKVceKy1V5gG7OHiv7+Z f86JTjBNLxQHvUzEE/82Gh/NPNS2XIqwUM/W8bVmUXUjlW+JM2KS2t6caZX2t7Tv6KKg KQjaFC16zDh5n4Qkr7Fz58zAxiF1iBp5Wel3Fwj05siyNRmnAIDsiA1CEmlaYxLDvvLA oFPY2u5ikYXl9nB5edi5kDNbiZzfqQHjJYeJMymx9Vynd5k/mFZh242KqHKOuCMRXvyW /Ogl6o2OTrT37BgT4OghW5DAdYUfNGQmSHIjt7euIKyGQD0jhgGDR0opJ56iwGkZcMZu EJOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tTpFukSQ; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si16772273eja.559.2020.08.19.05.14.13; Wed, 19 Aug 2020 05:14:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tTpFukSQ; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbgHSMON (ORCPT + 6 others); Wed, 19 Aug 2020 08:14:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:51448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727018AbgHSMOL (ORCPT ); Wed, 19 Aug 2020 08:14:11 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF5AE206DA; Wed, 19 Aug 2020 12:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597839251; bh=Qm1D4s+M/mO7mwIKm4XuWbPwM6fNbujUhQSw8qCmPVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tTpFukSQmJyyrAXX0yhMBRTggEOGVM7aeRXckhVLbgCQi3LgF58ukbdELkTN/v+/s UVIuUi9W3MAQZNMAuX/8iUqNsw1gyXwY0oqY3sCBfFFU5axWh8MshuvTA5yPuckMPp n3yXaa3UY9WcZFA8Szu0ifRmeBHC8Fmv0cRQU/Mg= From: Mark Brown To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, Vincenzo Frascino , linux-kselftest@vger.kernel.org, Shuah Khan , Mark Brown Subject: [PATCH v3 5/5] selftests: vdso: Support arm64 in getcpu() test Date: Wed, 19 Aug 2020 13:13:18 +0100 Message-Id: <20200819121318.52158-6-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200819121318.52158-1-broonie@kernel.org> References: <20200819121318.52158-1-broonie@kernel.org> MIME-Version: 1.0 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org arm64 exports the vDSO ABI with a version of LINUX_2.6.39 and symbols prefixed with __kernel rather than __vdso. Update the getcpu() test to handle this. Signed-off-by: Mark Brown --- tools/testing/selftests/vDSO/vdso_test_getcpu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.20.1 diff --git a/tools/testing/selftests/vDSO/vdso_test_getcpu.c b/tools/testing/selftests/vDSO/vdso_test_getcpu.c index fc25ede131b8..4aeb65012b81 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getcpu.c +++ b/tools/testing/selftests/vDSO/vdso_test_getcpu.c @@ -14,8 +14,18 @@ #include "../kselftest.h" #include "parse_vdso.h" +/* + * ARM64's vDSO exports its getcpu() implementation with a different + * name and version from other architectures, so we need to handle it + * as a special case. + */ +#if defined(__aarch64__) +const char *version = "LINUX_2.6.39"; +const char *name = "__kernel_getcpu"; +#else const char *version = "LINUX_2.6"; const char *name = "__vdso_getcpu"; +#endif struct getcpu_cache; typedef long (*getcpu_t)(unsigned int *, unsigned int *,