From patchwork Mon Jul 17 10:31:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Roberts X-Patchwork-Id: 121209 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp1038229vqt; Mon, 17 Jul 2023 04:08:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+kV45M2Q9ge6kLTFfJRxlghONYpSGWJPDLTERqjSK/b4JRsiO+Pgu946GwR+l2c6+vuZl X-Received: by 2002:a17:907:1003:b0:993:c48f:184c with SMTP id ox3-20020a170907100300b00993c48f184cmr9766060ejb.10.1689592089887; Mon, 17 Jul 2023 04:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689592089; cv=none; d=google.com; s=arc-20160816; b=QqezUt+DTMfgUS9Z/N3Fxkbl/4AjkSuTlCLlownGrixzMpHP8uTiFTpfTRMQfr187G AwBBGLpRU5KhY5cb2OfIzqvlVF9TthTWgvGIwMBM5mf0hYybkplzbI1y0xqYqg6p2upx aQrYkHpt+3wcGQyS/u3PmKEmDHbdKX3nmQpDKo4H14vpoojVLNiVwyfgreWxNxHFbrHB YmrsXOJoSA7YkO1ijx/UH8WklTLiCKVzY2n9GQ7+V8ADjvZGE/7isOAjZXobqP8viCvI 7sHiWY/FagReEh4hKNm/EHGBRc+s42oXNiIfWHyH9HY8+74pcm5Ovvaw82mbEuqvsjR2 pKlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dNlBjDfq+AmKtLS3RpRye5O1GUWvdXIGLiTgWzCy/u4=; fh=OUPfCZjK3Gm4uAxJmzTYkNGoALdOI9ZG4q/pkSTXiCE=; b=XlOAlW077c1g10detgp9Md76lTZ8u9uKs/Di8nHFCvxdHMtGWh8h7gd9/IqYI7JtRc O/MWfnvukh61/O1aWxeZn0yAYzB+1uvKwBZphbPJOK/q+oN//NMWQdjJLeOEDB6kZWK+ i0ZAXwpX0uzjL4HpPEMJUBi9AUx9XDgw53L+PUaRlp9SVEgkwvX9nwXyEawJ925t1Op1 6kTo3BOBGFUh4gSOC0mhH/bajcY6Tk9kpOU2kWYRMqXCE5D4UJZQ30HoOO4ZB0TL0gbv jyRWKLVkwTeEMb1v8NE6cn08RxKZLSVNQV5aIhPA4f3m+Cd1y8iIcs/0U7DcnRi+dXfK qLIw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id op19-20020a170906bcf300b00988d6a7cdefsi13326122ejb.212.2023.07.17.04.07.46; Mon, 17 Jul 2023 04:08:09 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbjGQKc1 (ORCPT + 99 others); Mon, 17 Jul 2023 06:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbjGQKcU (ORCPT ); Mon, 17 Jul 2023 06:32:20 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BC9A910C0; Mon, 17 Jul 2023 03:32:16 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 685612F4; Mon, 17 Jul 2023 03:32:59 -0700 (PDT) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6F4F93F67D; Mon, 17 Jul 2023 03:32:14 -0700 (PDT) From: Ryan Roberts To: "Andrew Morton" , "Shuah Khan" , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , "David Hildenbrand" , "Mark Brown" , "John Hubbard" , "Florent Revest" , Peter Xu Cc: Ryan Roberts , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 5/8] selftests/mm: va_high_addr_switch should skip unsupported arm64 configs Date: Mon, 17 Jul 2023 11:31:49 +0100 Message-Id: <20230717103152.202078-6-ryan.roberts@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230717103152.202078-1-ryan.roberts@arm.com> References: <20230717103152.202078-1-ryan.roberts@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,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: INBOX X-GMAIL-THRID: 1771665714986396244 X-GMAIL-MSGID: 1771665714986396244 va_high_addr_switch has a mechanism to determine if the tests should be run or skipped (supported_arch()). This currently returns unconditionally true for arm64. However, va_high_addr_switch also requires a large virtual address space for the tests to run, otherwise they spuriously fail. Since arm64 can only support VA > 48 bits when the page size is 64K, let's decide whether we should skip the test suite based on the page size. This reduces noise when running on 4K and 16K kernels. Signed-off-by: Ryan Roberts Reviewed-by: David Hildenbrand --- tools/testing/selftests/mm/va_high_addr_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/va_high_addr_switch.c b/tools/testing/selftests/mm/va_high_addr_switch.c index 7cfaf4a74c57..cfbc501290d3 100644 --- a/tools/testing/selftests/mm/va_high_addr_switch.c +++ b/tools/testing/selftests/mm/va_high_addr_switch.c @@ -292,7 +292,7 @@ static int supported_arch(void) #elif defined(__x86_64__) return 1; #elif defined(__aarch64__) - return 1; + return getpagesize() == PAGE_SIZE; #else return 0; #endif