From patchwork Tue Dec 27 14:52:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13082391 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 DDAF2C10F1B for ; Tue, 27 Dec 2022 14:52:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229792AbiL0OwV (ORCPT ); Tue, 27 Dec 2022 09:52:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbiL0OwU (ORCPT ); Tue, 27 Dec 2022 09:52:20 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7F0ADA9 for ; Tue, 27 Dec 2022 06:52:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672152739; x=1703688739; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=4qn4Ms2qtvaVNYwLEt2mgGd9BoWoDHUke8BWo+2QOcA=; b=IROiYwups1TwFsHvQvuIKzrWzBb9QFg7Lh6s/ibNWIc1wjkUppGYFYhc BBxU4MtttpQcDYdf8SKz5FUGr1Zy6ixy2DzvkmQhkqc8fLSWu5goBwRQU LI5i3+ESdXdmI128vPmumKs0oldnPFbVEULeobpcJTnuqr/Bv9KRgho8n TkyaGmjDc6q0qzASHjy4sQxKTtmPWVodcxB8xzTQen8mVOI32xc3HwHJl TWAKeyX79CAMZt82jzK3Drxhsl44ON++vsTBuIO96oBA56/dPFhxB3PiA qh5d3M84ptMB727T/t+yMO+n4txAamZjCdlbIWohh2vqZktA+WS36816T A==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="300398214" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="300398214" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 06:52:19 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="777175363" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="777175363" Received: from yguan1-mobl.amr.corp.intel.com (HELO localhost) ([10.212.93.223]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 06:52:18 -0800 From: Ira Weiny Date: Tue, 27 Dec 2022 06:52:09 -0800 Subject: [PATCH 1/3] cxl/mem: Fix command comment MIME-Version: 1.0 Message-Id: <20221222-cxl-misc-v1-1-9343bab16e72@intel.com> References: <20221222-cxl-misc-v1-0-9343bab16e72@intel.com> In-Reply-To: <20221222-cxl-misc-v1-0-9343bab16e72@intel.com> To: Dan Williams Cc: "Jiang, Dave" , Alison Schofield , Vishal Verma , Ben Widawsky , linux-cxl@vger.kernel.org, Ira Weiny X-Mailer: b4 0.11.0-dev-e429b X-Developer-Signature: v=1; a=ed25519-sha256; t=1672152737; l=981; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=4qn4Ms2qtvaVNYwLEt2mgGd9BoWoDHUke8BWo+2QOcA=; b=Xhsuuv+yawEVXFBujVFkGNIeQDvT6MxjSbUx81xQr4ndeMPCfNjzSqQWpW3c4SlH1pyLEKJDI97r UU8jVUHJDsftKjnGOuiIC6S/ST+s0t4AwYfAGB2lMsNLrtOmrQIo 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 some minor grammatical errors. Fix them. Signed-off-by: Ira Weiny --- include/uapi/linux/cxl_mem.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h index c71021a2a9ed..555f9140e2bc 100644 --- a/include/uapi/linux/cxl_mem.h +++ b/include/uapi/linux/cxl_mem.h @@ -11,9 +11,9 @@ /** * 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 must check the results from the QUERY + * command in order to determine the live set of commands. */ #define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands) From patchwork Tue Dec 27 14:52:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13082393 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 36AB6C46467 for ; Tue, 27 Dec 2022 14:52:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229533AbiL0OwW (ORCPT ); Tue, 27 Dec 2022 09:52:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbiL0OwV (ORCPT ); Tue, 27 Dec 2022 09:52:21 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7185B2C4 for ; Tue, 27 Dec 2022 06:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672152740; x=1703688740; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=/AnCDDXekLJWQdFDzrW3G5Aups/eA3ZFrlACCUraY1o=; b=VYDJYfzczfv+JsveFPDAZnbBItgKbtjqqSk7JYfDaW164eD94ZTu9fQz 9Me0pWc7iQ7w58XipATvrbXQyRLBeuHD1VdTrX/iTZm/LHg9EtMleSbjl aiAPtB8N8t+2oGbdtUsVYjv2JN3y0kx5RFYmkJBd4NbPUjdx6EbyI68Vp GoV6wkwN+b6etTtv6O1OBpcdonoCzKcBltK7se3vVtfqZ5oxiMvUzdX07 LZGJeMkKQOGtS6HBGUGuehGENHSFOIZBbaW9mncIRZrGXyx5ke8Akv1+6 X4+JN7fj8FHt68jOlpy5tvTyhFeVj/afl1aP3YBx8TFVIPHznQj/i0kW6 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="300398220" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="300398220" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 06:52:20 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="777175367" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="777175367" Received: from yguan1-mobl.amr.corp.intel.com (HELO localhost) ([10.212.93.223]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 06:52:19 -0800 From: Ira Weiny Date: Tue, 27 Dec 2022 06:52:10 -0800 Subject: [PATCH 2/3] cxl/mem: Remove unused CXL_CMD_FLAG_NONE define MIME-Version: 1.0 Message-Id: <20221222-cxl-misc-v1-2-9343bab16e72@intel.com> References: <20221222-cxl-misc-v1-0-9343bab16e72@intel.com> In-Reply-To: <20221222-cxl-misc-v1-0-9343bab16e72@intel.com> To: Dan Williams Cc: "Jiang, Dave" , Alison Schofield , Vishal Verma , Ben Widawsky , linux-cxl@vger.kernel.org, Ira Weiny X-Mailer: b4 0.11.0-dev-e429b X-Developer-Signature: v=1; a=ed25519-sha256; t=1672152737; l=532; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=/AnCDDXekLJWQdFDzrW3G5Aups/eA3ZFrlACCUraY1o=; b=Qp5/i84K1fuDoROd8PRzuRdEhwqu/G9Tp7CK3AGTUVbfsaKxIz4jB4lK3dg9SOIp94Df20l2IK/S 7tWNsgr2B2uW9UTDliLb+W1aTBb3BmTRjX1nDF5jAD5vtgeOsoDk 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. Signed-off-by: Ira Weiny Reviewed-by: Jonathan Cameron --- 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 Tue Dec 27 14:52:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13082392 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 0FF38C4167B for ; Tue, 27 Dec 2022 14:52:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229726AbiL0OwX (ORCPT ); Tue, 27 Dec 2022 09:52:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbiL0OwV (ORCPT ); Tue, 27 Dec 2022 09:52:21 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 336CDD6D for ; Tue, 27 Dec 2022 06:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672152741; x=1703688741; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=4TE5evIcDl4bL6+AaBU5LuBIdWPE8Ql2QBbd/s9ke04=; b=Z4GBiAMsE2tR0J35KG+0Y6jYZFj6aWUIAIMcbLMTgFUy1o4BGjYtoGQY FtjAnHc9mmRLfRNpuep8B5meFbKEc2ef8q/hxp12AQcVWEuU23oN5oRu5 gZEV9mQjBtOYh5rqo1+5JNz1wmdAWEaS6Xu/BKTp2Taqr8+vr0kt6fMUX rd79P8jq1k89fZ96RMCqSO0svh5zRRp8/z4/qGJjMsaxXjjZX7hg1xG07 itS+Fn6mZhx2GmNMjsFEuz9w1I7+m+nuy/T3d2UESR9uLDxhrxR1UagVh XvmnHbTKlGDq0Tk9wTYN1jCDwPnoDr3HCwtdIKgiKE4NlCKfHtsWpPjlN A==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="300398224" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="300398224" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 06:52:21 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="777175372" X-IronPort-AV: E=Sophos;i="5.96,278,1665471600"; d="scan'208";a="777175372" Received: from yguan1-mobl.amr.corp.intel.com (HELO localhost) ([10.212.93.223]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 06:52:20 -0800 From: Ira Weiny Date: Tue, 27 Dec 2022 06:52:11 -0800 Subject: [PATCH 3/3] cxl/uapi: Add warning on CXL command enum MIME-Version: 1.0 Message-Id: <20221222-cxl-misc-v1-3-9343bab16e72@intel.com> References: <20221222-cxl-misc-v1-0-9343bab16e72@intel.com> In-Reply-To: <20221222-cxl-misc-v1-0-9343bab16e72@intel.com> To: Dan Williams Cc: "Jiang, Dave" , Alison Schofield , Vishal Verma , Ben Widawsky , linux-cxl@vger.kernel.org, Ira Weiny X-Mailer: b4 0.11.0-dev-e429b X-Developer-Signature: v=1; a=ed25519-sha256; t=1672152737; l=1089; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=4TE5evIcDl4bL6+AaBU5LuBIdWPE8Ql2QBbd/s9ke04=; b=A/0v2qGRvvOjvq5O5cLJp/yFc+9aKD2qqfi8RtC/4DLWQqb/YPYyzoLsXYKeoOj1pJiiDEUzlcXZ aqSE4dXzC1hJCXjtNSgFPRbJrCzCxfwBo8boPWGLEt9sIzdQ5IRH 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 Signed-off-by: Ira Weiny Reviewed-by: Jonathan Cameron --- 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 555f9140e2bc..b3fd46af70f8 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"), \