Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2649458pxb; Thu, 10 Feb 2022 02:21:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzk1nGGwatG0IU+BJguQH9rKuAk/VPU9UvWI2AOJnrMZi5uqQovZxJOJXKPyp7Ku4ZQQfux X-Received: by 2002:a17:90a:6585:: with SMTP id k5mr2050104pjj.94.1644488474866; Thu, 10 Feb 2022 02:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644488474; cv=none; d=google.com; s=arc-20160816; b=Ir3JXj66L+VKpgpN67jznMjrYz/OaPmjiSxzKNZ+84wgH/+ALy9AfhR59vavRLk0RT GvV/X1C/h5PvMzN3iI6qbgRvlSQaHjiHkGmye5o+IWe4ApyHEndlLi1WtO47yaJQGA1n M7zwcQQ4PKDDMQI20OK29lRFsmzqRLxbvkfw31UyGAF0fChsyZvzznAFJcur3FWP4tUo DPijmu0o373+3GRlOIdOatIqEOhvyFg5R+JcroNWyCjXQGie8XEc5elTr52hrDz6Z8Iq h1hravD8vEdNGHlUpaU3LL/H/NWl1aYDKHb8prfae3dlWdICoJGbM4kzMDo3tQGTTn7x XoAw== 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 :dkim-signature; bh=qEJvj5jIf4S2MMMr/LCtNMMTetslKbN5u1yu7P0vC9s=; b=Jt7Fqm8OnfWUG+sohKySIU2i6GQuNk0MO3k+MryzwsLjrff+Xx5s44VYJ/Gw9hPIx3 4FYJYmvGbqJ6o6pUhM8vfNNRl9cl7TO0vOe/zj8WpxnmlNwFefAzIN//r55sPwxWHkoz 8FYV70DrUdWh3nCWqlyiTwDPxotZov2lt+kogkbc/fbNbo0bjeSrEd9adeBNBR9aNek1 YPqNGrKe0lKY0Cy1JIlY8WZer86SkMgz6hr1a/ynZMLaFBd6cMGBCvPN7ax5F4vCpnPa CQTaM4/oDhQneHrV/S6C8PC7sAKvn0xPPrHPVKtlEcQZqUeu9tW7dUKn0LIV8eiritbC j47g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vn+OWGta; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l191si564536pge.35.2022.02.10.02.21.00; Thu, 10 Feb 2022 02:21:14 -0800 (PST) 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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vn+OWGta; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236349AbiBJHaV (ORCPT + 99 others); Thu, 10 Feb 2022 02:30:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236449AbiBJH3v (ORCPT ); Thu, 10 Feb 2022 02:29:51 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93F9C2189 for ; Wed, 9 Feb 2022 23:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=qEJvj5jIf4S2MMMr/LCtNMMTetslKbN5u1yu7P0vC9s=; b=vn+OWGtap6VYEoG92ZooJ0bvla mmvPM0x/Yox9Lw9LkikggBrhRLW/t0Hs2bZw/Qa+3BtN1stiXq6aSq5vUF0ntrKwYptxczmT6j0nq TWMhhcEOZI6z1g5YhO4edwzohWtxHx8gEI+3jxYOhyPFf9jT7cn2rRLyB8peuKn/YPyHrexxb1hGn Vl08Iv7L2hPj1p1SLDIBT+kLFy2guxYBOhjfAT92E9PSYFNISIj7CpUvGRdoTmPx0M8eNGn4vO0Hm 2jvMX48znRqF5CuJBmuaUeZihzInnJleJZ56fREz+drkHW+Z5IbC8O3x7Hqtew5LyXSn8EkLn4Eod eigVubWw==; Received: from [2001:4bb8:188:3efc:8014:b2f2:fdfd:57ea] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nI3tb-002sN2-C3; Thu, 10 Feb 2022 07:29:39 +0000 From: Christoph Hellwig To: Andrew Morton , Dan Williams Cc: Felix Kuehling , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , Ben Skeggs , Karol Herbst , Lyude Paul , Jason Gunthorpe , Alistair Popple , Logan Gunthorpe , Ralph Campbell , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, nvdimm@lists.linux.dev, linux-mm@kvack.org, Alex Sierra Subject: [PATCH 24/27] tools: update test_hmm script to support SP config Date: Thu, 10 Feb 2022 08:28:25 +0100 Message-Id: <20220210072828.2930359-25-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220210072828.2930359-1-hch@lst.de> References: <20220210072828.2930359-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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 From: Alex Sierra Add two more parameters to set spm_addr_dev0 & spm_addr_dev1 addresses. These two parameters configure the start SP addresses for each device in test_hmm driver. Consequently, this configures zone device type as coherent. Signed-off-by: Alex Sierra Acked-by: Felix Kuehling Reviewed-by: Alistair Popple Signed-off-by: Christoph Hellwig --- tools/testing/selftests/vm/test_hmm.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/vm/test_hmm.sh b/tools/testing/selftests/vm/test_hmm.sh index 0647b525a62564..539c9371e592a1 100755 --- a/tools/testing/selftests/vm/test_hmm.sh +++ b/tools/testing/selftests/vm/test_hmm.sh @@ -40,11 +40,26 @@ check_test_requirements() load_driver() { - modprobe $DRIVER > /dev/null 2>&1 + if [ $# -eq 0 ]; then + modprobe $DRIVER > /dev/null 2>&1 + else + if [ $# -eq 2 ]; then + modprobe $DRIVER spm_addr_dev0=$1 spm_addr_dev1=$2 + > /dev/null 2>&1 + else + echo "Missing module parameters. Make sure pass"\ + "spm_addr_dev0 and spm_addr_dev1" + usage + fi + fi if [ $? == 0 ]; then major=$(awk "\$2==\"HMM_DMIRROR\" {print \$1}" /proc/devices) mknod /dev/hmm_dmirror0 c $major 0 mknod /dev/hmm_dmirror1 c $major 1 + if [ $# -eq 2 ]; then + mknod /dev/hmm_dmirror2 c $major 2 + mknod /dev/hmm_dmirror3 c $major 3 + fi fi } @@ -58,7 +73,7 @@ run_smoke() { echo "Running smoke test. Note, this test provides basic coverage." - load_driver + load_driver $1 $2 $(dirname "${BASH_SOURCE[0]}")/hmm-tests unload_driver } @@ -75,6 +90,9 @@ usage() echo "# Smoke testing" echo "./${TEST_NAME}.sh smoke" echo + echo "# Smoke testing with SPM enabled" + echo "./${TEST_NAME}.sh smoke " + echo exit 0 } @@ -84,7 +102,7 @@ function run_test() usage else if [ "$1" = "smoke" ]; then - run_smoke + run_smoke $2 $3 else usage fi -- 2.30.2