From patchwork Wed Oct 16 04:59:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravis OpenSrc X-Patchwork-Id: 13837721 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2063.outbound.protection.outlook.com [40.107.95.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F2EC18A95E for ; Wed, 16 Oct 2024 05:00:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054806; cv=fail; b=K66MK56VtI68ZEhl6ikOrmmjkkaKYV9jfUw2uJOT14YFexLGHcbtZi583GuWBkztOfgrw0wmSTFYZGIbvQ1hRqmSoXX3wvngg+PxqLUK6vsD81HnZY5GcPRKio66FcjJwqg3T+OkFB3+p2BAHL4dNExRRtq6tM5JJgBSAM7q7bY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054806; c=relaxed/simple; bh=YWZaz8HUJ7zNFnEPrOgcbdWU2SjlwKpb4inu5VyeJNo=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=gl9tHk9DbvaZAlZ3enOanXYzjE4CI/y810bZKALHNzVFsogTMC2wxVAxRsXP2Wv7rguJ44UCxCB31x6h66xVJdi/cT4GzLoQwnQxMu99AplzXpzZ52kKgjSuokb3haBV4tCE6+HmyJV0BPLscWvwN6yYRJSYb9CcacWGWEiH5iA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com; spf=pass smtp.mailfrom=micron.com; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b=MhL1pxcH; arc=fail smtp.client-ip=40.107.95.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=micron.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b="MhL1pxcH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=q2BNLy3Tys/WnV6hGSWHzcQsUqT4RsakSdiY/xqljWp1vmOIE/O5j57V6cQ+nlVaw98vP8ZyiBI2ULa5WvoEJRrzWFQpqFgMd3zxvXb62K6cCbbekFJZ+QbZ+jqH4Mq9DphGt9ruEMyAtWI9hu34ggMZkm3fWBSkCzehIuLsgHPRTp+UsiUVAirH3gy1Ss/3dBWrMla+HpJEMPLKftAzK+SIwU3unTffNpdAZ4cOCq9aJMiEs2PZHZoQO43bwXo8VqsDQZkFPaGgYAepddqb4fG0aUow9aexhY3Ii81dUVk8izBToqV8C3ZVzc7FWmM4T/zCAJppqKnczaHLAvXmQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GnqzN35w1JAXkYGkRioMhmLqElHTtYzdKgcq/Yeosbc=; b=rWnVCp1jBKtTWG84LtfiIPArWjNzt7bZVJlyvTUgEjBdnzQb+YjuSULfZA1RjsoQApU1k/8QVqZoBEzl51hQ202E1wshXpIYdzuiCmZm+UdKhogsDmflWo97J2E5+6PtkbYGvK0dJQlPCrZ7ACVMfHMGXUML0Nmu4g4EHQjEbfwnO9nhovFm+D3K4P6CRzSsIvAdVtFhnL4+C75Wl0b108QAgBwARZnN61S1ORiOIwFjQBHSpvtwFSocuADZkxgyLHXjG74Hnuncr1PfHSWdI6SFWZO55zJUBBSQDMPYNf4lYDHVQzN4P5M+Pma+J4UuAK6xNeevto+rFpOMFalsdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 137.201.242.130) smtp.rcpttodomain=jagalactic.com smtp.mailfrom=micron.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=micron.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=micron.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GnqzN35w1JAXkYGkRioMhmLqElHTtYzdKgcq/Yeosbc=; b=MhL1pxcH6MMG0cQlGWR7rJJPJazvtzTNo8msmgN/Cgkj0CiIlnBmavLeinBAprzb15BUveExzHc4pGm/Pzyk4PHEMXVsuzCFtc98Ubz+CidF6HxghQImYZoyym7QZ4kl3pQ6FERVXn3nQKSftQZSj6Tqzp0pgXd70FOdBvy/VGQUMS810dy5g2adlt6ZONcZ46ntJ2A+Dk+utb0rajJF7UV/iMHeIf8+zsCa6bwG/0TmWBJvwbMWcErXhFWelqmzLrtDrrDgNvpocrfZP27iyjsb654C782A90UU1+llxr4ovQ8+2Fxff7DAawjdPLYEY+5nBHJDVXrQaxujgY9W1A== Received: from CH0P223CA0012.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:116::29) by SN4PR0801MB7725.namprd08.prod.outlook.com (2603:10b6:806:200::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 04:59:58 +0000 Received: from CH3PEPF0000000A.namprd04.prod.outlook.com (2603:10b6:610:116:cafe::10) by CH0P223CA0012.outlook.office365.com (2603:10b6:610:116::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27 via Frontend Transport; Wed, 16 Oct 2024 04:59:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 137.201.242.130) smtp.mailfrom=micron.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=micron.com; Received-SPF: Pass (protection.outlook.com: domain of micron.com designates 137.201.242.130 as permitted sender) receiver=protection.outlook.com; client-ip=137.201.242.130; helo=mail.micron.com; pr=C Received: from mail.micron.com (137.201.242.130) by CH3PEPF0000000A.mail.protection.outlook.com (10.167.244.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Wed, 16 Oct 2024 04:59:58 +0000 Received: from BOW17EX19B.micron.com (137.201.21.219) by BOW17EX19B.micron.com (137.201.21.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 15 Oct 2024 22:59:56 -0600 Received: from BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3]) by BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3%6]) with mapi id 15.02.1544.011; Tue, 15 Oct 2024 22:59:56 -0600 From: Ravis OpenSrc To: "linux-cxl@vger.kernel.org" , "dan.j.williams@intel.com" , "dave.jiang@intel.com" , "jonathan.cameron@huawei.com" CC: Srinivasulu Opensrc , "john@jagalactic.com" , Ajay Joshi Subject: [RFC PATCH v2 1/4] cxl: Enable mailbox ops with background only if request abort operation is supported. Thread-Topic: [RFC PATCH v2 1/4] cxl: Enable mailbox ops with background only if request abort operation is supported. Thread-Index: AQHbH4g+o4Yi/F6bYEWlyf9LmgVvoA== Date: Wed, 16 Oct 2024 04:59:56 +0000 Message-ID: <6e6cc093f70442e792c05e779393442a@micron.com> References: <20241015205633.127333-1-ravis.opensrc@micron.com>,<20241015205633.127333-2-ravis.opensrc@micron.com> In-Reply-To: <20241015205633.127333-2-ravis.opensrc@micron.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mt-whitelisted: matched Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF0000000A:EE_|SN4PR0801MB7725:EE_ X-MS-Office365-Filtering-Correlation-Id: 03a8f530-4ed0-49c8-61fe-08dced9f624b X-EXT-ByPass: 1 X-MT-RULE-Whitelisted: Triggered X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?/r5bfZDXcwLVwpeBCh8vjiyJbG?= =?iso-8859-1?q?CsY6YeMwa2SR1SMvqQFG2OGcF16W9eJ+AMipXNwtKf7j3QBQYlJmd384Kgfh?= =?iso-8859-1?q?76slHlUCndXx963yJSsxnuSXviocM+V7bQYLElhGcosS93OLyx7tF8KUcZ6M?= =?iso-8859-1?q?Cjck/8jpF4/ZjnhVJ4mNNJ2nM9jBDgO3KoAxfHjLdmq5Wycntz00M93FIo5s?= =?iso-8859-1?q?poJSZYn1G/MWRUyzUf2dN+PoxQCu4l9FKWjCZuH0EIpXXBQrwc3FGZloJAWp?= =?iso-8859-1?q?Ol8ZqnCOv9RlhYiFez3YmUHeJJ5ifd1cvK+iZmCHgvGUIfdlmH5grK7JSNnZ?= =?iso-8859-1?q?4mRBp/hp6/RNL+OUZWPNyKnPGayiLxZZR/s3QSQl9IIWPu8DI/CukghOJW/+?= =?iso-8859-1?q?QyYboWX0s8TeJbAd6ieckosTH1XB9ioVUlX5gdcIow1cwfsuI9e1vGY8uT5r?= =?iso-8859-1?q?4ARcFyfyq5pHlqK+6UYVnOTxsrgTF3hNBweHY5QXC+p+c7kC40hJnx51zTGR?= =?iso-8859-1?q?s+D7bgXhkoZDLdDkP87PXThQgrJPqBx9FaXRtALeUOP00RjUeet3zztymp/z?= =?iso-8859-1?q?06jpwixiFh2od434EvQrxFAS/mdQWfPjAfAB7eI+lpbJ+6yacGKmkWmOeaE4?= =?iso-8859-1?q?Y7upbJycruR/TjZIIMvooWHRnGsu/Q5WAjQ+PjwPIHLGx0pWgIKE92aHmQEa?= =?iso-8859-1?q?w6/DzUUCEeikbFGhl26em4nOJTCT0lWNKXRdHSQSkff7GpsknOxK5Epp7o9i?= =?iso-8859-1?q?MdB5VMw2wUC+nds/RjeOq5Dq1mZpykrEWzcCOgk44jK8U5ccrWghUEibp/1T?= =?iso-8859-1?q?uqa+m8TCRS5LSwafKUjXObj0dMxu9IJz8ale2bhnmMzaJmleIOBw/a345b5/?= =?iso-8859-1?q?So88yRcki/LsRnz1KBDoJsCUYEFHkLJmOVkAWWS8IpVjkYynEoKt4hkuv6bp?= =?iso-8859-1?q?i1WUzGonHOJeAlPqj739u8YRs9si0a0CF1u4Sg/Mdyuc77RxcZM0njl6mUAv?= =?iso-8859-1?q?UBxmiVz3e4MCCgifh0fnToXA0qDlwBQTOTyOSZpKmddUJWMjqsipxia9u3PB?= =?iso-8859-1?q?wccoPSMArnaXqJ3+aa0F8IkYHlFS9YKFZtGdCgEaemvpnMk967IsZyYieZXw?= =?iso-8859-1?q?F6ixXJLMWjVtMVISPOpIw5yGHH+cnD7exLOJ286uu6TkD392fBVZ22gHAwOI?= =?iso-8859-1?q?xG/SweciJKqiayACocHsJfgDzYnvp9nYhKkI0L0e72ZhEsYo1xNJiglxGuw0?= =?iso-8859-1?q?JKFuH3XKK1FIS3KdESmGsxW3Cwwll6HXwasiJVn5Y8e/I7FybNagRN6oXGPr?= =?iso-8859-1?q?Cm8DHtvG8IdFysDZ0of9hizyq1WAEUu99GxhRJaBLWpsBtgzwVgR/iCK69oR?= =?iso-8859-1?q?Quy1iPrKy8KIhzppvjJcZ++IJXxTS/UGOssILJtgSTbJqvgRd9ibF3qd76Xj?= =?iso-8859-1?q?IW?= X-Forefront-Antispam-Report: CIP:137.201.242.130;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.micron.com;PTR:masquerade.micron.com;CAT:NONE;SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 04:59:58.3051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03a8f530-4ed0-49c8-61fe-08dced9f624b X-MS-Exchange-CrossTenant-Id: f38a5ecd-2813-4862-b11b-ac1d563c806f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f38a5ecd-2813-4862-b11b-ac1d563c806f;Ip=[137.201.242.130];Helo=[mail.micron.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF0000000A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0801MB7725 Enabling mailbox commands only if background operation and request abort cancellation are both supported. This check is to allow user space commands to initiate background commands responsibly while complying with any default background timeout implemented in kernel. Link: https://lore.kernel.org/linux-cxl/66035c2e8ba17_770232948b@dwillia2-xfh.jf.intel.com.notmuch/ Suggested-by: Dan Williams Signed-off-by: Ajay Joshi Signed-off-by: Ravi Shankar ---  drivers/cxl/core/mbox.c | 12 ++++++++++--  drivers/cxl/cxlmem.h    | 16 ++++++++++++++++  2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index 5175138c4fb7..8c0144913b9e 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -733,12 +733,20 @@ static void cxl_walk_cel(struct cxl_memdev_state *mds, size_t size, u8 *cel)            for (i = 0; i < cel_entries; i++) {                  u16 opcode = le16_to_cpu(cel_entry[i].opcode); +               u16 effect = le16_to_cpu(cel_entry[i].effect);                  struct cxl_mem_command *cmd = cxl_mem_find_command(opcode);                  int enabled = 0;                    if (cmd) { -                       set_bit(cmd->info.id, mds->enabled_cmds); -                       enabled++; +                       /* +                        * For background operation commands, enable only if +                        * Request abort background operation is supported. +                        */ +                       if (!(effect & CXL_CEL_FLAG_BACKGROUND_OPERATION) || +                          (effect & CXL_CEL_FLAG_REQ_ABORT_BACKGROUND_SUPPORTED)) { +                               set_bit(cmd->info.id, mds->enabled_cmds); +                               enabled++; +                       }                  }                    if (cxl_is_poison_command(opcode)) { diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h index 2a25d1957ddb..d8c0894797ac 100644 --- a/drivers/cxl/cxlmem.h +++ b/drivers/cxl/cxlmem.h @@ -579,6 +579,22 @@ struct cxl_cel_entry {          __le16 effect;  } __packed;   +/* + * CEL Entry Effects + * CXL rev 3.1 Section 8.2.9.5.2.1; Table 8-75 + */ +#define        CXL_CEL_FLAG_CFG_CHANGE_AFTER_RESET BIT(0) +#define        CXL_CEL_FLAG_CFG_CHANGE_IMMEDIATE BIT(1) +#define        CXL_CEL_FLAG_DATA_CHANGE_IMMEDIATE BIT(2) +#define        CXL_CEL_FLAG_POLICY_CHANGE_IMMEDIATE BIT(3) +#define        CXL_CEL_FLAG_LOG_CHANGE_IMMEDIATE BIT(4) +#define        CXL_CEL_FLAG_SECURITY_CHANGE BIT(5) +#define        CXL_CEL_FLAG_BACKGROUND_OPERATION BIT(6) +#define        CXL_CEL_FLAG_SECONDARY_MAILBOX_SUPPORTED BIT(7) +#define        CXL_CEL_FLAG_REQ_ABORT_BACKGROUND_SUPPORTED BIT(8) +#define        CXL_CEL_FLAG_CFG_CHANGE_AFTER_CONV_RESET BIT(10) +#define        CXL_CEL_FLAG_CFG_CHANGE_AFTER_CXL_RESET BIT(11) +  struct cxl_mbox_get_log {          uuid_t uuid;          __le32 offset; From patchwork Wed Oct 16 04:59:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravis OpenSrc X-Patchwork-Id: 13837722 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2082.outbound.protection.outlook.com [40.107.237.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43FC818A952 for ; Wed, 16 Oct 2024 05:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054807; cv=fail; b=H8DXMbRoSG1hwqIIS2SYe47hYkq6EbC16BsTc0DM9kDaQjIwaSgg1B9+QOP+4ocukTkNnQW9vVahRLf2GyKKlp0rMH8ohzrmIn79v+X/7dyRmVlYha67KEYO5Sat1We+kAJCdqBCeGci79UayVwehAv8cTmNw6MQjdnFQ3enOzs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054807; c=relaxed/simple; bh=fl5VuP1t8TDwTkFqLSciaGdjCxri2p6Odj6TMVBkQxs=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=jvLTi8Lopz4oHm0rzA8oNopz0nqjs7ELMY1wrRdoLg6FldZDaENNPTRllHF0I86pjOTMoDVjqwa5tLWI+KGg3l4X1scWirIi4Vm6wv/QrrgSuVHG0stVFfInn8pHuFecagnyPNqQsJaXGLbHuxigbkkFtopCgrtdtt9WXU9uk5g= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com; spf=pass smtp.mailfrom=micron.com; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b=OY8xfMHl; arc=fail smtp.client-ip=40.107.237.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=micron.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b="OY8xfMHl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OEyPHu5opMWn7PZK192rCdoFjIDZGPRgMeUBiqNBzr4wsbSVa+rHicWxi+Sin/Ud0QNz281EVAti+XvE/bQVIQrsjBl5VBwcTPUwgTkgxYLIuvw0aHjxzX1xgsvVy3Cyqt6EneXOcc9JfFSjFaa4S+W/8vK5pvz2vw0PE6CIxRnLnWrfOAwz63vO/iMx/fbSUa6G/wNTtBHc1LhwDWmtme4GG+hQab7+KVcxzKqKu1hpeb+phV5FA0Q46WnQFoNKu2peIvZbfR42y86mwDf5cb11qMrnBk9/N5/LxncIMsfAEpHnhKaQ4evxTBSUlEpZ2rknL2rjUdiVvPSNsKhKbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M+tjctFtODAPpu8fwOFTKLTAdBT/wOhOnS29UylBwXw=; b=Lh6BPZdnCQPi6OoewpRB1u6Zj8fW9QWSdzD6q4cK5hgNnpH2RLc9efY6CvE+YAkB4xsAuKz0fzdSQfoA5CQyNUstzT9jo7aIttD+X+d0DO7R+qZXVm+3+9v2NGV1ZDACLokxhJlM931PeFJ3RrpKyES/PPjpcHU7x5v/dp248YHoeU/xjf/IvQEgYQwhNnxI1qgSuy8+wtWqzGoGZ8BNGfx2vomDlP2x03NKzd9EZtaaERdXHfbe4HGlqOBTaiaiLbHW5fw+ptI3EhPH569i+naWCE6M4OV+KYZImWGvnWTkNdfv+NQTt41k2esYMr1edCkJkfbSJgRw31hA15eMfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 137.201.242.130) smtp.rcpttodomain=jagalactic.com smtp.mailfrom=micron.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=micron.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=micron.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M+tjctFtODAPpu8fwOFTKLTAdBT/wOhOnS29UylBwXw=; b=OY8xfMHlTMuuVBQM1ssqHHHiFc4tK0X6hYcY+IbGrYN7uDdfux2Y1LE+L7S0+Mf5Rkz+xvaopyDgXWp20zHdUoshcu2vtdJJzF25xIvma5Vf3mIrr9+z2XyuSTIwIW1QyMDQp/QFeWAfujaGBSPqfRGbEHbNBHezMORrPupKopnHkavbQ3+ZHqgrsDzkpyTDDwFqWgg9Z20wGDHFRns2LD4pTC84rVM6HuYUnjh1VMxPz9gtdrssNBQqBJ9waHw//PxtFadzxu8EZ5D9Ed3inTCT4viynyf1JijHOfB+gm7ierHOch6/cJt7Os5Ol0BPNS6oHXDp5LTKTYRWsfVB+g== Received: from SN4PR0501CA0116.namprd05.prod.outlook.com (2603:10b6:803:42::33) by CO1PR08MB7224.namprd08.prod.outlook.com (2603:10b6:303:fb::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 05:00:00 +0000 Received: from SA2PEPF00001506.namprd04.prod.outlook.com (2603:10b6:803:42:cafe::59) by SN4PR0501CA0116.outlook.office365.com (2603:10b6:803:42::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.12 via Frontend Transport; Wed, 16 Oct 2024 05:00:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 137.201.242.130) smtp.mailfrom=micron.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=micron.com; Received-SPF: Pass (protection.outlook.com: domain of micron.com designates 137.201.242.130 as permitted sender) receiver=protection.outlook.com; client-ip=137.201.242.130; helo=mail.micron.com; pr=C Received: from mail.micron.com (137.201.242.130) by SA2PEPF00001506.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Wed, 16 Oct 2024 04:59:59 +0000 Received: from BOW17EX19B.micron.com (137.201.21.219) by BOW17EX19A.micron.com (137.201.21.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 15 Oct 2024 22:59:58 -0600 Received: from BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3]) by BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3%6]) with mapi id 15.02.1544.011; Tue, 15 Oct 2024 22:59:58 -0600 From: Ravis OpenSrc To: "linux-cxl@vger.kernel.org" , "dan.j.williams@intel.com" , "dave.jiang@intel.com" , "jonathan.cameron@huawei.com" CC: Srinivasulu Opensrc , "john@jagalactic.com" , Ajay Joshi Subject: [RFC PATCH v2 2/4] cxl: Add default timeout for bg mailbox commands Thread-Topic: [RFC PATCH v2 2/4] cxl: Add default timeout for bg mailbox commands Thread-Index: AQHbH4g/djwl0+QCQUi1njK/EXQOVA== Date: Wed, 16 Oct 2024 04:59:58 +0000 Message-ID: <913b851a25344bb1832ddc902eb0aa5f@micron.com> References: <20241015205633.127333-1-ravis.opensrc@micron.com>,<20241015205633.127333-3-ravis.opensrc@micron.com> In-Reply-To: <20241015205633.127333-3-ravis.opensrc@micron.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mt-whitelisted: matched Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001506:EE_|CO1PR08MB7224:EE_ X-MS-Office365-Filtering-Correlation-Id: 071b215e-6a71-4cbc-4b89-08dced9f634b X-EXT-ByPass: 1 X-MT-RULE-Whitelisted: Triggered X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?Xr9mEYqeaNeQNKwUfy/CLj7HYd?= =?iso-8859-1?q?9bwEG6ioiKGHMnHRmMpUXtQFgLDHKZl0FgzUTMIMWBgHobUU1U8NOe18tG+P?= =?iso-8859-1?q?gP5oiyHPikMO/Yy5eRlr8E/BjBSYI4UBmrwVKjSixF2lfwhULOFgYtg3ZChR?= =?iso-8859-1?q?NMfOiofeGipmd/hfxxl7ZxzHAYD4FnrHXlGERVTlGtHvzPg2UDePz9LYkrpF?= =?iso-8859-1?q?TfsctDjcCpgiOnVQ57li7HvoF+OkEudX19I3GQrorXSeIkYjaKk/jCsM9bXZ?= =?iso-8859-1?q?qSZEyNpMHv7IOmmDgZaeOisVYr17IDRinyanrV5R100pY4dtwKyT44oruwW0?= =?iso-8859-1?q?QCcTEC8hVy1AvW6etYfUdPdAHtAfHPuBBYeDBQY5QNQu08w84t+gOkWAGl3O?= =?iso-8859-1?q?OO2fk66kplBM/RfJZBhgE7u7r3XWDivwdYyNDF65afVahdQ7ooOEG+7TXeyd?= =?iso-8859-1?q?rucyChAeOplc6rsZmWHQ4RhSGX1JhVv55xfcK31s4gGt5oE0NuUGAYDdUdCk?= =?iso-8859-1?q?IQeWTsu3zbcNHgsgA4PMKKUibcwV+rF9Hpx4p+oXe1IwJk+jSmoZQ4opXZ3S?= =?iso-8859-1?q?Kc/zxgmMffRcl7B7Bhq63iWS2GXdZ8gTrPNXVMztQ2+a6lu/W+ie9WMnJ9cF?= =?iso-8859-1?q?Q3fj2le56FNoiman2mKVDXtNZo579u0lcF1bM7iF1DgDEjB4olwiDNywxbFa?= =?iso-8859-1?q?ahBqku9oPnrYswsUSABDawID3lemvXjlDXf0Bqhm2zAEFvxXnkb4dws5DyOR?= =?iso-8859-1?q?iAYk5TiyaYcAJKmK6XbLfuIhxfFnFycLqM6VR3Szdh/FISspcu3Gpp6q4X1J?= =?iso-8859-1?q?ForYog+6fJ/+vlKHN2CUqNL9tp7jLjAmb0blJsYM1ZYQ0N0OCPeW/Yn4iW68?= =?iso-8859-1?q?QxX5clGmQ/NwOP6kGeCoAkM11YvtBiyCeG/6lONH0UYduEW8lEvkQgK+3nnh?= =?iso-8859-1?q?+5hSxVcjLbgl1ZKMXTEneg80gtZ5Seyo57WYxiH+604AcZil4AmcMvN8TxkK?= =?iso-8859-1?q?lEQ75gHvjJ/tM7xBZxY6r8eKIhuNeOpAB4mO+Rgtv2FHXv6dp8EvEiWbBw3m?= =?iso-8859-1?q?Xy78jG7ijhy05wJhE+C54twrLxN7QmdAgY93XVPlMlInqbgEiAM+EaWKyCw3?= =?iso-8859-1?q?FoVopJ/GkveLhqBBTG4XSbwC2W/ZFzY0VMWLsAWp4bpHswHYZvoi0gaG6LTJ?= =?iso-8859-1?q?yYA3s3v7r2tksynTWJjpUVJSkZe+bblxSAOky0arVFYP56diOMWz8nll4nlU?= =?iso-8859-1?q?26XOASwCoS44qsCpwvpwKWJazp8dylUhMm4y4tfByOHr7wuO3gvT743Panvn?= =?iso-8859-1?q?j+eW3QQB3rNamzKZACOU8zKSoWEs8WDuymgjCVMyXquIRfXaVBlZXE0yEDyo?= =?iso-8859-1?q?cCLiUk2JAh8BGwj34TozGJzHEyz6jxrb+OIRqmirb3/XF6Zd02oHMNlXTqjb?= =?iso-8859-1?q?e8?= X-Forefront-Antispam-Report: CIP:137.201.242.130;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.micron.com;PTR:masquerade.micron.com;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 04:59:59.9979 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 071b215e-6a71-4cbc-4b89-08dced9f634b X-MS-Exchange-CrossTenant-Id: f38a5ecd-2813-4862-b11b-ac1d563c806f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f38a5ecd-2813-4862-b11b-ac1d563c806f;Ip=[137.201.242.130];Helo=[mail.micron.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001506.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR08MB7224 Allows 5s wait when no timeout parameter is explicitly mentioned. It is useful for mailbox commands to be executed in background when initiated from userspace. Link: https://lore.kernel.org/linux-mm/20240215123410.00003b8c@Huawei.com/T/ Signed-off-by: Ajay Joshi Signed-off-by: Ravi Shankar Signed-off-by: Srinivasulu Thanneeru ---  drivers/cxl/pci.c | 13 +++++++++++++  1 file changed, 13 insertions(+) diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 188412d45e0d..d5d6142f6aa3 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -41,6 +41,10 @@  /* CXL 2.0 - 8.2.8.4 */  #define CXL_MAILBOX_TIMEOUT_MS (2 * HZ)   +/* Default timeout for background operations */ +#define CXL_BG_POLL_CNT                        5 +#define CXL_BG_POLL_INTERVAL_MS                1000 +  /*   * CXL 2.0 ECN "Add Mailbox Ready Time" defines a capability field to   * dictate how long to wait for the mailbox to become ready. The new @@ -317,6 +321,15 @@ static int __cxl_pci_mbox_send_cmd(struct cxl_mailbox *cxl_mbox,                  dev_dbg(dev, "Mailbox background operation (0x%04x) started\n",                          mbox_cmd->opcode);   +               /* +                * Add a default timeout of 5 seconds when background operation +                * starts but no timeout is specified. +                */ +               if (!mbox_cmd->poll_interval_ms) { +                       mbox_cmd->poll_interval_ms = CXL_BG_POLL_INTERVAL_MS; +                       mbox_cmd->poll_count = CXL_BG_POLL_CNT; +               } +                  timeout = mbox_cmd->poll_interval_ms;                  for (i = 0; i < mbox_cmd->poll_count; i++) {                          if (rcuwait_wait_event_timeout(&cxl_mbox->mbox_wait, From patchwork Wed Oct 16 05:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravis OpenSrc X-Patchwork-Id: 13837723 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2055.outbound.protection.outlook.com [40.107.92.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F04514EC47 for ; Wed, 16 Oct 2024 05:00:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054810; cv=fail; b=h2Bc/6lbQivO2+XB/Kwtc2wYIYAqGL+4GZdLBzMA33FpT5+NTEeGYErMfZfiHoLygVEFlsRuJKHt7IYrEB2hg1N5t7Cx3EkMhY0W+ourcvL/ikk9hiOz/Z1rYWZqDm91AjjLmp0y7WIkhATBUEFAFjY4Uuh4Oi7ullw7p2O97Dg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054810; c=relaxed/simple; bh=hvGCQuQMbS3+8mKEJaclt8XpGEaq5tzEavpoj0rQH2s=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=eS2Nc0I58sXw9XjCBKIYUfAbXrplmWwon4yMG/tp4TxmaAHFN7iMuacN/OaADRjUEayVslL19lT4m/IWIRHL9mlq7Bsrt8VLpSkLJxcQPu/g3QATja21oI3DrAhnMFtd5yjGQY6ZjILT2EvQgfeWKwwmL1gG0+dbEoIz9eGkUyA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com; spf=pass smtp.mailfrom=micron.com; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b=LtTnTML8; arc=fail smtp.client-ip=40.107.92.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=micron.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b="LtTnTML8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mzFcRqqAb6ghU8YGnhTrsv1zjGlvKzT/fgMlXaEJ7IFps/sJXkepIzo7eY4Qd0xVfBmH3DiigeY4OLOVRdxN/zMbs4C4OUlVAI10ii3tADA88eFxu6aN1rEeP7AT5Y1ya6XP6FQ+NMdCV7dY3R6fuQEs3VjTU0w62kVfW3ADG5V+FwraKeRcdxMVkaqdr5xCj68zyrcTFhcfnxpzKNIGP6zyEZtj+KgCw7Des13KxnGuDpkoicP05Qv1+j5dBPMHEtrZu99ffKbDJhfWZhC/Udyy9HWZEsrvQ355mZIBdD7IBk+nNlFZX5OM1gHiU6BZfy2Ff6A3232DMQRVdt+1uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SiTFRp+BRDIiztyw55CWSZVIYEJnAmCSncMzI64OZ/Y=; b=RL7AGzaq4eDYL3SG/1QsuTgKdPC01Mpydaq/6tAp16hj8NOMJQi0SVsNSO57hobJczcdMBXtRfIdwESfaugWBcRqFrGN8KlLuBoRko/huVF9NzctO1vAyitsOy2vo6rgDf6ihwguplESgf3rg12zSGLi0z3ti27cVsZOPc68rHmZ+R1yw9Si3MmyEbIxgOzqwltmctftDtOzQqL4XzQotFlZubQicdn+bUKPcY7/Hf96cwi0GfA3spnHvOtPNqSr6o4xj3F6eDeyxq73A61pd6X7F6avhabom6NcSbrNeVIsey82d9e7H8n2GwuXbCBoHI8MY0qzNTtve57xB8V7sw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 137.201.242.130) smtp.rcpttodomain=jagalactic.com smtp.mailfrom=micron.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=micron.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=micron.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SiTFRp+BRDIiztyw55CWSZVIYEJnAmCSncMzI64OZ/Y=; b=LtTnTML8tHQu0nuhnCUNrgoMm6FMtDqmrEtFA0KtzP2dd6EE8vMN/FtvA9DKGTpSwOZbFLlbMeCnC3Fzoz0zTK+xqm2R4IhgmRaenoFSeMsGeRno14A9mqgilaKAs5xXHQNtU+rIxJGR4kWP2VjM/hgOK9D+Xjaldd0zLC5i7i4TsxnmMIUqviazX+P5dMPs3+Y9q9xPbg8AbBhj2puj7pEu6ZMQmnSXNbtzGP8iK5dtcvlFrry+yy0XC5Ab9Tp1DpSxiJEwIJGcGkFs9jT3HO/nqcR/1V731klv6DAEs6tNQ4RwTiuvcXGFAYS7MYXcoY8+0/DvMP99evQtEbgfRw== Received: from BY5PR04CA0008.namprd04.prod.outlook.com (2603:10b6:a03:1d0::18) by DS0PR08MB8561.namprd08.prod.outlook.com (2603:10b6:8:12c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Wed, 16 Oct 2024 05:00:02 +0000 Received: from SJ5PEPF000001F5.namprd05.prod.outlook.com (2603:10b6:a03:1d0:cafe::f8) by BY5PR04CA0008.outlook.office365.com (2603:10b6:a03:1d0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18 via Frontend Transport; Wed, 16 Oct 2024 05:00:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 137.201.242.130) smtp.mailfrom=micron.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=micron.com; Received-SPF: Pass (protection.outlook.com: domain of micron.com designates 137.201.242.130 as permitted sender) receiver=protection.outlook.com; client-ip=137.201.242.130; helo=mail.micron.com; pr=C Received: from mail.micron.com (137.201.242.130) by SJ5PEPF000001F5.mail.protection.outlook.com (10.167.242.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Wed, 16 Oct 2024 05:00:01 +0000 Received: from BOW17EX19B.micron.com (137.201.21.219) by BOW36EX19A.micron.com (137.201.85.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 15 Oct 2024 23:00:00 -0600 Received: from BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3]) by BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3%6]) with mapi id 15.02.1544.011; Tue, 15 Oct 2024 23:00:00 -0600 From: Ravis OpenSrc To: "linux-cxl@vger.kernel.org" , "dan.j.williams@intel.com" , "dave.jiang@intel.com" , "jonathan.cameron@huawei.com" CC: Srinivasulu Opensrc , "john@jagalactic.com" , Ajay Joshi Subject: [RFC PATCH v2 3/4] cxl: Abort background operation in case of timeout Thread-Topic: [RFC PATCH v2 3/4] cxl: Abort background operation in case of timeout Thread-Index: AQHbH4hALCnlF+xX6US1cNx8jFL4cw== Date: Wed, 16 Oct 2024 05:00:00 +0000 Message-ID: <00a0aa82ae12450a8c690e11440c4101@micron.com> References: <20241015205633.127333-1-ravis.opensrc@micron.com>,<20241015205633.127333-4-ravis.opensrc@micron.com> In-Reply-To: <20241015205633.127333-4-ravis.opensrc@micron.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mt-whitelisted: matched Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001F5:EE_|DS0PR08MB8561:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fbb406e-eb85-43d6-c80c-08dced9f6452 X-EXT-ByPass: 1 X-MT-RULE-Whitelisted: Triggered X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?9flGv4LuidLmc163zNULjKn4fo?= =?iso-8859-1?q?X/fi5LbsczLshRVIDYxpCO2JohozVRo7Y/yU2ROvze0xiX08RlB7hkTG7/aF?= =?iso-8859-1?q?sM2EW49bYRsKYK9h+vLUjb6+hrgWsQkNYFtnpaG1zZNNTF6s5Cb1HH7gQoFK?= =?iso-8859-1?q?pYp6LZq6p8Nkijau+9ik9+oizWw6pH3jSemBTtzQg9AZMR1jUeut1u+O8KVI?= =?iso-8859-1?q?POmdkJ2Rw7p2BFUcNvGshKnuDlqyuATol2IrQ7SCfHv5O6hEW56nutATJU30?= =?iso-8859-1?q?dNKF2FhZYMUzu2W8CXtKNv2N3+WhL7RBZQV0RPQqaPRiU6nehot3u9dCA0fR?= =?iso-8859-1?q?yDLWxYa64rV+rD++/P48Z1XGJPCGLS3L2nQ502WFxj3ePNQIfgF0hiBZTvnU?= =?iso-8859-1?q?W5hHs3zSPlDhaQdedM8KP2NOZuh5JRXSIIslEl9gqkpfID8Ub2NvyORrVvKt?= =?iso-8859-1?q?qCPEgnijv6XexIQa9iqr3Ox9S3H8trCIEytMgILYg1At5c8xbfd+igxaeZdx?= =?iso-8859-1?q?/VBrRD3SXtmQgGWa9Rm5jJUiO7Vi/2kbRcDaqyS40O6qYegljEB08nBVp0BA?= =?iso-8859-1?q?0UIf0lmkPaDlqP1fC7+gGRuDNi+de94kX87NrVWLFgfoKxTuz3YGdbYd8vfg?= =?iso-8859-1?q?EpEs93SXZaHxYXW+99FTselBmJZKu0qZkxjN6ODzY32fd34FFcchVedRTR9r?= =?iso-8859-1?q?dF5eSLyBg5QLHpQkMim3LdZQZs2jzYjVbXildV7s5LKO4eyMLX+1kFt03x3h?= =?iso-8859-1?q?Ri4gP07985CX9jRW35CXZa03AY/rBg+V1ZB2lAkispUiLXfIKMh3FHN1lNwj?= =?iso-8859-1?q?piGlEjB4K0k6AdNY1HFH/PXCo5Uv6oVLL7xHMkETQnpqPA1IYnQEcsHKtQ5a?= =?iso-8859-1?q?gbJt5E2Y5k6+fIOyvvF40LKDvMIhTwQPm1BZeL3ZkhTA4L38YD+s6+rhzDuT?= =?iso-8859-1?q?V9FlhWpQ8wIFso7rH5Z+ST3TKL0LkvxT3KxRLkGxJgN7fGCNo4JgO021fZ8O?= =?iso-8859-1?q?hqI1wWZtV6wBO11IZ0/Y04biYDerTVyXXV1lmu4D8/yQ199grnFz4CGKO64C?= =?iso-8859-1?q?i9Gt0y4rmNGVVk7oLVccso7ooRXWRboaxTdbt2xKkz74YDs1TFu1Ttk+vv93?= =?iso-8859-1?q?PLZovQY5EnWsV/t02oQt/yHQDdEE1Nb514AO8jRMtez9OHnuERu/S3PH6K6z?= =?iso-8859-1?q?uNjGxSFggl2t+LXyTr9HD7opYYNRQSf2U0gDgEhuaL8o0MKFiDlnkfeLqZyl?= =?iso-8859-1?q?dDqhLiaLZT9RNhqQ0l8LrW9PKKUw2hqer77mzSPv4+wc+tekyqbBRKx+ZoI1?= =?iso-8859-1?q?Wg9/iniwLJTQhs4KSLMJH9Io5eFzxqK5vApeU34ygqhuFQrJGcMfhmn26UYT?= =?iso-8859-1?q?1NO895FLuoSCxHuHxxawBxnd9qwSnw2X7LVaiIxGkR0E6g2658YlN3gSuucl?= =?iso-8859-1?q?4t?= X-Forefront-Antispam-Report: CIP:137.201.242.130;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.micron.com;PTR:masquerade.micron.com;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 05:00:01.7716 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1fbb406e-eb85-43d6-c80c-08dced9f6452 X-MS-Exchange-CrossTenant-Id: f38a5ecd-2813-4862-b11b-ac1d563c806f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f38a5ecd-2813-4862-b11b-ac1d563c806f;Ip=[137.201.242.130];Helo=[mail.micron.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001F5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR08MB8561 Adding support for aborting timed out background operations CXL r3.1 8.2.9.1.5 Request Abort Background Operation. If the status of a mailbox command is identified as timedout, an abort background operation request is sent to the device. Link: https://lore.kernel.org/linux-cxl/66035c2e8ba17_770232948b@dwillia2-xfh.jf.intel.com.notmuch/ Suggested-by: Dan Williams Signed-off-by: Ajay Joshi Signed-off-by: Ravi Shankar ---  drivers/cxl/cxlmem.h |  1 +  drivers/cxl/pci.c    | 11 +++++++++++  2 files changed, 12 insertions(+) diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h index d8c0894797ac..808fb8712145 100644 --- a/drivers/cxl/cxlmem.h +++ b/drivers/cxl/cxlmem.h @@ -516,6 +516,7 @@ to_cxl_memdev_state(struct cxl_dev_state *cxlds)  enum cxl_opcode {          CXL_MBOX_OP_INVALID             = 0x0000,          CXL_MBOX_OP_RAW                 = CXL_MBOX_OP_INVALID, +       CXL_MBOX_OP_REQ_ABRT_BACKGROUND_OPERATION    = 0x0005,          CXL_MBOX_OP_GET_EVENT_RECORD    = 0x0100,          CXL_MBOX_OP_CLEAR_EVENT_RECORD  = 0x0101,          CXL_MBOX_OP_GET_EVT_INT_POLICY  = 0x0102, diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index d5d6142f6aa3..95c1f329bca2 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -394,6 +394,17 @@ static int cxl_pci_mbox_send(struct cxl_mailbox *cxl_mbox,            mutex_lock_io(&cxl_mbox->mbox_mutex);          rc = __cxl_pci_mbox_send_cmd(cxl_mbox, cmd); +       if (rc == -ETIMEDOUT && +               cmd->return_code == CXL_MBOX_CMD_RC_BACKGROUND) { +               struct cxl_mbox_cmd abort_cmd = { +                       .opcode = CXL_MBOX_OP_REQ_ABRT_BACKGROUND_OPERATION +               }; + +               rc = __cxl_pci_mbox_send_cmd(cxl_mbox, &abort_cmd); +               if (!rc) +                       rc = -ECANCELED; +       } +          mutex_unlock(&cxl_mbox->mbox_mutex);            return rc; From patchwork Wed Oct 16 05:00:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravis OpenSrc X-Patchwork-Id: 13837724 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2068.outbound.protection.outlook.com [40.107.92.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D626918A937 for ; Wed, 16 Oct 2024 05:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054812; cv=fail; b=OGASE7V8Ziq0Alv8IU5x8GLbCG6uSi8m5YxaJs97NWsYV5pKPBY6JzMHfwfERnSAE8oJOpzma+LJOPeRUhZErhRLAiFhMyXiJDihebtsWmg5mm6S6MXtc0uDJIFM8Lvs1Whjc8dJkjAUKWSxJjmo+5sl8M+RjejwvK89ub4VYbI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729054812; c=relaxed/simple; bh=zqYXw5Ztc5s1ylSnp3QXQVsW4HNG1ET86GME9G+5Bug=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=RPLwFv32KGulmyPBMgMwWqDGNSjQb+zGCcqYOw6zt3KgAPHqK7VQiIOPvUGqhui6Kwf5IiefmZkzxA3qMC5nsDBJeJ3m2Bt04oBsVOqGS7YQYOVOJ/NM4DZmmawOdljn3QcRMUYinW/1cl1AblxwsnjQvdx09ktRYlsILT+B8DU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com; spf=pass smtp.mailfrom=micron.com; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b=NRoKf9sV; arc=fail smtp.client-ip=40.107.92.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=micron.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=micron.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=micron.com header.i=@micron.com header.b="NRoKf9sV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=g6Om4vT7+TSWqh4MbZISbxe6rD1Ow+zHWZXsqH+NS125gAaRwwZtUVOpB4OA0eVNXE34GZKgZc9wrdBSzsGu7X2rx06xRDei8VBLO44Ey69QBxOgp6TMp4hkqlpMf7l3Ag/B26HMSLNNp9uuJLLAsC4eYZjrWmA03plV9Kztk46MDfEK6kr0esjApthzXDdPavFN/bkH+pVHlrwWI9uzbL33T0j58yBQ2mjvAa9sbOgsEqNupEHi5hbYoRXcDu6Kfrh1hV5plKubNBTdi+JMkDb71wg6CTTdAzK1YTbT+yZ687RJDee0aBeb2Knah8ZqAUF/rvgrWo/Ngi9ebmAZ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=I4teBY2FGkn5rZqFRxLi4WELeeaKBLhzJjGXsCU8B8M=; b=J6UpgghH+5n3xrWijMN7YIylqo0DngIjpZAVwep0ge1hHlX1O2NwJ6DyaKQuZBoQJAF80mLR4MC66FT149CwOkf3njuc8UEFMBeAwJXf+4F/deEE8tgA/tm1WpxE/B+rLhiFi0OC4oBT+8MWpaFQfQBiUcdiXwKwpYxkNPAA+OB1LoWbJ7lh5EJher4HiH/CUvLkwPY4lb7PKBa41RbpVfjdZOFlpQ/M+2H2TmZqsgJzDHSPlpFfhYVX/X6E+TXOfSUYBK2a0BrGiVAwiCnWEca6GJ7K75alTYQqZskI1l7kN5/77gBtY3QBxiEr/ecSDSgPhkPeAHudbB+n6v1Meg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 137.201.242.130) smtp.rcpttodomain=jagalactic.com smtp.mailfrom=micron.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=micron.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=micron.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I4teBY2FGkn5rZqFRxLi4WELeeaKBLhzJjGXsCU8B8M=; b=NRoKf9sVMmm0Ah40lkTZ5X3GcAbOLAYS0TVKKLJqWW3T0YYdOjRrEsPEjJkF1vbSs06kDJfQgX5xU0XdH6mm5ed+XegmLSoJI7GgE6sgXvHHmEg7fhWWceoY+WQNAfp0cheNkv9+zv5lfdVfoW2CfcTE0QG/tHIw2mjtP5QXA44xX+3GL/iorRE7+yOBQrydGZkFE6ILGXs9OpYGbEXFK7qaRi4pNJ5NvvLogR/UheWgZwnP/Ckut/tqayAldmeZXLV634Xfyv0hDy+kRPRCi9HJBf4W74UdlwL6p4HkLtKJjcsUNkvSWDCQscrKS1BMiL4Qc7bk+gBugumbXbb+ZQ== Received: from MW4PR03CA0107.namprd03.prod.outlook.com (2603:10b6:303:b7::22) by IA1PR08MB8713.namprd08.prod.outlook.com (2603:10b6:208:451::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Wed, 16 Oct 2024 05:00:05 +0000 Received: from SJ5PEPF00000206.namprd05.prod.outlook.com (2603:10b6:303:b7:cafe::cd) by MW4PR03CA0107.outlook.office365.com (2603:10b6:303:b7::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26 via Frontend Transport; Wed, 16 Oct 2024 05:00:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 137.201.242.130) smtp.mailfrom=micron.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=micron.com; Received-SPF: Pass (protection.outlook.com: domain of micron.com designates 137.201.242.130 as permitted sender) receiver=protection.outlook.com; client-ip=137.201.242.130; helo=mail.micron.com; pr=C Received: from mail.micron.com (137.201.242.130) by SJ5PEPF00000206.mail.protection.outlook.com (10.167.244.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Wed, 16 Oct 2024 05:00:05 +0000 Received: from BOW17EX19B.micron.com (137.201.21.219) by BOW36EX19B.micron.com (137.201.85.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 15 Oct 2024 23:00:02 -0600 Received: from BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3]) by BOW17EX19B.micron.com ([fe80::1c0a:12aa:1e25:d8a3%6]) with mapi id 15.02.1544.011; Tue, 15 Oct 2024 23:00:02 -0600 From: Ravis OpenSrc To: "linux-cxl@vger.kernel.org" , "dan.j.williams@intel.com" , "dave.jiang@intel.com" , "jonathan.cameron@huawei.com" CC: Srinivasulu Opensrc , "john@jagalactic.com" , Ajay Joshi Subject: [RFC PATCH v2 4/4] cxl/mbox: Add Populate Log support Thread-Topic: [RFC PATCH v2 4/4] cxl/mbox: Add Populate Log support Thread-Index: AQHbH4hCL4VC+jh+7kyZyYtwksPD8w== Date: Wed, 16 Oct 2024 05:00:02 +0000 Message-ID: References: <20241015205633.127333-1-ravis.opensrc@micron.com>,<20241015205633.127333-5-ravis.opensrc@micron.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mt-whitelisted: matched Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF00000206:EE_|IA1PR08MB8713:EE_ X-MS-Office365-Filtering-Correlation-Id: 686412e4-5d26-4f16-307d-08dced9f6656 X-EXT-ByPass: 1 X-MT-RULE-Whitelisted: Triggered X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?ArfoKJFn7QPUUe3eA/+HW9tggq?= =?iso-8859-1?q?l17QkoAwe/vFzuKxrB1li3iJMlVkT/94aDWbBeod1EkIBPpORB4AV7jWTUWU?= =?iso-8859-1?q?HRKBP66IuoQsoGI5l23OAYVZgw/OAwi720DOmI7+msK43vJJMG0BzS6+EXEy?= =?iso-8859-1?q?KmCmTMO8JY/W03Y3ergBlZWCgrRKmKD4cBsqNUun+jV3c8lzw2iYkuqZ6Tng?= =?iso-8859-1?q?rABjmXfLV53OJMdyR0gzUDXsUnf+UXgXfsAJ4o7oNSj/IqSRfwa/MtqA/qLa?= =?iso-8859-1?q?FI+u6mTQb3JqI4x3LLF6isyRZhMb6qUuFgU25xdkGRHIA9ClwW33cGeTX/db?= =?iso-8859-1?q?3k3ZC5h7hkUtyNECdgpd5BWET5z/vB/P306SRxrDao0opWgchnk27cV//7aa?= =?iso-8859-1?q?Z8zntCRIbpIyq+8rNG05vxFXb6G242ADK9KsdHYtC9J3zSZ0NB22K3IAER5w?= =?iso-8859-1?q?R2OZ3ygMiRPb+YWsWBchG5s2ppUmlUC5eGvf8SBswZ5DZZQ4GyALQc7PTHRS?= =?iso-8859-1?q?wx1ymoI7oiCwO9tHwG53ZzkzkwIZJKM5FE94lUpT+fww+iLgvEGD5rUJeucE?= =?iso-8859-1?q?OWBQ7qyYUgyX+lXc3mad9ImFkjNw9Hmzs4dOppGRFoow61+9iv7Vokw93NxR?= =?iso-8859-1?q?o9FUXk+3goZzWtkVQ0ZTmn/xZ1W/TD+vBtSlqOUY0TK/9qOgq4ZNsq+OPlrl?= =?iso-8859-1?q?+vfkMVPCfJrpQlnZRGDpy2RziN8vvKUcU1UbMXOuz31VsF161AdAzDbQgySX?= =?iso-8859-1?q?yM0MpnMUIXTi8kAizSI+p8lWJ3G4IpZkLWNKWr9IvL7oW9BYcyanpsF6SZyV?= =?iso-8859-1?q?I9Hum4lGSX88uKFQNoE2d0Wbyc95yqi+xGeGV6kGPvS1dNZEeL4dySNUC17m?= =?iso-8859-1?q?x9sdZPMgIUQHa3e+N/tu0dD4Si7+SAcaL92MiI3Rbfo+q5sr+YfWsCds01ra?= =?iso-8859-1?q?KBu4a6YjWvqNnYdKtk5rQqPkczXSxt5r2ivcCN9NE9uwORdgmJKdLnq1mtAA?= =?iso-8859-1?q?y260vlRYk6WzVGGvac9X0PQiEXsAVT/toP/YHJ9oFpnWe0Ge0jMtoRYoYItQ?= =?iso-8859-1?q?lHlv934PohBe5A5fqjnPx0LmcYdjQnIcM/luIzZjDTrXkUhP/jI4NqMmU0jZ?= =?iso-8859-1?q?IXUbcdLoIJTYv8/xuYXxw28VxoHP4TeSe9x4I2JV9TrnYAH3vT3rMWqtBbsb?= =?iso-8859-1?q?C7F2TJVx/aw/HsBDTyn6GsnHoh6Ar9EYZI2ACnUBzsNusQN+S4fNr1wkEm9y?= =?iso-8859-1?q?omOw5C7s4+cAbAhARU1mjyKwJTYNOLsqmAuvRZ56s7s6y/n3E3GIVHu1dKYW?= =?iso-8859-1?q?fKLsqD3U/TlVr4rQC6T+fuF1JYKJg+4MAOPBdc3B5N0CmkeOk4Rxaq/bqIHG?= =?iso-8859-1?q?M4D+naRNieqQJxpdSnGOKRR5U9FLi2xgaBgT2rn5uKQlsx3uo1JLTBljlzjs?= =?iso-8859-1?q?QI?= X-Forefront-Antispam-Report: CIP:137.201.242.130;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.micron.com;PTR:masquerade.micron.com;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 05:00:05.1650 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 686412e4-5d26-4f16-307d-08dced9f6656 X-MS-Exchange-CrossTenant-Id: f38a5ecd-2813-4862-b11b-ac1d563c806f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f38a5ecd-2813-4862-b11b-ac1d563c806f;Ip=[137.201.242.130];Helo=[mail.micron.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF00000206.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR08MB8713 Adding UAPI support for  CXL r3.1 8.2.9.5.5 Populate Log. Signed-off-by: Ravi Shankar ---  drivers/cxl/core/mbox.c      | 1 +  drivers/cxl/cxlmem.h         | 1 +  include/uapi/linux/cxl_mem.h | 1 +  3 files changed, 3 insertions(+) diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index 8c0144913b9e..48c2fc8b4bcd 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -59,6 +59,7 @@ static struct cxl_mem_command cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = {          CXL_CMD(GET_LOG_CAPS, 0x10, 0x4, 0),          CXL_CMD(CLEAR_LOG, 0x10, 0, 0),          CXL_CMD(GET_SUP_LOG_SUBLIST, 0x2, CXL_VARIABLE_PAYLOAD, 0), +       CXL_CMD(POPULATE_LOG, 0x10, 0, 0),          CXL_CMD(SET_PARTITION_INFO, 0x0a, 0, 0),          CXL_CMD(SET_LSA, CXL_VARIABLE_PAYLOAD, 0, 0),          CXL_CMD(GET_ALERT_CONFIG, 0, 0x10, 0), diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h index 808fb8712145..6320d8cd3ca3 100644 --- a/drivers/cxl/cxlmem.h +++ b/drivers/cxl/cxlmem.h @@ -530,6 +530,7 @@ enum cxl_opcode {          CXL_MBOX_OP_GET_LOG             = 0x0401,          CXL_MBOX_OP_GET_LOG_CAPS        = 0x0402,          CXL_MBOX_OP_CLEAR_LOG           = 0x0403, +       CXL_MBOX_OP_POPULATE_LOG        = 0x0404,          CXL_MBOX_OP_GET_SUP_LOG_SUBLIST = 0x0405,          CXL_MBOX_OP_IDENTIFY            = 0x4000,          CXL_MBOX_OP_GET_PARTITION_INFO  = 0x4100, diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h index c6c0fe27495d..040ca37046ed 100644 --- a/include/uapi/linux/cxl_mem.h +++ b/include/uapi/linux/cxl_mem.h @@ -50,6 +50,7 @@          ___C(GET_LOG_CAPS, "Get Log Capabilities"),                       \          ___C(CLEAR_LOG, "Clear Log"),                                     \          ___C(GET_SUP_LOG_SUBLIST, "Get Supported Logs Sub-List"),         \ +       ___C(POPULATE_LOG, "Populate Log"),       \          ___C(MAX, "invalid / last command")    #define ___C(a, b) CXL_MEM_COMMAND_ID_##a