From patchwork Mon Jul 24 08:25:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Roberts X-Patchwork-Id: 124683 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1654845vqg; Mon, 24 Jul 2023 01:32:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlEZ8BS4yG83Gh6vNinBURpc4Ypd38Znpr1uLu1XV91CpMQagVKixtxr45FXy6DfDLDDBtUf X-Received: by 2002:a17:902:7897:b0:1bb:9357:8b76 with SMTP id q23-20020a170902789700b001bb93578b76mr4285295pll.50.1690187577711; Mon, 24 Jul 2023 01:32:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690187577; cv=none; d=google.com; s=arc-20160816; b=oKXMLziapWiKjohTSsurPKLHtpLm0DiwyMQsxBwiQ9yY71bsSLvIl8M2OArmRbu0iF nrtIbH0EwG41aeRF8hlzcJQiu8VZykB76qioREz+XtrgRRKxKAdYBaae2XEtfMoW3tYl Bj0WFkBo5GNth9kFcQZ4IkrVWpxW8TBkJFBTwnD0ihWJ6xWkyHAxKf038nm7B3O62jHQ 3vNsu+8gWzKLGoAwXao4W5oLKGIOTpO3G72CBt0CVVAtj0nZDqAlhSDQQ7ywPSfbjZwn 7DRoznvRmyHWYgZLwGYwFzgKoQql+onYOcilet0v3zN38m3hFX9bRNxvmyXo5nWb+xQ6 SSVw== 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=IStgpvB/AxFXY+gD4sZN5L7DJnID4eqcXYh0yWnPJzA=; fh=6rhI9kvwCMo+fckRKZYXD+Cg7edipvyuIhlyok3MppU=; b=ujqJUPxZgRQhiVsfsknqit19MxH0qDkIlphSsyZ0uEgh6ue0WAg1Xf+V7DQ458FA6i WeaDGLOgEOPzXA8kn7nbJUKec20gqe8ZCI56w/iuYpf9uVAlm5lC0DaHh/sJKBae4+NI Zfb9tOArVeondwwqfKa6Ejs5eggYS4E7d5PFT69bgRn0cRDIRCeeIRuZU15pnfgZcH5K 2QT5Ofm0I2+/9QT/DrF2ArLQNtAqHWo/pz3k0dKwV66w0SzpCEq9pLH7y4rN0tpSObBF 9pe+OPT9K0GU+2O0HLFXzXdfK2d9nR3MiJZhOPSrifEJTmddmSDuNAv+EY9iqLd4o+SV 7ONQ== 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 f17-20020a170902ce9100b001b8ae5d825bsi9747275plg.612.2023.07.24.01.32.38; Mon, 24 Jul 2023 01:32:57 -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 S231464AbjGXIZ5 (ORCPT + 99 others); Mon, 24 Jul 2023 04:25:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbjGXIZo (ORCPT ); Mon, 24 Jul 2023 04:25:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BBCF01AD; Mon, 24 Jul 2023 01:25:42 -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 AF3D9DE0; Mon, 24 Jul 2023 01:26:25 -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 D04CD3F67D; Mon, 24 Jul 2023 01:25:40 -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 v3 5/8] selftests/mm: va_high_addr_switch should skip unsupported arm64 configs Date: Mon, 24 Jul 2023 09:25:19 +0100 Message-Id: <20230724082522.1202616-6-ryan.roberts@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230724082522.1202616-1-ryan.roberts@arm.com> References: <20230724082522.1202616-1-ryan.roberts@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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: 1772290129556079052 X-GMAIL-MSGID: 1772290129556079052 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. Reviewed-by: David Hildenbrand Signed-off-by: Ryan Roberts --- 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