From patchwork Mon Sep 18 04:55:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jehoon Park X-Patchwork-Id: 13388803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0922ECD37B0 for ; Mon, 18 Sep 2023 04:52:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233195AbjIREwW (ORCPT ); Mon, 18 Sep 2023 00:52:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239626AbjIREwS (ORCPT ); Mon, 18 Sep 2023 00:52:18 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6EA1103 for ; Sun, 17 Sep 2023 21:52:11 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230918045210epoutp03e365395981f2c78fb56e63b77e98e167~F5Rj0cmI73042130421epoutp03C for ; Mon, 18 Sep 2023 04:52:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230918045210epoutp03e365395981f2c78fb56e63b77e98e167~F5Rj0cmI73042130421epoutp03C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1695012730; bh=wGIuuZgcO3xdRGPnPT99yIjCZBh1PNDhl+AJLqSthEU=; h=From:To:Cc:Subject:Date:References:From; b=CHzGos9AknthRQhiDSezn+j+dKzZlU+OuVRGye9MMbRzs/zxagLyTX0TE1fb9yQlF OM0G+jPgzyh0rlm4cpCA4SLaAnVXlLcJgkaA9pDL+F+Vyh9KtnI3fGX3D6DhySxkmA i/OquNV8G0z61GshSQb41T4JYFUQwo3FqZXG8kKI= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20230918045209epcas2p2e7f82d0486d5b770bc8e3e392f8cb6ca~F5RjE08Wo0240802408epcas2p2u; Mon, 18 Sep 2023 04:52:09 +0000 (GMT) Received: from epsmgec2p1-new.samsung.com (unknown [182.195.36.99]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Rpspc4xGtz4x9Py; Mon, 18 Sep 2023 04:52:08 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmgec2p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 9D.2F.19471.877D7056; Mon, 18 Sep 2023 13:52:08 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20230918045208epcas2p36f0c80940e86e5165a3036414a32d7f6~F5Rh8P1wr2951129511epcas2p3c; Mon, 18 Sep 2023 04:52:08 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230918045208epsmtrp257851a6db9b04c56c61d93739518197d~F5Rh7Vwxn2547925479epsmtrp2s; Mon, 18 Sep 2023 04:52:08 +0000 (GMT) X-AuditID: b6c32a4d-dc5ff70000004c0f-a7-6507d778ddbc Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 9E.A4.08742.777D7056; Mon, 18 Sep 2023 13:52:08 +0900 (KST) Received: from jehoon-Precision-7920-Tower.dsn.sec.samsung.com (unknown [10.229.83.133]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230918045207epsmtip1102bde8ffc92d4dfb71235b9781ecb58~F5Rhv3Icn1750417504epsmtip1G; Mon, 18 Sep 2023 04:52:07 +0000 (GMT) From: Jehoon Park To: linux-cxl@vger.kernel.org Cc: nvdimm@lists.linux.dev, Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Dave Jiang , Davidlohr Bueso , Jonathan Cameron , Kyungsan Kim , Junhyeok Im , Jehoon Park Subject: [ndctl PATCH v3 0/2] add support for Set Alert Configuration mailbox command Date: Mon, 18 Sep 2023 13:55:12 +0900 Message-Id: <20230918045514.6709-1-jehoon.park@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLKsWRmVeSWpSXmKPExsWy7bCmqW7FdfZUg/WflSzuPr7AZjF96gVG ixM3G9ksVt9cw2ix/+lzFosDrxvYLVYtvMZmsfjoDGaLo3s4LM7POsVisfLHH1aLWxOOMTnw eLQcecvqsXjPSyaPF5tnMnr0bVnF6DF1dr3H501yAWxR2TYZqYkpqUUKqXnJ+SmZeem2St7B 8c7xpmYGhrqGlhbmSgp5ibmptkouPgG6bpk5QCcqKZQl5pQChQISi4uV9O1sivJLS1IVMvKL S2yVUgtScgrMC/SKE3OLS/PS9fJSS6wMDQyMTIEKE7Iztt2Zx1owi6/i9J+5LA2My7i6GDk5 JARMJD78uscCYgsJ7GGUOPuuvouRC8j+xCjx+OMkdgjnG6PE1a2LWGA6Oq5/ZYVI7GWUmL5g ORuE08sk0fSukw2kik1AW+L+9g1gtoiArETzugdMIEXMApuZJZbtPAeWEBYIl5hwpQUowcHB IqAqsXGKAUiYV8Ba4vb/jewQ2+QlVm84wAzSKyFwjV3iRGMzI0TCReL0n59QRcISr45vgbKl JD6/28sGYedL/Dx5ixXCLpD49OUD1AvGEu9uPmcF2cssoCmxfpc+iCkhoCxx5BZYBbMAn0TH 4b/sEGFeiY42IYhGVYmu4x+gDpCWOHzlKDNEiYdE54sySCDGStx8sYdxAqPsLITxCxgZVzFK pRYU56anJhsVGOrmpZbDoyk5P3cTIzjdafnuYHy9/q/eIUYmDsZDjBIczEoivDMN2VKFeFMS K6tSi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OylRRLyun1URHL4pbNyPu3TmPWDZvDmq5no8y06h1Xfg5U3ljymlN0 fuOqJYmFt5IC5OU0RHLVXzH9/BmrVpmf6imozi+ZIeC17IDWhar5Dtsmn9wrJ5srZP9Egp1D pT5pU/U/v/WNur4TGAu2++0wWncmbF5JrWe85n6H+kPxAtW3neMa6lTFHryrjF5qtqw9K/UA 2+qnXqZly/3Co9sO3j039/jEOEP+EhUWrzq3P8dqxIt6TvxgUlLcOk1s2kOzzUydZ9qvpy+K vHPx0bHuVfeOzLhQefOppVxOz4/K4nwlluKMREMt5qLiRACLUBJUrQIAAA== X-CMS-MailID: 20230918045208epcas2p36f0c80940e86e5165a3036414a32d7f6 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230918045208epcas2p36f0c80940e86e5165a3036414a32d7f6 References: Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org CXL 3.0 Spec 8.2.9.8.3.3 defines Set Alert Configuration mailbox command, which configures device's warning alerts. This patchset adds support for the command. The implementation is based on the 'ndctl-inject-smart'. Variable and function names are aligned with the implementation of 'Get Alert Configuration'. Changes in v3 - Reorganize cover letter and commit message (Davidlohr) - Update details of the example in man page - Move 'verbose' option to the end in man page (Davidlohr) - Link to v2: https://lore.kernel.org/r/20230807063335.5891-1-jehoon.park@samsung.com Changes in v2 - Rebase on the latest pending branch - Remove full usage text in the commit message (Vishal) - Correct texts in document and log_info() (Vishal) - Change strncmp() to strcmp() for parsing params (Vishal) - Link to v1: https://lore.kernel.org/r/20230711071019.7151-1-jehoon.park@samsung.com *** BLURB HERE *** Jehoon Park (2): libcxl: add support for Set Alert Configuration mailbox command cxl: add 'set-alert-config' command to cxl tool Documentation/cxl/cxl-set-alert-config.txt | 152 ++++++++++++++ Documentation/cxl/lib/libcxl.txt | 1 + Documentation/cxl/meson.build | 1 + cxl/builtin.h | 1 + cxl/cxl.c | 1 + cxl/lib/libcxl.c | 21 ++ cxl/lib/libcxl.sym | 12 ++ cxl/lib/private.h | 12 ++ cxl/libcxl.h | 16 ++ cxl/memdev.c | 220 ++++++++++++++++++++- 10 files changed, 436 insertions(+), 1 deletion(-) create mode 100644 Documentation/cxl/cxl-set-alert-config.txt base-commit: 1db7dfb0bd1b14baffc7c6ac44ace9046d98a00d Reviewed-by: Davidlohr Bueso