From patchwork Thu Mar 11 07:46:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Sivaraj X-Patchwork-Id: 12130561 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06229C433E6 for ; Thu, 11 Mar 2021 07:48:55 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B18264F74 for ; Thu, 11 Mar 2021 07:48:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B18264F74 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fossix.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3235E100F225D; Wed, 10 Mar 2021 23:48:54 -0800 (PST) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::1033; helo=mail-pj1-x1033.google.com; envelope-from=santosh@fossix.org; receiver= Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 71508100F2255 for ; Wed, 10 Mar 2021 23:48:52 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id lr10-20020a17090b4b8ab02900dd61b95c5eso6400179pjb.4 for ; Wed, 10 Mar 2021 23:48:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fossix-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AJyJaAot47MG4PJfNO9pFZfOa0ecfqouA9e2QJYVsEA=; b=kmpgBSqF9Su/0kICrfwjIRWT/Mk+5hjQgjmug9xNRa7yRlWcHoVz22Mxetr42aDlNk LAeDjwek7eYBhoOLkidLUVaDYr9LqYNfzwGLop4D0HmgO4q7jWlnGR4cVIQeNzMyadi2 o6379Tl870Bp6Voc7CFu6nq2jtXM3ddvIQNnZBL6bfTp9T4b4uRF76hkdNhB2rtOlTAQ KYFp4Zv1G1dxsk9XZDqHaJFRkvSOHoH6uXX7dtY6ruxXb4h2dIuzurwQP7eOqLpgQ7Eh 6bGJzb/YqOgDRg/6dp1eAI5VdspzuX5DOTbUBv5TANZNSBxlSY+f0JsaKNvw8IUJGOTb k1Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AJyJaAot47MG4PJfNO9pFZfOa0ecfqouA9e2QJYVsEA=; b=NkPifo5HmX9bjkNKQtLSsjz4kiNfkHnAaf/y57TDdMAEUDFMapWWineLqzr2HuVoDX pEv+qLMdftA6gPjieitcJ4I3rzK7y25JoPcIODaeJKpjMC4Ln81NwFGrS1PvRZbQCyZJ mJFzFh/Ht7NJVRmyEARAP5Uv+nDwXD7arO4F3geyiGIUNKKUIt8N1blYGvCPbUGxhKYO +XXIlokqTa8/sav9LPTp0Mia3iCrDyfEsInnVJqyIDaLtIXTakolQvjjzj1i5crIyAVt 8PyN4E6pMv76bSvpQgs/PPAaFLpaFy7gmrJkalMapfNiWhxCrRPd/U/9Z3+UQ93lZSis ZQrg== X-Gm-Message-State: AOAM530dLgBFJP0um6ZngpttBUswNp0Qi++oLw88pSVeIOpKmoNPFf0U yWKKobzO2MI2Q3/Uz0pwvhNevBC7F/heMw== X-Google-Smtp-Source: ABdhPJzWSHlh1fktG0IoI+9L7+/sL6V9ukGX9fFb6ZhQxtam/7zIPotZwMp17efhijE8Lb8i4QBk1g== X-Received: by 2002:a17:90a:ce92:: with SMTP id g18mr7816943pju.52.1615448931909; Wed, 10 Mar 2021 23:48:51 -0800 (PST) Received: from localhost.localdomain ([103.21.79.4]) by smtp.gmail.com with ESMTPSA id t13sm1528580pfe.161.2021.03.10.23.48.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 23:48:51 -0800 (PST) From: Santosh Sivaraj To: Linux NVDIMM , Vishal Verma , Vaibhav Jain , Shivaprasad G Bhat , Harish Sriram , Dan Williams Cc: Santosh Sivaraj Subject: [ndctl PATCH v3 3/4] papr: Add support to parse save_fail flag for dimm Date: Thu, 11 Mar 2021 13:16:51 +0530 Message-Id: <20210311074652.2783560-3-santosh@fossix.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210311074652.2783560-1-santosh@fossix.org> References: <20210311074652.2783560-1-santosh@fossix.org> MIME-Version: 1.0 Message-ID-Hash: XDFH3YKBQLPNSLSLS33EO4WPIKQLFLPZ X-Message-ID-Hash: XDFH3YKBQLPNSLSLS33EO4WPIKQLFLPZ X-MailFrom: santosh@fossix.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: This will help in getting the dimm fail tests to run on papr family too. Also add nvdimm_test compatibility string for recognizing the test module. Signed-off-by: Santosh Sivaraj --- ndctl/lib/libndctl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 26b9317..dd1a5fc 100644 --- a/ndctl/lib/libndctl.c +++ b/ndctl/lib/libndctl.c @@ -805,6 +805,8 @@ static void parse_papr_flags(struct ndctl_dimm *dimm, char *flags) dimm->flags.f_restore = 1; else if (strcmp(start, "smart_notify") == 0) dimm->flags.f_smart = 1; + else if (strcmp(start, "save_fail") == 0) + dimm->flags.f_save = 1; start = end + 1; } if (end != start) @@ -1035,7 +1037,8 @@ NDCTL_EXPORT int ndctl_bus_is_papr_scm(struct ndctl_bus *bus) if (sysfs_read_attr(bus->ctx, bus->bus_buf, buf) < 0) return 0; - return (strcmp(buf, "ibm,pmemory") == 0); + return (strcmp(buf, "ibm,pmemory") == 0 || + strcmp(buf, "nvdimm_test") == 0); } /**