From patchwork Wed Oct 16 04:31: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: 13837712 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2077.outbound.protection.outlook.com [40.107.244.77]) (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 A16FF21E3BF for ; Wed, 16 Oct 2024 04:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053128; cv=fail; b=XWdCuW7t1Cqndp2PlCdWlTNQFm0f7VKYSKvfjQ/OxVWOqz53PJJxfSzYTQJljvBHz7fghlLQd7oWUYqIbMGkE1VbFA+w6CZq7OmmA/sKWjk3MyMkVkci/v2aRftFPgM2GQoorLIqHR0BNs62/0GbqcTMaP5ka0UB4wXXoZkRwxs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053128; c=relaxed/simple; bh=OQUhpoOaLj7HnYDiwjVeaDeiX6rAqex/xaJvRtcp/WM=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=Lgui8pCAJqpHySENDZt8u2CQDlJ0wb8kthDfcFEEvJ8MDbGwtG8BsEXUAKBEgmCWDWfZphuCMH3bzThrTh1r1XloA8YYOYBnMKkdWOnKxhxMb49bfc6NfBR5EXMBKDNfQagWkfTsv+Bg31EI8gZ4YiWb37REBtNybZc+gjFMKbc= 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=ogoOA59i; arc=fail smtp.client-ip=40.107.244.77 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="ogoOA59i" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gjylMRL+EnpvfuZs6lxlPtyZpu2mm/m9S1MEuFCx/PhCSI6fQ53osAvfOB+04lyDTykDHjOfVP/KxDOFzSssnQeZSl6GwcmHOiZcf8SRfOD90eeW2MDcumrIlZO89f0kBIo0rnkwYmSpMQXtFxgW60JB2UI0qiOdNsX5jflvcJzjO5Bl0Nvo1Bilf/kqPDQg95zhoxld9IxeeMwkNzDVzUJstWnqITwm3xPkttqixutOFfHdCRG57fzUTJDYgQy6jRJ+zzc3soUIBejDr0O1h9mP+ith9P8UOz7ldwJip8UfQQ0g1UM8BfI78HfBlzwvSakx+ooRPmlatF8xCi4kfg== 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=TTWJR+n6EqfdLSx3ZcIbttaHeB+3utQINwBGrO1urbI=; b=f8TiMlcUHh5BYW/E8ku/j0A2DH7htb+isqe8+qVdJACNycoa/P9j79hZ2Uo6MkclrjuGe/AQbK/Ii3lQB58q3qvSFDW4Pyf9ykGBv9f4BMqxTP2lnqXxrM2ex+WTK7tsO7mEBQhU4tmXv91GYWF1fGsI9caQqAj2GO/J2eg14XyHzKu9Zw1CfiHIUMbEE57mRqNbhxvNOL52qiRk9C3xUDT2f4ryPhlGvgI0DQV8ethD+jnozwu11nGlY6xWddbbmUTHdo0zimMrNhhWgXOS7Tud0e7MScJRb4alE2TJNkv5p5PpZwnVjsblz7c9ox1Y8dT0ZkE3sjde+aAdlx+GEQ== 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=TTWJR+n6EqfdLSx3ZcIbttaHeB+3utQINwBGrO1urbI=; b=ogoOA59it7c3ptybODcaALbEl2pBeiMVTWILvu+qTguryH+DIDD8o0wg61VB+EnsbiIZrRzvRaRT3SUlDAzbabBPj0AVmYt03qgTVEbM2IfMY1XWNdTvqcvKHgj8JWR00btdXxs6OwaxrDRjYI+ZiLkHB/3J5/KrkrkMWOFGQQNfj9CaWoOnfH8H/6g5wYr/idmrE/C8TAuz4744UeEOOigleNcZpWOAvglFeoZVgy+mjzBCOQQ9LAK7tJAs2pMhP4LgZ+wPSJCbR+DEFPAxcqtxPa/Gj/U1Ysrhd2ewjx1O93pMKNYbmZOJjxqgmmV+viiQZ+4dwBaG6l6Kt7k0eA== Received: from CH2PR14CA0003.namprd14.prod.outlook.com (2603:10b6:610:60::13) by BLAPR08MB6897.namprd08.prod.outlook.com (2603:10b6:208:324::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.29; Wed, 16 Oct 2024 04:32:00 +0000 Received: from DS3PEPF000099DB.namprd04.prod.outlook.com (2603:10b6:610:60:cafe::dc) by CH2PR14CA0003.outlook.office365.com (2603:10b6:610:60::13) 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:32: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 DS3PEPF000099DB.mail.protection.outlook.com (10.167.17.197) 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:32:00 +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 22:31: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:31: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 1/4] cxl: Enable mailbox ops with background only if request abort operation is supported. Thread-Topic: [RFC PATCH 1/4] cxl: Enable mailbox ops with background only if request abort operation is supported. Thread-Index: AQHbH0T824gEFEU6X0GTKKw+laHw0rKIxoqM Date: Wed, 16 Oct 2024 04:31:58 +0000 Message-ID: <435ccacccb02483682117bf200e75874@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: DS3PEPF000099DB:EE_|BLAPR08MB6897:EE_ X-MS-Office365-Filtering-Correlation-Id: cc4668e0-14f9-4166-a17c-08dced9b7a2b 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|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?pcZQIRAYZLAmY9SgNlk3uhQM/e?= =?iso-8859-1?q?zrwvA23Hv0wOFnRgWsGh7m4+KGdtHOBOGMmzMqHKUSqd7xotJNxV2VJ3ycrp?= =?iso-8859-1?q?qHqkvjD66KNQ8a+ASES9ce0bIF2hws+wbScLDzUpTkFjm6Ua7mClA/7f/Lf0?= =?iso-8859-1?q?oMOaXRmS4f8jswEYueCauaW8X1nkoCL4iiGrUVcpCzNNUEn85ZSHz/GOJqPe?= =?iso-8859-1?q?I8mEWDiqu9zkFbG6TRWQfO8aQa+jdaCyCB27XjOPQrNQTACt1iXkn4KWUjH/?= =?iso-8859-1?q?q8lNgFzGNKPZzcvxQeA3WMp1XyHsXjQ5B67AqGLfSzb49PiHOv1JYA0dH1AZ?= =?iso-8859-1?q?PFxyHB06FLkcrqWuwTyL6zlyOezBTSRkkbte4UMeXgnh8mrdFOXzrJKpTvlK?= =?iso-8859-1?q?iDDDBX3jmyxvPFCl+CayUIzX4lkIaA5y5qrpxLew1F8tAiGikOrEZmUrrQDo?= =?iso-8859-1?q?eQwf7yXPOtS8Jc2Ytx9EM1nhMMhREYi1nFMU+rF0aWvl4hSDV9VWZcLp2XRe?= =?iso-8859-1?q?XZWSGonR3FOE7PEVKZ3aIQm9uDLuUvk1aD1j2934tJrYdhF+RY3zWylpME3x?= =?iso-8859-1?q?jgRHDNDhrrdAS1U4UH2xr2iEX7z6N+PZZ28h6Gm2tGJuP3B0mrYK+kiCiPjb?= =?iso-8859-1?q?O/MOz874lzZZYODRIxYiHuBaIR/RpPmj5atrYRDtX/Lfd1XnV3r3A8PRXT1d?= =?iso-8859-1?q?GINV+/nXPFd/SKY1Sg+YRlgu5pxIza1bToEkg43lOJ/Qpt4AAhobayoeA5Y1?= =?iso-8859-1?q?yaWtHT0kMRIldOPVF56NrBKBvh0BRBeWGHk4BH6avPFYWgmq53cyhfHWuXvh?= =?iso-8859-1?q?Q/tCSEPU7UfDAooQ1LcycVnzkhcx5mfc7xAcTsH0jZC2GVCsvqXyqXEF6LS4?= =?iso-8859-1?q?WohoeTurEwNgsBzv04hWxh59BHaTY5bd/mYBOhjUocSd96pc9+YxMN9wfYq2?= =?iso-8859-1?q?imRnl49ZHx59x2YySmI44DFnFRLC9ZVD8hd9HWGV2JOJbSaZiX9N4GoOZl4s?= =?iso-8859-1?q?zEVh7U+5EGYiQ2nVJWxQ+lNchzHM1XQBkn4hJGNNZe8MNvJ5MJwgg2yGpR8Q?= =?iso-8859-1?q?cZXXJN1VZWW46QA6mnraREY51rIoA2nSKiViqDoRAA0VEF7P53y0ySkKURbQ?= =?iso-8859-1?q?qHdvp8ZYiWSA9XPtsJurIC41n+OmWEkrj+ozIdwEfs0eAhACYRfpIkLYI8ys?= =?iso-8859-1?q?IpvBfPolNKAvctSHa5XWIL4/FLg0bLo6oIM/BFe7+iOPEZZ8+/HlO75iYBzJ?= =?iso-8859-1?q?4E+a1wEQ2aII0SNrB1oni6UbXx4YF9VFVz4456RiMHZJA+HeSlcww4fBsZrN?= =?iso-8859-1?q?luHovuaDfSa6qMexBVwA+tpHQNglb/acFmFl2ZexAWMb7O+KOwX6p3sZlx+7?= =?iso-8859-1?q?nWs4/CJDLiTJNO8D0LOV/Q08WiiCIaVc5WSiMQAKU34rE0Mmh2WePRZFKQcI?= =?iso-8859-1?q?FO?= 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)(82310400026)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 04:32:00.3598 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc4668e0-14f9-4166-a17c-08dced9b7a2b 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: DS3PEPF000099DB.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR08MB6897 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/ 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:32:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravis OpenSrc X-Patchwork-Id: 13837716 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2040.outbound.protection.outlook.com [40.107.237.40]) (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 9F1E44A02 for ; Wed, 16 Oct 2024 04:32:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053141; cv=fail; b=R9/NSv06WtH7at74t5+JSzKH7pskQ65TgUUaZz3vNb7L+c4Nfq3SWD9Y3z/PslGXq/qp9ptrZaB/FlJYtJw9JAUzMt6f6ywwT+DgQBrrle2SnXrlg4OkhLh3iD4na8RahsY5cIKRPE9PlCUFsZyMrMQUYBjJw7uN8YVlRtVZaPY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053141; c=relaxed/simple; bh=3LSqGrAsf1HaZgRy89GHzJTOEOwKinyJwbR2M2tQDCg=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=TCZ1TnhKepIltAgeOWiNHV5DfehFZh9IzRi2Gkya1Limv334+tXtwDoRS926uPMBz3GZSI9j8L0e9jlXb82lQFW2OL12Rkp/YcdKroGvCnL2Z1VcytDhQTldhuxIdNFAcyKn1WY/A6iXUvcTAExZBd+nq6a47o2SbMpr0ld+5H0= 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=lIGFuv7+; arc=fail smtp.client-ip=40.107.237.40 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="lIGFuv7+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VoDNua4Z7vQlZOsDeaJLZl3o+EPQecLdw7JDxfVOddAVTDkY2aVhoaavYUjtWQay2qHlb3Zr2HGI5hgxJZ6rYU4NMoOBJfB0nJ1PfsfTDtLIxermQNadgMLgfLomg2/OC5JDuoRrsxPh1RLgifTADC2Is1dcJ1KhnYv/MmkCHKV4X8fnUL+jQp37YrC8ClIIT3JzS+QZWzb5lNEmEVKo6zxpbLyhpx9VOnh8kyb+l2BUADVHisQTg0yWBpA53KikFfwR5hQn025oQs2uYZSPECk82ljId0qsPEbq/KK27NthISLLKiz3zZvnXRZOYzfmGlMN7z4DNLyz/Cuhfcqvxw== 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=JruA7bIz5D+vHYd9vD3hyuYlR0r+T0FgOAM7ybt3bWU=; b=lxqU7rKsXsA3MMb2Pperk5hN/yc3iUsn/yr6SjSBahFGHIxxS2tYRqdPJHxI1rm54e2Uifn1q8zEbPPSC0TmAF0mYZjUyuTcu22DjWpit7waBIfE10YVIoSHAfB+BHKVf63raZMndzvxlKNYvChUZCBGdQ8LEkTybqe9p2RCojq09nXsoNXruq26PceSHXquxkVnYD2/HvvXjbfvuP9apSGQdlIMJ0i3pYOlDn7gVT1FFK5GyrcASV8X4UGesoq5g9offbDidb5jvYJJDMMxgHLUns1kzLHsSB7/Gez0v+wwPtMmjI7vLNgo+iYbFJpJT0cE11b8nAD0hjcj6//k+A== 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=JruA7bIz5D+vHYd9vD3hyuYlR0r+T0FgOAM7ybt3bWU=; b=lIGFuv7++VMSGwOGQ4q2ao1Ad+Snevywb359LtLlvK91vssUkRdFt2EmJ4Zby0jh2ZHcjpvGywovxFiCGJaPeO8jbQolFV2UU3v8Totg2x/X/wqAqpZwyg05rV2I4Pzl/VXLhguOpokTh35ksM8uR9Cv2JKJxQr57Ib6KDvKEAnsucAIy8x/5EDwG8CEf+djbiYc5uJjBEKym9nosc7wRGsPX0+RE6p5S/TZlGGsAAq5OldYPyD115BtmmVdyxL+e9FeaFvfdXT/CPYzzpnkCMKJI/5tu4DiP44IThEj3XJpU65GmEMxJ84dLrdu5nInoEnqrV+P5yBHQG2ga+pH8w== Received: from SA1P222CA0042.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2d0::16) by CH4PR08MB10537.namprd08.prod.outlook.com (2603:10b6:610:241::19) 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 04:32:12 +0000 Received: from SA2PEPF00001505.namprd04.prod.outlook.com (2603:10b6:806:2d0:cafe::57) by SA1P222CA0042.outlook.office365.com (2603:10b6:806:2d0::16) 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:32:12 +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 SA2PEPF00001505.mail.protection.outlook.com (10.167.242.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:32:12 +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 22:32:11 -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:32:10 -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 2/4] cxl: Add default timeout for bg mailbox commands Thread-Topic: [RFC PATCH 2/4] cxl: Add default timeout for bg mailbox commands Thread-Index: AQHbH0T8FAWXHcmfvEmE9UciY2LNybKIx7fB Date: Wed, 16 Oct 2024 04:32:10 +0000 Message-ID: <15a291283358440aadbabca5f1400919@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: SA2PEPF00001505:EE_|CH4PR08MB10537:EE_ X-MS-Office365-Filtering-Correlation-Id: 73518fbe-6f6a-427e-6618-08dced9b815f 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|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?ySbis7yWCWdUfiGgRj0t7W8Bfy?= =?iso-8859-1?q?rCMg1Ocu0+sNtEzx0rJVGyOFwWX+D9KoRn7UgnUvOpIVRdMH+ibdsE1LGNuU?= =?iso-8859-1?q?vMOx1pKXpfW5OCFhbRP/uN/4XZW+a/7XEgnW8btu0joRDda0569K1SB0P2X9?= =?iso-8859-1?q?TEo6qIoYokrTtTm5PtA9SNxaNsEVIwPN3iLEm/LM2XhhY4R2+30tSLqUSmAj?= =?iso-8859-1?q?s9sqp0fDtxS2MVYB1lx9zevlpLv+PeBR95QU7JukEQOPqaFq7fwZiSKZPb5f?= =?iso-8859-1?q?73HiGVhDJ2c8zXX9WXe3h81oV3ecoPGhppKx/PIkTVEEisYRlI62ZBfkTt21?= =?iso-8859-1?q?tp9Wzp7d2BJwXoT2zWemmwnH69hFOsyPB8xd4gfpggzc4F+n388ZM3FsQumd?= =?iso-8859-1?q?7KIPVgtyDvdao9OHIINJdd4sQpPLTkQbrHDJrsCwtz2HEn3ZopYerA8ILvAn?= =?iso-8859-1?q?cxXD+Ip8MErMnnvRjsyAn20iazykahNeHkE+bJOpWAjVc7BfEwLr6HIs2mTt?= =?iso-8859-1?q?KqSeOYmhoCyAwCtzf/J0Fzsky64FkrMTyZlhCUHWtYkhT1HEs3EzM2UPHiSS?= =?iso-8859-1?q?hk0VkLj2SWwDowi0iCkwXOg3iRJLHbDpKs7R7+X/zigfuTfWTQWOpFMWL5+/?= =?iso-8859-1?q?8Vv4ON52k27lP00otBKigDWEiEG2dQAuVAy82Cs8jI96ggSkxwuWtbhFFJgj?= =?iso-8859-1?q?CqpczoACUPgXw2RKdGzoCcbIzAOPmsdrRW1clwLFqtxPdqAGFeqFORpCOs/7?= =?iso-8859-1?q?UKWkipq3qdoPOvgZOX/uYs+506aKu6GhRBH296pBDJmz3AE+DKi8/6DGsiSw?= =?iso-8859-1?q?wsxj8lpPLsvreWCt8fLiUBLsyJqhTgFREeAH0Et5OoVAslk+idm3j8ApaePO?= =?iso-8859-1?q?qjEwH+9FgaHMG3Sx/GBrS3RJcIotJFqC+xv/ouhVU+pHyASFJFkspJ+H8Zmo?= =?iso-8859-1?q?SVbk4X74CRm3uXv24rEh4ixsrUFH1cVN5rIt/hwi4xgktaNqPQHKN0A/A2sJ?= =?iso-8859-1?q?4jtHGgCuxWMX9dag4nOPJoZWLvzasDLrGuhvd4AD7kNId8rpwM2fnQUecLSM?= =?iso-8859-1?q?UvJuyF1F6uU+FW1uJTHmVqeO3W2I3rynoUQaTLfED5xnYptK66wivuvXwWbV?= =?iso-8859-1?q?6AP1WyUOTY8ADq86lvIt8GenyLpGrJwj9zDYO2NBruqfENIrFznIQaPszLmU?= =?iso-8859-1?q?6/YbmKJjMjzsMNhtJbA2BQvHSJ0Vz1TpmTWnNTCfBBCh2V1/lCu3I5fXa3eg?= =?iso-8859-1?q?ymr0Vnygn7K6jUS/PreY1nKrlTOhITWEyBFXrS/eKQnHIaDzteEUItTJMnHE?= =?iso-8859-1?q?jU7XoP6lH3Uyke2rW/Ns4SRywctNsX9mq5nMjPoFKcKM0iUqrNtnRiU1fZKA?= =?iso-8859-1?q?TZAg/jnFb/3MaitYVh3dPBcMCBE4M6PM49hO+vaPW9uwpyfAhEG5w33OZ5Tm?= =?iso-8859-1?q?++?= 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)(36860700013)(376014)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 04:32:12.4900 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73518fbe-6f6a-427e-6618-08dced9b815f 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: SA2PEPF00001505.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH4PR08MB10537 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: Ravi Shankar ---  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 04:32:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravis OpenSrc X-Patchwork-Id: 13837717 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2062.outbound.protection.outlook.com [40.107.220.62]) (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 F0AAF4A02 for ; Wed, 16 Oct 2024 04:32:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053153; cv=fail; b=n9EgK/tMaynpvyzMWh71pjAl5zggECk50ktc3WNh49nvByt+SQ2mMFrKu+qFolPY0ew6R0R1Yvc7Gf45j8TsHXwdZfvStpfbDhtpxIFLPF8cXP/HfMiOJhWH7Tas3OcadIOo1s4YswYXARwLEEeDgQcOKwrVW+6dclt9tRnXfeU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053153; c=relaxed/simple; bh=FkA8Sv45BcZ4/5KrragA43CSj30yKeSewAzppnfrPik=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=M2EFC6AYIEp3AElmYmARCR+uEVEeNUxvO4Gg2KSRZiOEBZcAeJxw2uhYJg5XUVaRWGodAVBp4arxJ0jNYwioHyZ5aMEsGIcC08zy+vmHSI6oaIe9prig/nJ6NEqio7Ka0mEoCllDvzOFzAUw4LMLbY8frEWB3kzen1MkOp7wu74= 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=UXo5mwgz; arc=fail smtp.client-ip=40.107.220.62 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="UXo5mwgz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hf9UDJh5Yn86/yCJJ9iQ34AGMjhsuj+D9s0RHIXz6Z/nb9x902McUgo73vCQfzMecBFqp3Ue15YPOsmOsRaqBFNZv5YD0kUJ3f5LyfVm/RtcJToYFCJ3DKeEuk81Of0trb0LqLMU/C0C5gMhNdrowwuVjrh5JJbymGGPfXDtlxwax9K0UiKPEA0opFXBG75SaQosX7SwMuBhiHhaqYmlvB9uEQ3LqdE5mUqVGTd0n3vrHHjQ86oL05W6HdIqM7FYkxa+bbVgk8Zvf9rSzXx/8k5AY6aO5tkmO0jKeTkQSnwlnZB/ERqk8G8iHsUzDPzI7Hy9TjTnapPCWOCxBpMwWA== 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=DhOni2X4nF6GkGRErIXEdUg71yRkUrm6UeubFRjx4h8=; b=lZlRYW9p22y1CWFlMLvgBCno/Hf1bxX+QV1tHE5+9M3i89VcclSFBoDIRc47I9HU2cHQMC+Jr/WO5s6cAuz6cktntouRqnLk+0ddAtekmumCgf7KOqe5HvhgtRGNX2RxCA9mGg6DIkGWIfIplI2qDhcXLUpy69dl1moU+hPerpjjV6XwzMb54otbzIn1A5bkG9ctjwr06ID1hR2aihE7eTxJmHAjmx9jVh+2wW+OXp81y0PY9I65B0E/kAzszXgUcEbljYiKJkp0WXQiQHQzb537RmukvO3sEvt3Ohtr25O14NOJC7OfTUB5h25+tTs41MSSdFIqSPnc4VJIBR2n7g== 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=DhOni2X4nF6GkGRErIXEdUg71yRkUrm6UeubFRjx4h8=; b=UXo5mwgz0LVaiEAIGMdA/2nNNfmbYAWkv3cE/oTtJgi2AoVTSRJYf4xA+RAsoDDyWJWYbkJCEJROyYbowAodCeCLXek78x13GmzjfgN7Z4De81iPg+xlkhl0/kPB7uyS84a7gES8oqz7wK7CRdyLScl1RUXv+nJcKJhz7qzanFJaqaIJSoF0aa0hZ+ffx1sh7DHySDIee4Ol8zZgSwVd7X1YNls0hYKdtclqG+jhyb48948VMeY6wYt6VfkyG0x2yU3Mq2tJL+3HMU34CppsySbnmfRLuiNvnWF/J+/wdO4qiNb/ZIQ8IHqxR4PTR7ndM9amjMP/jQ+KPOc0/moDHw== Received: from BL6PEPF00016412.NAMP222.PROD.OUTLOOK.COM (2603:10b6:22e:400:0:1004:0:a) by IA3PR08MB10532.namprd08.prod.outlook.com (2603:10b6:208:504::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17; Wed, 16 Oct 2024 04:32:26 +0000 Received: from BL6PEPF0001AB4A.namprd04.prod.outlook.com (2a01:111:f403:f903::4) by BL6PEPF00016412.outlook.office365.com (2603:1036:903:4::a) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.24 via Frontend Transport; Wed, 16 Oct 2024 04:32:26 +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 BL6PEPF0001AB4A.mail.protection.outlook.com (10.167.242.68) 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:32:26 +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:32:25 -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:32:25 -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 3/4] cxl: Abort background operation in case of timeout Thread-Topic: [RFC PATCH 3/4] cxl: Abort background operation in case of timeout Thread-Index: AQHbH0T84BnF40rp+EKe3+kNU9bYZLKIyJ+D Date: Wed, 16 Oct 2024 04:32:25 +0000 Message-ID: <28ccc1fd7ef74c7e879984f9c0cf3ecc@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: BL6PEPF0001AB4A:EE_|IA3PR08MB10532:EE_ X-MS-Office365-Filtering-Correlation-Id: 34c7960e-8b22-436c-40cd-08dced9b89e5 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?GhItqx/UWIWhQBrLNqpE5/WjPK?= =?iso-8859-1?q?UB27Lq8sNCL3X3lbyWOK/xpUHpsDNSQ30V1fU+JWeWtEnB5Og4Mq5LxbP6Oq?= =?iso-8859-1?q?8PsdTk0W6RjVAQay/4jari+oQUUf/c1x3BaAbWHGTOQsR22Wkqz6/M00paVX?= =?iso-8859-1?q?PVojlDjEOs4MgZ/Mpk+o5rdE1WMB+yxLphr8Lx1D9Mkem2QDk5If9UMNt9Qi?= =?iso-8859-1?q?HMSI3SPl4WFmlX/JFQIuVfgBOWPg6CO7EUQtyHpjf6NYmZviuaEg774mL/AM?= =?iso-8859-1?q?MaDV4EOTjFSVOv24xYRTRxyAHbDxzq1VGxCHLUgA7QWoJ++aeO42SYbtHgis?= =?iso-8859-1?q?q/GZuvBeEdEffiGIKagQJ9rSkOlVUgATfNiaa324naS3+c83dbEXDBIBcUTR?= =?iso-8859-1?q?rCFZwcG3B+x4dR4Uv+vrHnEos7anRGIHbHQoE3sQtfUA2sUyd9AdpEwH5S2t?= =?iso-8859-1?q?i0rt9wZ5MAeoWvoYvRQKqDFEXATZ9G6ypzcWNtujehMyctdb0yl5RUjpQAiG?= =?iso-8859-1?q?oqrvtg22xsv1YftwhZmXKXGjbyKvWEyqL5Zxdjmw6FZWs5ZXmbK0eCybeZbd?= =?iso-8859-1?q?i2IyHjF8F3ze7GKCMW+5agjc3Uorih/PvgMwt8e9ePFdguGPQb1RnR+o24vf?= =?iso-8859-1?q?AdsHXpBjqOY1ukguWlHDczijAuhrojgHDl3r6itLWDMEQC9ZD7qLIsCI2GQI?= =?iso-8859-1?q?iIuODowy47MFijnZIYyo2j5NJm5MlBzfP6koNCw/sPikmHerD4QBUCfTdAv/?= =?iso-8859-1?q?wA+mpqGhIMNr8rOIfTdAmLgc1KaeekicRpqAB8CU/9ypN4zSaCRaX2daLI+b?= =?iso-8859-1?q?CUO3R1/kbtAwsgwB60HO1RSknVbXBt4bWlAmeIJvIKpYhCUFEG9gnPDevgLk?= =?iso-8859-1?q?nPAv0BKl9Iv6ohLcTdEUIrYi9RD6DTNMY7EVUtGSU2BbF2V1vi+VBnf/aVON?= =?iso-8859-1?q?YgYdp+uApFXUd0ZxahQ7A2HsYwRpRbup1T6wfTbr++MRPmRF1Njr1CYbWxcf?= =?iso-8859-1?q?//ZRxlAjRKgFNdIPHMOh9NTmJVbcRiFVsPaywzC4ystTndZazo4q2Phsu25j?= =?iso-8859-1?q?uIVl+JBg9aSvd5wWUskeZvYOx1V4F6LnY8J/nBBKI0oT8+NyCgHpCTaMrv+X?= =?iso-8859-1?q?gloh/2bQ0nYJWSrpZfwbQJppq9Q2w9LxA62J3U4ekCsA7cAMscONP7JwWD2u?= =?iso-8859-1?q?YhXqXABwcvpTtaPhfT28ggjqvUM1gqRNFqOC2bNVHKJqaiE2oKT8VZeMEASS?= =?iso-8859-1?q?vdepfuVRbzQV+/C6DgNh8gSahFL8+/HPRUv8B9GKjT1k+dchC2b/Wl2QWUsy?= =?iso-8859-1?q?I/frwx0uLFjfnYd5vHS674HhMOeQT0/RCLhOPKyXteNsk5WnlBErciLxqCsb?= =?iso-8859-1?q?WbHo9n7rZe4wACTdkLGBmkkAtzlaq+WBJmbnSzrvO1qLWZN0ibNHDgrNlOIN?= =?iso-8859-1?q?C6?= 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 04:32:26.7421 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34c7960e-8b22-436c-40cd-08dced9b89e5 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: BL6PEPF0001AB4A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR08MB10532 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/ 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 04:32:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ravis OpenSrc X-Patchwork-Id: 13837718 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2077.outbound.protection.outlook.com [40.107.101.77]) (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 0C3F44A02 for ; Wed, 16 Oct 2024 04:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053165; cv=fail; b=K/fJsAKE50BGRZFlgUQJMqfqriWGOz853yiVdp5uo9ZO1A6aI7B8CnaMqf2OeiieNimMpcQShFEAg2yVTJNy+yxpvo3/sNyxLbKhPCNllcakqZC91vTyoEqKKBrFb8qer8t2HqAprTtWGCOlOVXHPF+0pUbLkSLIxOSf9XbKq+w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729053165; c=relaxed/simple; bh=aTapZ0bRIkmUqTlpaeggEBgwZ3N26DNW4RRel0cOMIA=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=TyG5oFhPOHv4xZHbwLSgQ/8U0W2zf309yIoBUX9j5aQb7zv+L3lmB//NKBhtWDWjlNvLRS6EnbUBgjoJ+ZkS7IZF4Hmc6opL7nNl681IUMkSDLaxBuEEz9wTxywdyCycC4UvFsnRy/va1QkLC6+RfeAwyXmaB84aASRszqyet2o= 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=S5ASmP5K; arc=fail smtp.client-ip=40.107.101.77 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="S5ASmP5K" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D5T3iDnK3EQYje5dv3n7rcQvkb1bjlQkQ+2Tg2Q44aqwW0K4So8A9mbICNqg3XPCLcNtpUVADjVw6rlUqFbr5ZivwoOPtyhITT3SnKesMsNgFh04ZoqYY8X5l93IZK7lRLrYCXxFIMCY+mm4vICQIiwO952qxG+oqsM9bQ4HET8vZpUf+rWFuo8bc59wWP4pXjo13jVDQbV4GKQIOHCL8FKZK0sayQFi+VeNfjl0tBMLrGhub5n9jf4Gl+piJotrWiYFV8eY651wxeqoT6xUEG9SuqyWkJYkafqV81h75+vO2cqDEJvCTzhjs23M9djDZhnhyaLmFpDV7k+8T3+1gg== 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=yMsDbssQmxjL3ysdhAjD2prcKLMvVkp3Zn6eEqvnT7o=; b=tPVxbJkc4K1vrP2hxt3XQCnTwyBAJXzsO93LSy7iEIYUCv7OB26CI8vH8nI3J+a4+qnM63MgtA2NDgytlqFg8x5nvEvNcVt60gZjxiWDGVE/kY8052clpRLDy2epOU/1a8svFyAKRFUjvnTaCec6/ryzjZg7ZzGEMsDOhWJctLfQSPnJ04y9jSuauCnzkPNHCGq43GnoVeokj8sGXBVHAQQ0OlCvDAPzjtk/TSvOL9cZ5f6MlJDEL4cz2l53rm3Io3OkVLN2i7McDDnnUQNcn07LPQHVgDDRXk7EZSUCNYx3smlejwhXmLVjUjjnwhT/N96GAdUG++1MmeAh4BOABg== 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=yMsDbssQmxjL3ysdhAjD2prcKLMvVkp3Zn6eEqvnT7o=; b=S5ASmP5KUicJ4CXMkKRYnFQlg6C9ydwoSEBEs08KQNGs7qh8zy/QLIofe/X9g0OwHGP4XXN3BmoCATofWLGw6hxyjl4pPz9LmJZt/EqrJFBaZy9YO6bUXp65rtu7PYQqBOoF9cVxixiJQUJL4cZAuaTUfV0V/ApBiPiGrk2b71pPF348+UzKeInw4vIiPCDSMGr5pDFSKvFVF3Ccq8tdZ6qZ9aZc/lHPgcQLsBMyNEUchjcI2P80PC6RwGEYgoPGn6arCgDpyvU251nwfPEaDt0EgTzL8nLiS5fpfqBdTU5eM1A9i1NNge6FarHEJbansOKVXuG5QtlXG5EDesQ9sA== Received: from BN9PR03CA0640.namprd03.prod.outlook.com (2603:10b6:408:13b::15) by CYXPR08MB8937.namprd08.prod.outlook.com (2603:10b6:930:e2::7) 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 04:32:36 +0000 Received: from BN1PEPF00004682.namprd03.prod.outlook.com (2603:10b6:408:13b:cafe::6c) by BN9PR03CA0640.outlook.office365.com (2603:10b6:408:13b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.19 via Frontend Transport; Wed, 16 Oct 2024 04:32:36 +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 BN1PEPF00004682.mail.protection.outlook.com (10.167.243.88) 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:32:36 +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:32:34 -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:32:34 -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 4/4] cxl/mbox: Add Populate Log support Thread-Topic: [RFC PATCH 4/4] cxl/mbox: Add Populate Log support Thread-Index: AQHbH0T8IOYHNAqJ+EGmcawYiH9jE7KIyOyR Date: Wed, 16 Oct 2024 04:32:34 +0000 Message-ID: References: <20241015205633.127333-1-ravis.opensrc@micron.com>,<20241015205633.127333-5-ravis.opensrc@micron.com> In-Reply-To: <20241015205633.127333-5-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: BN1PEPF00004682:EE_|CYXPR08MB8937:EE_ X-MS-Office365-Filtering-Correlation-Id: bfcd3ebe-6b64-4d69-ef9c-08dced9b8f7a 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|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?JlJ/G8ClHGgfzQrxLdI8DHb3RC?= =?iso-8859-1?q?yZEolGidBWwzhtRvQGTMqp6ehDIG+It1Jal1ut1bISNToasl2BGEMrgmhJ+c?= =?iso-8859-1?q?pIWDik/zHqGrnb2hp3Y+XWcF6qOK+NBZnKjiS3blPlvd46RUoTz9SgBx6LD5?= =?iso-8859-1?q?uVpIJbx/vGALwhBe96LbnGD+3QILH7G5V+vjHMHUHp+0BKIH+nKaryx2UTTA?= =?iso-8859-1?q?z7iQTrPTS6MpuYJAk8NXlMPONXaMZQQKg3KgufnNsuQF07USjL0XV2MaQa/j?= =?iso-8859-1?q?yhWCexK8li0yafTBCdE+RMlrY4yhIGguI87akFBo8MU9Wb9QmIDMz4CrzLPm?= =?iso-8859-1?q?2oe+o/LiWzV3+f/rhjXHfxwHvg9UEnjzpqTlxs9M8INz68H6GzJCy5AZIW8V?= =?iso-8859-1?q?BHMO3VZkni+gwg+oCf1uOxhO2QsLj6oci6qINw2wYxrLG1hNPxzToB6itC77?= =?iso-8859-1?q?RSWFa1Y+24Gj74+/S/jfj/AI0Lw9PqGPknDeyF+OdU8ZMnhqcE/J8NUrg19u?= =?iso-8859-1?q?jUceQqzC3eHnWKc0WmQy9LYjplyG1mTFO/8aH0OMQULGqcrojp2TD8Xxoc1G?= =?iso-8859-1?q?1H57uvUCmc7SLeiaHTo7/Md0GlOTu71zTR0rk9PXAZBL0IW05DGxVAri87cD?= =?iso-8859-1?q?6S9JU1MW/wSS1fEbTEd5BdkOwiN6r7m8YQ7fOJA5CGnvsXuUC+uciV/TIpvv?= =?iso-8859-1?q?tSNn4EY/XpruE9+Kvf05dCt/EDHuZcQy38DK5X2HQJdO3cWsGKXWdk3LyS2J?= =?iso-8859-1?q?s8KFSLstn2HDg1IXBU0vOvnuC7+99pNMfuOaI17Ld42RnGG8G4dEcmLpnODq?= =?iso-8859-1?q?pM8otM5Xt/0g5eGcBeTUqetYVAuKbKo/JoXQLpi7aPUhWwU7pJGYosFlHf4a?= =?iso-8859-1?q?HW7zCOb3ljPC3pxgvniaRhGwZZNvrMmXI5QrS4tOL8XisMvXg0RoMCsgjjZX?= =?iso-8859-1?q?HIht/dZEHCjoVRf2zTfuoq9QuZGnytYe2xqzcKyfA5Fcmfyng7lMsJwIZ/93?= =?iso-8859-1?q?Vcb82ZJdm5MbHSIrvfaGwPT2g4Q0xrRFnEBGlKAcA4L0BKYNCff7FkA6kucr?= =?iso-8859-1?q?gfNjR+eQL7+P/Kw2u32gEr4EHiYzrzgUFRMS2n0xdONx8BmjSpyh8rTJNWJf?= =?iso-8859-1?q?x2ciYZfWLNTyaULa15GRfQVRISXOFtFQJSvfvUQvYQC4btvIYBortbbgvEo+?= =?iso-8859-1?q?3y0TDWWBBVbhnsglQhVfjzh5jrkAsN86m/UAfYsAWJI4Et++QyUUw0P3ut8R?= =?iso-8859-1?q?eo+RxAXtsFTivm54g+1Rij2gJW8tgBrr0h4e90bTyqDesbKbXpCTwwIyiz8D?= =?iso-8859-1?q?8mCNz6LVnYriF8iCXEv0WyJZ+iW6MviIsPLHWAS/S605l+hzSRW8J8MMcPAf?= =?iso-8859-1?q?QUkl5MGdxZYtz4Zv3KLlIU8Rla+uvP2NZsGQqTHICabi3IelYTQxxaljEyvG?= =?iso-8859-1?q?bq?= 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)(82310400026)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 04:32:36.1273 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bfcd3ebe-6b64-4d69-ef9c-08dced9b8f7a 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: BN1PEPF00004682.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR08MB8937 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