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: 11723851 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79A30739 for ; Wed, 19 Aug 2020 12:14:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 584592076E for ; Wed, 19 Aug 2020 12:14:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597839253; bh=Qm1D4s+M/mO7mwIKm4XuWbPwM6fNbujUhQSw8qCmPVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZYMvwldax3Tn2zNNE0NBMrcgGSEkq4Ue+re8kHSVc9UqJzOkKgM+HyUgSreK33LZs RKjKBunn459Yo/HmDSk+uPIMuvfTsspvO5UKlhcQlUuBTEUUwL45da+vlTM9wtZVMn DhcYkhVKb5nAQzeRTbIfHybkP5dXyokqbYQ3a+zM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbgHSMON (ORCPT ); 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(+) 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 *,