Message ID | 20221208000141.701642-1-ira.weiny@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp470769wrr; Wed, 7 Dec 2022 16:04:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kFwEtuS37uWn4gcJmuaTJG8fERpTcOsuoR97t0uvIaDfvOOfTvibCRCx6cJ7LpJE4jwOA X-Received: by 2002:a62:1855:0:b0:576:9ced:ebf7 with SMTP id 82-20020a621855000000b005769cedebf7mr22407895pfy.80.1670457854166; Wed, 07 Dec 2022 16:04:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670457854; cv=none; d=google.com; s=arc-20160816; b=vKcsXdJ4Z8hKvy6k27TVIAJWkzPGZSZBxZvjVAi/iWtUIwHOsytPGtheNdgR0D0b6T wAi25AwBc5BWV5L49m0UOQ0F//d5PAO66+UH4uAXBLc+ZFZbKwonSSCrY13WCFmQRpyE DEzl8DQAgh8k/EXRMUk33uVY0XmuWMlhoiddcfMj33Edwa0uSn/85x/EC0n018oOhDyX TVbV/Hs+SKYwErgNb/gKtyXT3sB0KwY9mmQ+1F6ADB3p9sijCseiPv5W4Ecf1XmVSkH9 ANNF/ONVXNk17BJJ/yrglcm9YUR3XyDDvIKhejidsiPmhsdifu3YpvJlGBbi9V2vvH3R KE9w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=K06zFWUkLuBPhxvmbmgb4P1EeJzvK8zg32w6qrRvdp0=; b=cGC38JYif9DGPcmgp9gEDo0xz9b2orHObtzUiSUnZBnhrQVhFwlp6AQrloBFGsZ74O 21ejU+MnuPUcaNRq8xb8tbFZBVAw3rATbc05aNMlU68ZfBcTLJXbL2lh+uDSUl82DaDk lqwX7dTdulrnup3x+amZg67ngnAO9WGY+tL6nb7prIoiyPtsku1nWFXUBbTvjbufnTdV 5UGFgLeyRjG5UuG5TGcPCXUHsdqnjLKGwo05UAnCAo56IyHxwUThuD2qh6/0XYO7Hr4L 04HxVsoH6G5pNOWOAs7LslynbUK1Yi5RXrRExbMp3vbY/ODUzrHHyzPuhN0ZLUdukCnO ioXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hijhfnAH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a170902f68b00b00188630db249si24507130plg.177.2022.12.07.16.03.52; Wed, 07 Dec 2022 16:04: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=@intel.com header.s=Intel header.b=hijhfnAH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbiLHAB4 (ORCPT <rfc822;foxyelen666@gmail.com> + 99 others); Wed, 7 Dec 2022 19:01:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiLHABu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Dec 2022 19:01:50 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4004A5BD62; Wed, 7 Dec 2022 16:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670457709; x=1701993709; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qlb/4/MOpVtK0Wz4xUZApPMqw5HrbXVQPBBo1lk3Rzk=; b=hijhfnAHWYhigHskBwlbbyT2KquvzgUHftISWZfZ6xyOcK+StetkrVfa 4Z7B3Ac8iqx5dp4z0rLrzZ5qXfUaPt6d8ZkXiSEVWvzB0oOVYxV2FlCG6 d2ENV5ItS0a5pXGN9k9n8Mk2kuF9aekd2DDNC98BeDTHQ5lCycH7d/0yu pcoOZRCDgU23U++BQmvsRguikQWzHRdOGbF4FYjgnT+ZHPlJfwtFcqalv +IqaN/3qjZosLeqkg2Bq/TU94yIzOmz8EMYZ1seQaBYlVTQNAtGawiwu2 k7a/TZLJg6ppfuLO+WrvB0IHqw+UYpbkFkaTfKBEfxdO/mn9sqYQ5Wt9i A==; X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="297391101" X-IronPort-AV: E=Sophos;i="5.96,226,1665471600"; d="scan'208";a="297391101" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2022 16:01:48 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="646799678" X-IronPort-AV: E=Sophos;i="5.96,226,1665471600"; d="scan'208";a="646799678" Received: from iweiny-mobl.amr.corp.intel.com (HELO localhost) ([10.209.25.22]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2022 16:01:43 -0800 From: ira.weiny@intel.com To: Dan Williams <dan.j.williams@intel.com> Cc: Ira Weiny <ira.weiny@intel.com>, Alison Schofield <alison.schofield@intel.com>, Vishal Verma <vishal.l.verma@intel.com>, Dave Jiang <dave.jiang@intel.com>, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cxl/uapi: Add warning on CXL command enum Date: Wed, 7 Dec 2022 16:01:41 -0800 Message-Id: <20221208000141.701642-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751602014903561969?= X-GMAIL-MSGID: =?utf-8?q?1751602014903561969?= |
Series |
cxl/uapi: Add warning on CXL command enum
|
|
Commit Message
Ira Weiny
Dec. 8, 2022, 12:01 a.m. UTC
From: Ira Weiny <ira.weiny@intel.com> 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 <dan.j.williams@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- include/uapi/linux/cxl_mem.h | 4 ++++ 1 file changed, 4 insertions(+) base-commit: acb704099642bc822ef2aed223a0b8db1f7ea76e
Comments
On 12/7/2022 5:01 PM, ira.weiny@intel.com wrote: > From: Ira Weiny <ira.weiny@intel.com> > > 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 <dan.j.williams@intel.com> > Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> > --- > 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"), \ > > base-commit: acb704099642bc822ef2aed223a0b8db1f7ea76e
On Wed, 7 Dec 2022 17:27:18 -0700 Dave Jiang <dave.jiang@intel.com> wrote: > On 12/7/2022 5:01 PM, ira.weiny@intel.com wrote: > > From: Ira Weiny <ira.weiny@intel.com> > > > > 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 <dan.j.williams@intel.com> > > Signed-off-by: Ira Weiny <ira.weiny@intel.com> > > Reviewed-by: Dave Jiang <dave.jiang@intel.com> Good to have. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > --- > > 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"), \ > > > > base-commit: acb704099642bc822ef2aed223a0b8db1f7ea76e
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"), \