From patchwork Thu Jul 13 13:54:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Roberts X-Patchwork-Id: 119919 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1852381vqm; Thu, 13 Jul 2023 07:11:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlHV5BWoQR5n+wY2veMcEZjvXgOrR0C77HKDTWoF/Hcd4i48M7v4YUg4y3NMqM7b3aEvFY3b X-Received: by 2002:a17:906:c2ca:b0:98d:4ae:8db9 with SMTP id ch10-20020a170906c2ca00b0098d04ae8db9mr2523912ejb.19.1689257497004; Thu, 13 Jul 2023 07:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689257496; cv=none; d=google.com; s=arc-20160816; b=T4C1YAwX+kmKOWQIzPD5usOLo3zVGeSXRXFbbOXDRv3f0rEanXt3gI+7JCP4SY2PAX MqwOlBdj/fn7aO4vnsN/8xC5+Mmwqlu7mUDekTzBTmyI2XICwDUJWCyN3VqbvnQ9PWE1 6QTGU3b4Ir6sKDTDw0C2NfDc9j4onbPUyDY9fsjxT3jU1owwAoVwNUehEJoerVPhOear FwMu6HxzpSJpiTLNBwJFAFWrlS2TatL17s3Rx/LhTkbbsXulcuL3UB5Bbis0c+OrFQC8 p3yjEacZiBpmtejCVXfogSdYacvIV9Hpd9Fv3g8lJUHXrDpSjGOurEd00hSXGVX1jYxn Q+/w== 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=Cz2iEEBGyYF+rSb/J/At2npEIiP2rZZS/45ogfF1Shk=; fh=PBHZcfMfFxGGBVmDESRU6Gjyj3qxzeiTc8DMNv9diCw=; b=GmaPLADySqgQI8FMB2PFg8INGCpog5OlSLxixB32DN1zbsgCDljQa1ns57IrIyiFgp MSHTJGJtSknC7gdu/DAj1hvG7qrvsmraIueJOp8TYD9do1YVc4vh797pMqAJUftZmBFC AWRFWN1FalUEthjzcyn5FuUPWqAzvM/MpMiPPpgzDUwstilHPQn9kimZwI7ZUD9hjSqs spw/F5nTla6c90VGKiFJiqcNpd7lOh92ad9licm0GCVy+n4nPmzo8cV2nP0p9/aA3OBn Yn/nNnyKcwpLQx2jx+Z/ONQ+tJTrcXlM9vYKFlhCluNAejyNHf54RgLz9k2ihZzI7WyW f9uQ== 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 jt15-20020a170906dfcf00b0098722b28a18si7696359ejc.458.2023.07.13.07.11.12; Thu, 13 Jul 2023 07:11:36 -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 S232488AbjGMNzO (ORCPT + 99 others); Thu, 13 Jul 2023 09:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231920AbjGMNzF (ORCPT ); Thu, 13 Jul 2023 09:55:05 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C3541FF7; Thu, 13 Jul 2023 06:55:01 -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 7AA1C1576; Thu, 13 Jul 2023 06:55:43 -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 70A523F73F; Thu, 13 Jul 2023 06:54:59 -0700 (PDT) From: Ryan Roberts To: Andrew Morton , Shuah Khan , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , David Hildenbrand , Mark Brown , John Hubbard , Florent Revest , "Liam R. Howlett" Cc: Ryan Roberts , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org Subject: [PATCH v1 6/9] selftests/mm: va_high_addr_switch should skip unsupported arm64 configs Date: Thu, 13 Jul 2023 14:54:37 +0100 Message-Id: <20230713135440.3651409-7-ryan.roberts@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230713135440.3651409-1-ryan.roberts@arm.com> References: <20230713135440.3651409-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: 1771314868925617934 X-GMAIL-MSGID: 1771314868925617934 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 | 3 ++- 1 file changed, 2 insertions(+), 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..4b6f62c69a9d 100644 --- a/tools/testing/selftests/mm/va_high_addr_switch.c +++ b/tools/testing/selftests/mm/va_high_addr_switch.c @@ -292,7 +292,8 @@ static int supported_arch(void) #elif defined(__x86_64__) return 1; #elif defined(__aarch64__) - return 1; + size_t page_size = getpagesize(); + return page_size == PAGE_SIZE; #else return 0; #endif