From patchwork Sat Jan 28 00:09:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13119550 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 31E3EC38142 for ; Sat, 28 Jan 2023 00:10:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbjA1AK2 (ORCPT ); Fri, 27 Jan 2023 19:10:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbjA1AK1 (ORCPT ); Fri, 27 Jan 2023 19:10:27 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D54079201 for ; Fri, 27 Jan 2023 16:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674864602; x=1706400602; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=xK757HYbD5E5voYrhmr4eBRtiUEU73YoAE8Qb5jBj90=; b=FlILrfg3880hwssgT8fWwLS4g8pwXDdDrL5PU/wUXR3nGzKt3Jgp3z0X RIJ0U3F6OvZhysXeBvOGJRPxsv75+k6EREDV5Dzg+/EouD/epI1Dinq4z vlWTAPh4LkhUn8xI/56yHZtcXOo0NgmPmlucbgKQf+dgm1wjIZHnOcdSu 58jKbFqH3NMzhBWqVxjAvhW9tSdWINOVOZ+jA8dJerDoU46S8/TvfzXdc ny2Etgjsw0rMrbmC6PpWJrqSgqW+nI0EMH6ggRK7dUuY3cgca1mx8Uy6E /ikZWqZRMKx/WlF/LXDJvJXFMC2prYM+2vLyTuEbK6/+zOCumqFDcL2sh Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="389608222" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="389608222" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:46 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="656793053" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="656793053" Received: from iweiny-desk3.amr.corp.intel.com (HELO localhost) ([10.212.64.226]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:46 -0800 From: Ira Weiny Date: Fri, 27 Jan 2023 16:09:38 -0800 Subject: [PATCH v2 1/4] cxl/mem: Remove unused CXL_CMD_FLAG_NONE define MIME-Version: 1.0 Message-Id: <20221222-cxl-misc-v2-1-60403cc37257@intel.com> References: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> In-Reply-To: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> To: Dan Williams Cc: "Jiang, Dave" , Alison Schofield , Vishal Verma , Ben Widawsky , Robert Richter , Jonathan Cameron , linux-cxl@vger.kernel.org, Ira Weiny , Jonathan Cameron X-Mailer: b4 0.11.0-dev-e429b X-Developer-Signature: v=1; a=ed25519-sha256; t=1674864584; l=631; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=xK757HYbD5E5voYrhmr4eBRtiUEU73YoAE8Qb5jBj90=; b=c+EGENkTw8yi+Vf1VbTu3Uq3FWDS1g34Z92ho47u1Fz18GhGbZDXrsBVG34rEZnZMd/jn8Sy9/4J gZ8tevh3DcxJ8/EFmcFo8R/zKog+4GlCh0uXt/+8uKGZpnjRVkWh X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=brwqReAJklzu/xZ9FpSsMPSQ/qkSalbg6scP3w809Ec= Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org CXL_CMD_FLAG_NONE is not used, remove it. Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang --- Changes for v2: Pick up tag --- drivers/cxl/cxlmem.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h index ab138004f644..2d85776236dd 100644 --- a/drivers/cxl/cxlmem.h +++ b/drivers/cxl/cxlmem.h @@ -393,7 +393,6 @@ struct cxl_mem_command { struct cxl_command_info info; enum cxl_opcode opcode; u32 flags; -#define CXL_CMD_FLAG_NONE 0 #define CXL_CMD_FLAG_FORCE_ENABLE BIT(0) }; From patchwork Sat Jan 28 00:09:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13119553 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 3E3F6C38142 for ; Sat, 28 Jan 2023 00:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232119AbjA1AKh (ORCPT ); Fri, 27 Jan 2023 19:10:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231439AbjA1AKg (ORCPT ); Fri, 27 Jan 2023 19:10:36 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E460A5D9 for ; Fri, 27 Jan 2023 16:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674864615; x=1706400615; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=qMPXr5lu6JJOYJwR+zeX13hZ401ONKOyMsDw8/RU5ic=; b=WLEFLNkQ8qAJ1Sxz39/P/NtDoiw9gLvugN2mUW3BZps9EvDDLXlT4ftW vl7MDPGJGaQS9LfO9hC0ulWlr1micvxKXz76Cs4PndVMXZZJsHRBuEfO7 8YopiYOMczYHQ6rHHI4wO1nkUo+z8Naw5iO/q6YPUkKhF6fhu0PFLtNKS B+jN3L5JWj+HO6iTX+DIzcdKtM3tZilk4m8UGzG+1aSMrDQJjutqvEMa3 6Djx1cpotadTpeagIXB4pKGr8mbFb6yRL8aDBIuf+iFBgY9kdmCh4mQ+G npZEZG3pNmx9lRJOs9lQgTK3Tk2B1I8+VctV5obi7uyT1IXt8HFtzrvIj A==; X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="389608226" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="389608226" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:47 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="656793056" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="656793056" Received: from iweiny-desk3.amr.corp.intel.com (HELO localhost) ([10.212.64.226]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:47 -0800 From: Ira Weiny Date: Fri, 27 Jan 2023 16:09:39 -0800 Subject: [PATCH v2 2/4] cxl/uapi: Add warning on CXL command enum MIME-Version: 1.0 Message-Id: <20221222-cxl-misc-v2-2-60403cc37257@intel.com> References: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> In-Reply-To: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> To: Dan Williams Cc: "Jiang, Dave" , Alison Schofield , Vishal Verma , Ben Widawsky , Robert Richter , Jonathan Cameron , linux-cxl@vger.kernel.org, Ira Weiny , Jonathan Cameron X-Mailer: b4 0.11.0-dev-e429b X-Developer-Signature: v=1; a=ed25519-sha256; t=1674864584; l=1188; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=qMPXr5lu6JJOYJwR+zeX13hZ401ONKOyMsDw8/RU5ic=; b=A2r5G2QUpty6X5fZPPZiYtZtbEhMYqUPg7cfOv5obzBAuEMKUlVgM4f7YCNO6mlzDHKT71UHJKMh VN4t1h/JCmxymwa03n+F+Lrci2yehYNsHCVMqCenyAHXzmf/J15E X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=brwqReAJklzu/xZ9FpSsMPSQ/qkSalbg6scP3w809Ec= Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org The CXL command enum is exported to user space and must maintain backwards compatibility. Add comment that new defines must be added to the end of the list. Suggested-by: Dan Williams Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang --- Changes for v2: Pick up tag --- include/uapi/linux/cxl_mem.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h index c71021a2a9ed..459a3f7f764b 100644 --- a/include/uapi/linux/cxl_mem.h +++ b/include/uapi/linux/cxl_mem.h @@ -19,6 +19,10 @@ #define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands) #define CXL_MEM_SEND_COMMAND _IOWR(0xCE, 2, struct cxl_send_command) +/* + * NOTE: New defines must be added to the end of the list to preserve + * compatibility because this enum is exported to user space. + */ #define CXL_CMDS \ ___C(INVALID, "Invalid Command"), \ ___C(IDENTIFY, "Identify Command"), \ From patchwork Sat Jan 28 00:09:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13119551 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 3A41DC54EAA for ; Sat, 28 Jan 2023 00:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232019AbjA1AKi (ORCPT ); Fri, 27 Jan 2023 19:10:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231679AbjA1AKg (ORCPT ); Fri, 27 Jan 2023 19:10:36 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5BE62692 for ; Fri, 27 Jan 2023 16:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674864626; x=1706400626; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=8NyFhgbhQG1X8QwaYEv9c6EeEgpqjuu8OsFmhBTWvuo=; b=XjTPAEQ5lJv5h8ZwKRYgiZE6pM8T9EW8x0TIiMEua1b0p0n5fIlrSJvG amTzyQ/PB/KxurUq8K3cWQsUYhbnzIEJ3POJtuFiADG929A+Kz7+odzm9 kTHUStudn1seEIrJOU+oK4Fo0KQcJqPHRdy1abpZu/LPStQmCHfPoUk7V TH4qP/+8S482THO5tBtbB+pAdZszn9Pk0XDbb0G46wIPPbPPmeGH1FGJ3 sJ5wCPpVGVYZQivEU/+Bwmq2P7X4vo3IfNrmBlSXck8pXwMLMSCcKfX7m nj56u5/G/gBuitX3Sdw3gYw39g0cIlMfbz7Wi2dhjR/ZHPsXfOjR8Ei0l A==; X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="389608231" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="389608231" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:49 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="656793061" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="656793061" Received: from iweiny-desk3.amr.corp.intel.com (HELO localhost) ([10.212.64.226]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:48 -0800 From: Ira Weiny Date: Fri, 27 Jan 2023 16:09:40 -0800 Subject: [PATCH v2 3/4] cxl/uapi: Only return valid commands from cxl_query_cmd() MIME-Version: 1.0 Message-Id: <20221222-cxl-misc-v2-3-60403cc37257@intel.com> References: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> In-Reply-To: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> To: Dan Williams Cc: "Jiang, Dave" , Alison Schofield , Vishal Verma , Ben Widawsky , Robert Richter , Jonathan Cameron , linux-cxl@vger.kernel.org, Ira Weiny , Jonathan Cameron X-Mailer: b4 0.11.0-dev-e429b X-Developer-Signature: v=1; a=ed25519-sha256; t=1674864584; l=2871; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=8NyFhgbhQG1X8QwaYEv9c6EeEgpqjuu8OsFmhBTWvuo=; b=mAn1Q5XkO+LtkjKSz0r/MzkWDOsLkIyzRE/0HVbieddzI5J7y5rkK84z/N52zXf+kRi8u8zF7uWC OjvpVqZKBRl7xjdDywI5GxpCrD6vvlXCoKvskOgU05XogAzDeEL9 X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=brwqReAJklzu/xZ9FpSsMPSQ/qkSalbg6scP3w809Ec= Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org It was pointed out that commands not supported by the device or excluded by the kernel were being returned in cxl_query_cmd().[1] While libcxl correctly handles failing commands, it is more efficient to not issue an invalid command in the first place. Exclude both kernel exclusive and disabled commands from the list of commands returned by cxl_query_cmd(). [1] https://lore.kernel.org/all/63b4ec4e37cc1_5178e2941d@dwillia2-xfh.jf.intel.com.notmuch/ Suggested-by: Dan Williams Signed-off-by: Ira Weiny --- Changes for v2: New patch --- drivers/cxl/core/mbox.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index b03fba212799..a1618b7f01e5 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -326,12 +326,27 @@ static int cxl_to_mem_cmd_raw(struct cxl_mem_command *mem_cmd, return 0; } +/* Return 0 if the cmd id is available for userspace */ +static int cxl_cmd_id_user(__u32 id, struct cxl_dev_state *cxlds) +{ + /* Check that the command is enabled for hardware */ + if (!test_bit(id, cxlds->enabled_cmds)) + return -ENOTTY; + + /* Check that the command is not claimed for exclusive kernel use */ + if (test_bit(id, cxlds->exclusive_cmds)) + return -EBUSY; + + return 0; +} + static int cxl_to_mem_cmd(struct cxl_mem_command *mem_cmd, const struct cxl_send_command *send_cmd, struct cxl_dev_state *cxlds) { struct cxl_mem_command *c = &cxl_mem_commands[send_cmd->id]; const struct cxl_command_info *info = &c->info; + int rc; if (send_cmd->flags & ~CXL_MEM_COMMAND_FLAG_MASK) return -EINVAL; @@ -342,13 +357,9 @@ static int cxl_to_mem_cmd(struct cxl_mem_command *mem_cmd, if (send_cmd->in.rsvd || send_cmd->out.rsvd) return -EINVAL; - /* Check that the command is enabled for hardware */ - if (!test_bit(info->id, cxlds->enabled_cmds)) - return -ENOTTY; - - /* Check that the command is not claimed for exclusive kernel use */ - if (test_bit(info->id, cxlds->exclusive_cmds)) - return -EBUSY; + rc = cxl_cmd_id_user(info->id, cxlds); + if (rc) + return rc; /* Check the input buffer is the expected size */ if ((info->size_in != CXL_VARIABLE_PAYLOAD) && @@ -446,9 +457,15 @@ int cxl_query_cmd(struct cxl_memdev *cxlmd, */ cxl_for_each_cmd(cmd) { const struct cxl_command_info *info = &cmd->info; + struct cxl_dev_state *cxlds = cxlmd->cxlds; + int rc; - if (copy_to_user(&q->commands[j++], info, sizeof(*info))) - return -EFAULT; + rc = cxl_cmd_id_user(info->id, cxlds); + if (!rc) { + if (copy_to_user(&q->commands[j++], info, + sizeof(*info))) + return -EFAULT; + } if (j == n_commands) break; From patchwork Sat Jan 28 00:09:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13119552 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 DDABFC61DA7 for ; Sat, 28 Jan 2023 00:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231679AbjA1AKi (ORCPT ); Fri, 27 Jan 2023 19:10:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbjA1AKg (ORCPT ); Fri, 27 Jan 2023 19:10:36 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1901961B7 for ; Fri, 27 Jan 2023 16:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674864627; x=1706400627; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=eR6Sb3Krrjwo+AFS/sYpWntPZQmMvUise5SzB9GKdCE=; b=dG+qfGp1HhvKjQfXwKlOZLjd7mZoLXNAm1FSYaKe4ih5VlJ8Pmffbdd9 OsKHFFIJ1OL/AWl2lAFGqXwxBx/9ojO6d+TmevhtRF+xzMRdKZu/LBRCB cv6h7dXEbCcTZerP18vzCQ5CDH8fuUhOXDqBMH9IcLv8wChk7Je/17Pwn Wx5NdpShF5QDaX7qaPBxhefi9lhlVPjiJiDQEknhpvefsGBvddbuBmgHh dE/QStTSskIvRZVeU7kw8S37+6y43Nf58ukkVVRUAxHQJvU99pFxlq+OO k4GpQoRM3ZvnciLRhZW2Ue5jkxvemKLRtdpfnVeBIcoyaRLS+8pnTq+ov A==; X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="389608235" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="389608235" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:50 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="656793065" X-IronPort-AV: E=Sophos;i="5.97,252,1669104000"; d="scan'208";a="656793065" Received: from iweiny-desk3.amr.corp.intel.com (HELO localhost) ([10.212.64.226]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 16:09:49 -0800 From: Ira Weiny Date: Fri, 27 Jan 2023 16:09:41 -0800 Subject: [PATCH v2 4/4] cxl/mem: Fix UAPI command comment MIME-Version: 1.0 Message-Id: <20221222-cxl-misc-v2-4-60403cc37257@intel.com> References: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> In-Reply-To: <20221222-cxl-misc-v2-0-60403cc37257@intel.com> To: Dan Williams Cc: "Jiang, Dave" , Alison Schofield , Vishal Verma , Ben Widawsky , Robert Richter , Jonathan Cameron , linux-cxl@vger.kernel.org, Ira Weiny , Jonathan Cameron X-Mailer: b4 0.11.0-dev-e429b X-Developer-Signature: v=1; a=ed25519-sha256; t=1674864584; l=1448; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=eR6Sb3Krrjwo+AFS/sYpWntPZQmMvUise5SzB9GKdCE=; b=/fNvIpkzxDz36Wtuwe4qldbKXaeeETee4DajrlYe8ardzP29LPZ57mvTb4SinrHDqZ1WI4hj80Op xojAsWJXAVoVPzvrROjsbupBYY3zVKOFHwQOMCS0OSUGpz2fImhq X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=brwqReAJklzu/xZ9FpSsMPSQ/qkSalbg6scP3w809Ec= Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org The command comment had grammatical errors. In an attempt to fix those it was noted that the comment and the query command were not in sync. Now that the query command accounts for excluded and device unsupported commands. Update the kdoc and fix the grammatical errors. [1] https://lore.kernel.org/all/63b4ec4e37cc1_5178e2941d@dwillia2-xfh.jf.intel.com.notmuch/ Signed-off-by: Ira Weiny --- Changes for v2: Add patch to fix the query command and adjust the comment for that support. --- include/uapi/linux/cxl_mem.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h index 459a3f7f764b..c58101437ea7 100644 --- a/include/uapi/linux/cxl_mem.h +++ b/include/uapi/linux/cxl_mem.h @@ -11,9 +11,10 @@ /** * DOC: UAPI * - * Not all of all commands that the driver supports are always available for use - * by userspace. Userspace must check the results from the QUERY command in - * order to determine the live set of commands. + * Not all of the commands that the driver supports are available for use by + * userspace at all times. Userspace can check the result of the QUERY command + * to determine the live set of commands. Alternatively, it can issue the + * command and check for failure. */ #define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands)