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