From patchwork Tue Aug 8 06:13:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zeng Heng X-Patchwork-Id: 13345720 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9DF2C001DB for ; Tue, 8 Aug 2023 06:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=u9AEwUjqpLElx8nLR9oV4tPGwDEyTMjHpfWQeHIZVGE=; b=an/EBPgGJ2piPN EDoNLxhzVWhfZMU/1xr9zYaCiAZtK9zP1X2xL4hwk+rlv45B5fNyyrHxOmTVhP7jd7HwD64kigH/1 GC5KbIKyVHWrwhkKV5MYbARUD7P1rgmrh5Gs/tD1AKhu8MyyP2K1YefpqF2pDxw1yLXJujWs69TDT MLD+eun5YOXBJXBkreJq1XnpVGgbU70QgrMsK21I8+Gi6y7jXWZD30SIRptl2HMDPB6RSdaerbB9I ymoPMTMeRGROPpaLObj6MaUoXvN5V/wu5CwfRv7BNt6zfzmX2ZjM2vowkvMqz3gtnPxfdCZJQWQZ6 PL6R3TUG7czfbWVZz0Sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTG3G-001oNf-2T; Tue, 08 Aug 2023 06:18:42 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTG3B-001oKA-0L for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 06:18:38 +0000 Received: from kwepemi500024.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RKjcy2bjHzVk0y; Tue, 8 Aug 2023 14:16:34 +0800 (CST) Received: from huawei.com (10.175.103.91) by kwepemi500024.china.huawei.com (7.221.188.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 8 Aug 2023 14:18:26 +0800 From: Zeng Heng To: , , , , CC: , , , Subject: [PATCH 1/5] kselftest/arm64: add float-point feature to hwcap test Date: Tue, 8 Aug 2023 14:13:51 +0800 Message-ID: <20230808061356.2215158-1-zengheng4@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500024.china.huawei.com (7.221.188.100) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230807_231837_331500_F307FCD6 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the FP feature check in the set of hwcap tests. Signed-off-by: Zeng Heng Reviewed-by: Mark Brown --- tools/testing/selftests/arm64/abi/hwcap.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index 6a0adf916028..eaf9881c2e43 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -39,6 +39,12 @@ static void cssc_sigill(void) asm volatile(".inst 0xdac01c00" : : : "x0"); } +static void fp_sigill(void) +{ + /* FMOV S0, #1 */ + asm volatile(".inst 0x1e2e1000" : : : ); +} + static void ilrcpc_sigill(void) { /* LDAPUR W0, [SP, #8] */ @@ -235,6 +241,13 @@ static const struct hwcap_data { .cpuinfo = "cssc", .sigill_fn = cssc_sigill, }, + { + .name = "FP", + .at_hwcap = AT_HWCAP, + .hwcap_bit = HWCAP_FP, + .cpuinfo = "fp", + .sigill_fn = fp_sigill, + }, { .name = "LRCPC", .at_hwcap = AT_HWCAP,