From patchwork Mon Oct 14 04:57:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13834152 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2040.outbound.protection.outlook.com [40.107.244.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 947105FB8D for ; Mon, 14 Oct 2024 04:58:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881916; cv=fail; b=USeGDUfLh2InElFCbADDKaqjcEKPgzq15oMLVGafywFzCIfr/h5GGtSz31MZfzBLg6dlNgrlFvlIx56SbjrW4OIYZhtHlG5fTCrLUe7EWvWr5F7/AYZn8N27yjrDFm7YmtGtlaJZHqF9DMvAsCQ7qCNsMNoTwZBnv5ZBK5t4n8s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881916; c=relaxed/simple; bh=FNErLgjRpZhdBNSB1a2jntVthk+vfoGnr0dE/DPtHb8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kcoo2lDSo3ndNs+v/g0A7igjjIHo3IDSlkkzAInyBAHZwGXL51NwQWZlAHmTp6GI7eCxcS64PAp+CCnkr6Qz6G/dtwZ0z/uwmDLZHSCUr7cUM4hf6KaYi8l0woCOLzLWDK2QEBn3TwhE3pMSgI38qy7Rrez0ymleAYDtWqu7aLk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Yy+oURaO; arc=fail smtp.client-ip=40.107.244.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Yy+oURaO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j8tg9l4ly7CBCHvPRPKbw4erh+iM2PI5h2/HYdSLtfPj8HBNiHpDS7ZGLHl8HYvIjr97jo+Ebw+zkvuEn6ELiby2jObm1fq57MNw/ck9x4kpS3LCBOp31YVWN6ebIdVPlTKcOb+PysXVU5xnHvKHJrR2YmiSC7sHcjfoYaPTt/v62FKabAeEUli7ZAbdUyiBm/rxEGZRnuFl07Lnw1DDqlmRg/ccsuhXq3JFw/kyGkZwNA38Bf6uUO9lDIQGXNZPZXtq8dXOwKUSKK3tqKXChtkRNcT58hzFG9c5NQ6r+RoGWUUpTg3fi5Dbxoft8FqLBkGpsztJzhZ+8EKmiTf+nA== 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=8KUWPU14Qf8c7Ktk7MKkMsuz3OR4Va4ocWiSm3ukszM=; b=udp2Oz9FgLRq6pBWzxU1SZnoGHLBgg250JYAFRKuMXV2Up524KsSsHFCFEg1zVu8ne/DAyzlSY0zHKcgyxjEMcVm0XEOV+vTm7hIqFWgeSVNid7Hb4quY5PbkheT6B/U823fnZrTx/D/tmqqt2TwbdhP7kH5pzesecMfvWGw43AxEm54FVb1W0PNuIuEK50HQIcrDgkjl46XaJ2EA77UblrqAFhsxQqE8Etgdxk37Iecij4r1ks0L4B4zYbaCauXuj40/EUHBlv7cUdMQCHTWX2YrkEHQMz4LQGLNlCNCzafqtGIcJUDnryQAPN2J4YLzmfMifSdGT7GoiEAIJbqBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8KUWPU14Qf8c7Ktk7MKkMsuz3OR4Va4ocWiSm3ukszM=; b=Yy+oURaOtrn/Q5VYg+mB3HJNlMalXLNIbpcFxt9B2ACf7JEBbl6KAic2tIuhP5TQ15C6GlQA8PFeu5UtO0sX/oxJYMZUVqRIecmVMv7pxfsppoyfiP5Hu4LimkcOwwcQWmbSfmNbmSVBVIgDyqkAT7OnWSBbCZNO1RTDM4mdBGo= Received: from CH5PR05CA0018.namprd05.prod.outlook.com (2603:10b6:610:1f0::28) by SJ2PR12MB8953.namprd12.prod.outlook.com (2603:10b6:a03:544::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.25; Mon, 14 Oct 2024 04:58:31 +0000 Received: from CH2PEPF0000009D.namprd02.prod.outlook.com (2603:10b6:610:1f0:cafe::28) by CH5PR05CA0018.outlook.office365.com (2603:10b6:610:1f0::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Mon, 14 Oct 2024 04:58:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH2PEPF0000009D.mail.protection.outlook.com (10.167.244.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 14 Oct 2024 04:58:31 +0000 Received: from airavat.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 13 Oct 2024 23:58:28 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 1/5] platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model Date: Mon, 14 Oct 2024 10:27:55 +0530 Message-ID: <20241014045759.1517226-2-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> References: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000009D:EE_|SJ2PR12MB8953:EE_ X-MS-Office365-Filtering-Correlation-Id: f986101c-1e0f-4445-aed6-08dcec0cd96d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: 4IV9ak1/jfaBezDQrcnKwPZMPMnIOhbaL5sZnte3kHq8HkL9fBTEnd56ckpcwFJjJv0v1KI6L+0oDv8qcJ77WR9rGFrLlxa7KCMsC9SqA/cuac0Q3F1VrxXiHWXnXvLC/N5sLLb69Z3inVnVUapiQUC3Feu9bynjyvtPdwYl7rUpTmOy6atX8cTAophIbydNPUZHz8+Dp04eBs5+6YXjW3Qe+hQo5rV4LCt9Fn6AcmgTOymGu/BXcSuJ+68g5OOZ1bz6Xs831YQwtU/Kh901f2eHhKQusP7XqpMpJLxblKItXMsFb0BjmSsrxbDV9wp1jua06xhPY5bpU/DI74pVsQZdyDg0PG/f12G/QiuIMGyPZe73ciNIm/4WsNJGyPkIslv97VR/ApZ3LvHfj++bq4bs7oKCrvDxKHFVCxIP4snxKp+CfjXally4fIK96DZIBKie7e1SFFhYRKYirzPD1TXueyrPFa2sWyo55f+Z/2i7rcpBNe2LLYGrWKnDYSEEgdkgpTGM7XvAo5V5tVEjPcvG+0cw0EwwrepZRVMgQdti1A5oThspE3rqSlIwoE/PJ9b1x/rWZh7nENfvb7wyrlRsdNkjhEyM7pHIzPi/AOUh5p4V1943bZhyKEYvemkQjBK2aTzmZahRrCPQMfXf/8cWV+r1oNSs6UfZeEQbUQRf0NZPZtHPE0fMLCE5ZsD/OBq0SJEyTXz476QzUmpZosrk1PuKsQhv6dB1ZIWHnMo78lpW0z06cnNc+ON0XQ51hkCczv4tvHogMuObGUXOrS/hR4syWQTB30DVbjiMkrM4apYzfrSkkODbjw5gQ8DqMPT325SA9m9PDXekdZcHqig6PeNaw7vxfjq0Z++CIMQZzRMzyiDQVM0Gju+477u0i1WVLCFBCny78rKfF7eE2H8sQkrjvBADIrvJIPNKEgIN7N9buIVG6xzATfIjs3r7vEpEfFAjXRc8wwG0YFDp3D8MH2RqCiUwZ7VDf5xhBlhkUTgvTtm0KPYyYZT9SO9Uhd89M3ErQHVSehx2GZg3e47RlUOkbAcD9FUXu76pYJKSbBpbRAMa6YoZeMqgaXLEnokdP6upvRvlHsg4zdhzzmiSRj/E0Lqtg0wmqf21jAVTdYVdZD6XWyWzW0gLPj8REonJmZLaJ7U5Cwx6A1DtRDmcMgOmWJ4DGH7XFgw47MW75xXeKwN6Faoua5N7Wo6olkhq/k3cQhMIaKXD0cNw7u/Lc/0HJY3SEliV4FS12Vq3Ls6JYKgyZKmvvusFTdu6FW7cI2UdsNmSTrnB0WGaFGc4P2CnfKdaJ7IBlu4UyQ/veMJRWL8FeEQHaRA6MmAZwLYu9o753YcUoIEENgMfP0fFBfBr7aaaxvn3ftbDKJCc4DX/CQp/baoE3KFiuiVQ X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 04:58:31.0593 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f986101c-1e0f-4445-aed6-08dcec0cd96d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF0000009D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8953 Add SMU metrics table support for 1Ah family 60h model. This information will be used by the PMF driver to alter the system thermals. Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/core.c | 1 + drivers/platform/x86/amd/pmf/spc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index d6af0ca036f1..347bb43a5f2b 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -261,6 +261,7 @@ int amd_pmf_set_dram_addr(struct amd_pmf_dev *dev, bool alloc_buffer) dev->mtable_size = sizeof(dev->m_table); break; case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: dev->mtable_size = sizeof(dev->m_table_v2); break; default: diff --git a/drivers/platform/x86/amd/pmf/spc.c b/drivers/platform/x86/amd/pmf/spc.c index b5183969f9bf..06226eb0eab3 100644 --- a/drivers/platform/x86/amd/pmf/spc.c +++ b/drivers/platform/x86/amd/pmf/spc.c @@ -86,6 +86,7 @@ static void amd_pmf_get_smu_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_ta ARRAY_SIZE(dev->m_table.avg_core_c0residency), in); break; case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: + case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT: memcpy(&dev->m_table_v2, dev->buf, dev->mtable_size); in->ev_info.socket_power = dev->m_table_v2.apu_power + dev->m_table_v2.dgpu_power; in->ev_info.skin_temperature = dev->m_table_v2.skin_temp; From patchwork Mon Oct 14 04:57:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13834153 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2057.outbound.protection.outlook.com [40.107.237.57]) (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 510B15FB8D for ; Mon, 14 Oct 2024 04:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881919; cv=fail; b=rgLsxH+QxTL5mMI0+hvwPxT4J98KRRZJj5DuXxHZJ1VJWwShzdLpQVPmx/cA041pnkP1BfaoTd6axKPP4O5/xd21VBAJyUoVpMt/e2Uzap5k6ak+BsCgCKJySBTfaZKVpTMDhlyfRPc1ngHWelDCxAObh/KYrtDflHxIlzXcuRs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881919; c=relaxed/simple; bh=HhYZm+iPGKuDtvi46VjRU3YfuuKhXqJjyF5POXDKKFc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cxh6o4dDxGHNtQY5b7KFhVipNbjUau4e6/pU3g9KRt5SZjpKdSzKKN1SMMybnVZGVSLsVww32pPZeGLlUOUzUrPlpcztwDulyt1Qzsq4thSBq6huqymwqY2XmiJUEaZjDKJMJ2OjNyJcCK6m4Vo9RX2egGjCmUl/k4QB5U/tSkQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=XnWxKUTC; arc=fail smtp.client-ip=40.107.237.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="XnWxKUTC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wNorCqgyULDwPigtIZIrpZDZiboNm1CoRbJyteS7Jno9tW8fGBEmDVvhiMh6Ox2GgM851VgJtRwe09lWgOUe4ZFkhOs/Jjj1DY1+7cKCFvbEujY0LMZCe0+g/hJhgdbJWGGSSTcS/aEabL3WtmRek/9XtNPnWFiSKsy1atlfJPFH5sND/aZBoJrrC2XZuopS0udRCgNR2Vy/sZcyZCdawfOsapO+Sstykj6c+VC/bGGbJRKnTBbB3Io4zwW9MoHcO7FtaCYSBwCrok8quUsIFOcMlyT6V81utIPtV5Ox3v475wMh72a71Kgogo0boBh2vMqaAibcdwZmcVAV+UfTyw== 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=8+XXZVDMc8PhO7hjdmO/cVY4l+dnrrE3jHqF8I8xcCc=; b=xI/ZuWIXHcwr6txMIrB/j/PZ43eJ4dIyeyNQ1OBmqtZ+kwpTZvoXCyB+dX74VMkqD3pP2EqF4alPZCoHIoEH+tywjyr4r7yLcoHzWzFYqWc/Ga3wPOcMXN9WPnBXjk/D5BptKnwnB8w22Vod7chWlON5pwknWrIll0RlkdyX/oDLCFfFYC23GsTELPqkjY0zXwb/uSaCLC+Xe9DnHV0I7UIoVy5AHVPW7YE6YgbJa0V9EgpCQMc3rLiWFeVheuAdRQQxsp5xZkXWtUBLMn0ZzXLrXj9qWsK/Iro9zTrFBqr8Bz1fZwMVnesSn7BOGII38kuvGB5ljgLtfWaDR8X+LA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8+XXZVDMc8PhO7hjdmO/cVY4l+dnrrE3jHqF8I8xcCc=; b=XnWxKUTCayauBH6Kiy2dLx29bJr/QyolIvfd+yQWO55cwZFNbgS/k982l3ZO9HudCs90b2FSYdgggmIO4VnTOqsFGMylmqeaHZ9Sd5AD9TwOwYLYlfsanBGO8jomGAhuyXuAPO+V7GAGNxSP03oMw2eGLfTX2GQz9Ln2PF37iUE= Received: from CH5P223CA0019.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:1f3::6) by BL1PR12MB5707.namprd12.prod.outlook.com (2603:10b6:208:386::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.25; Mon, 14 Oct 2024 04:58:33 +0000 Received: from CH2PEPF000000A0.namprd02.prod.outlook.com (2603:10b6:610:1f3:cafe::c8) by CH5P223CA0019.outlook.office365.com (2603:10b6:610:1f3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26 via Frontend Transport; Mon, 14 Oct 2024 04:58:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH2PEPF000000A0.mail.protection.outlook.com (10.167.244.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 14 Oct 2024 04:58:32 +0000 Received: from airavat.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 13 Oct 2024 23:58:30 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 2/5] platform/x86/amd/pmf: Use dev_err_probe() to simplify error handling Date: Mon, 14 Oct 2024 10:27:56 +0530 Message-ID: <20241014045759.1517226-3-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> References: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF000000A0:EE_|BL1PR12MB5707:EE_ X-MS-Office365-Filtering-Correlation-Id: 4021fff5-e317-4113-e471-08dcec0cda93 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: sCAJbU9anzK06gbWhN3weq9NpDSmI1PRj5Mk7wv9PhrVUhXRHfy4SWnU78zo5qN/cUGyACR8G5TN0HKMFBYK2Md9OOSe1YS6cOidr7/MKB4WAns9HQorAjQAsLzrl0oywK1UfbM8lkijhy55K39rEvFiZaxI6lJs08IR6kCHoWm/qc1Q4aaAaNqthqw9rcDKiSJYl1sR60zUck2wRA8TAP6emd8l2SoIYh1Kbj69ml3WyTY01cOgWVVKIC1Ww4qVsTXCY116mTLKzWGrLW1dNePQTqVvbJN8d5Mkspy1NZzy09sZgG6ZSQmycONNE0ZSFkdvdM14qzxMyWTtmUF2EFBKgdAqswsoPv4ycCJKyRoQRwCAtcpsJ6uGFZ+ks5ATYWr2YW2LIPWUv9d3Angm9SV9ZwjL/gni7BWCUqJL9bebaI7wJUITkb6lTqawE7Yfo/EoVXh7U0DZz86zuwOp4EtPvst6eqqXaEneqA3aflr/1xzLcXT3tFC1V12PH9/8TuhUJQzFF89uIkwOrpcsPTO4SXlcB9R6Udjj1VedbW5+BQD28N0dgN3ByVAKDsfIZsHqNp32sVDw1X4H8/A/pZkYcKM0lm8yDk0SHx0BtPZ++wTV2RbDUTRap6N6EYI0Hc5+b2N2b324oq2BW61u3it72gkWDYPrsbt0ozyJCCObnjcYxtUo/2fgrroWc9mfgJy2VlsBnvvRs4mi2+s8LJq8WOFPx6+BdjSfFA1gGyqCRJk+aZrRy95yLapnrFguI2+djGgVaijBQ8iTqRysS3qOtu/shFQdED9k52jdAJnSreeTAe0DHx+Hd9rMcBAlh2xZMA2/LoUA/wIh9De8O8OTKTpNH3QEZJ7XS9grt2kNEbZxcF8XvaZZfNGvPkcjgPjh6NcfHjRyqVV3cxfEgEUqTtGOPy21rk2l2czVVf3s56l/662Hr6r7VcnwQy+roQ6M1ytcK0H3sSI5VZ+D+2sL1cpv8/knI/U21ah84ZWLJhtMKP4X1rGuG3B8tf5tynRp0PJVTuzow8JOM0JzKRwl4ruI5de1xyzmy/TzpY815QAGIePnR3B5c9wRnMR/H+zocms20IQXcwSVC+9pWDD0dy5TC2l9VZ6CJCPi6yVQPPtl2qsesMWnPVPkm5iRN9sx84632TUDd2WwYxsUjAJCMr++Yp1E6YWPBur4gGzX7Ghcn4rGapp4XLbsvoH4YznhjDzbjcpDmTAYzeauVYYt/O2w1BObamm26hI1lkedpoJJ3NuEqHSqhHvcc69FBO5xeemTgQBB46N1Ch1GzgxZu0wOVZo9K6gkbknCXzXMUWpdIcrTZNAHHQLSu6EEI7h9D+96NupMXl0MwpngSsZ7FjPWIOcFt4iKM2eOFFWf978gyFmfwjlTinVbVDN0 X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(376014)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 04:58:32.9874 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4021fff5-e317-4113-e471-08dcec0cda93 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF000000A0.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5707 To simplify error handling in the amd_pmf probe function and reduce code size, dev_err() is replaced with dev_err_probe(). Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c index 347bb43a5f2b..12c3e929fdd1 100644 --- a/drivers/platform/x86/amd/pmf/core.c +++ b/drivers/platform/x86/amd/pmf/core.c @@ -430,18 +430,18 @@ static int amd_pmf_probe(struct platform_device *pdev) err = amd_smn_read(0, AMD_PMF_BASE_ADDR_LO, &val); if (err) { - dev_err(dev->dev, "error in reading from 0x%x\n", AMD_PMF_BASE_ADDR_LO); pci_dev_put(rdev); - return pcibios_err_to_errno(err); + return dev_err_probe(dev->dev, pcibios_err_to_errno(err), + "error in reading from 0x%x\n", AMD_PMF_BASE_ADDR_LO); } base_addr_lo = val & AMD_PMF_BASE_ADDR_HI_MASK; err = amd_smn_read(0, AMD_PMF_BASE_ADDR_HI, &val); if (err) { - dev_err(dev->dev, "error in reading from 0x%x\n", AMD_PMF_BASE_ADDR_HI); pci_dev_put(rdev); - return pcibios_err_to_errno(err); + return dev_err_probe(dev->dev, pcibios_err_to_errno(err), + "error in reading from 0x%x\n", AMD_PMF_BASE_ADDR_HI); } base_addr_hi = val & AMD_PMF_BASE_ADDR_LO_MASK; From patchwork Mon Oct 14 04:57:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13834154 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2088.outbound.protection.outlook.com [40.107.220.88]) (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 F0AEF1369BB for ; Mon, 14 Oct 2024 04:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881920; cv=fail; b=SOUmYDoC8P4e5vhVBgkgdDXyitRExIxZNDEkRNiNzmakSyF2qfyW5OqdkgMT2zO6Mv3WPLwg04SlCQStGPDBVILGGDjdyw5muKY078QZZCB6H4h8WmJMn+usxNOtWC3NeuhGBx1yLSfn+dduFmTX1It29Z8BUNSvPE0/TJnhmNI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881920; c=relaxed/simple; bh=9XZgT7lrX7GYQbnx+RUpjcJslSwCzl+nfM8cxlbVwEw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iGH3MF23RnzdVnHP/N3q4+jzkJ6i0FseX2f7bbt7WimBHMj1/GWkfL8V1mRr2mgjCWwKnnIrcJnWo2wPutckx4pW6rmJOPV2SBNaofq44S6mujuJxCHDjh6epic9JOEglBS4KoufBWwVlFmf2gph1lOpzyMucr1hagEn7i+P8ag= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=FjmeXbTn; arc=fail smtp.client-ip=40.107.220.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="FjmeXbTn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ov1hOr5CzvJeB1NoYxgWrXpwg4zsXswGlw6pFGZ2zdLTK6RodJKA/bm6cv3C4nytiVL6iyiXRUYyjQqfcBfomoGvMu3gqc19a45ipp+J9ppJ8337MhEJ4ChbnqKlf0R5CVGmN4Rj8dyKbW9uPPog2tb5hxD5e1htmc4p1ROAuuV570Fs3NKEggHwHykxUCsQWQah+KJ8bsql2k6f6Qem2L2Mrvi2owEx+jOa0QCB+Z56Bk3wuV0SUfeYldaZHKtDjulplTE7yQngnjFrUrABA6PWUJzhOSjIU9m3ty3qeOSSem6e4mcXvH7txWDXiHUj8aS3Ub8Zow0P5Au1ggitUw== 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=RFJLqUyXPIYlgDEsXzlB+w1N1ycMU2xIqLsVNosRwVA=; b=ewX2/7e6/tI+w+gOrvvDh6BIMhMMp6m4/e2OkyMM8u1HefPe3uJfnQKUzvGVN4gCGer0qH/XV0Fb9FCCy2rjEbRA5t+nJupOqVrauojyicfxeJwwc6enNwZgrmdaeUaY5JvvER1ag9KWQ1mlb4KROVo5xpcnBTF+o2EvDZf2NInfOLAIMeg79pajRI++Db+OQXEOfufRi5O4DlW14tqCT1+tDRxMppqWa+S9yqcp2oYCoUqwjOwDVBpdYhpnuIIOgov6AQtPgpB8qbNtCpoS63jyB26PVkVG1XZZ3ZZJupvgJA54NsA8jG7tqZRX5bjRh5D1JfUWDO7qaDfOPW40zQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RFJLqUyXPIYlgDEsXzlB+w1N1ycMU2xIqLsVNosRwVA=; b=FjmeXbTnkvo4VNYrJ23KOP41ZQ7OK7Yexdgcqt12VXuYItB06dO2qme5WXE0n0hFB1yRJQLCcEbHZcOn68wXOiT74O9sjn6vf0/+kcWFbE7cah9oxK0F92sIPSnz8EZxhFCJbgIjYUoQh9wSSGC4K4q9EmiKurTm72RO6zojWok= Received: from CH0PR04CA0080.namprd04.prod.outlook.com (2603:10b6:610:74::25) by PH7PR12MB5782.namprd12.prod.outlook.com (2603:10b6:510:1d1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.24; Mon, 14 Oct 2024 04:58:35 +0000 Received: from CH2PEPF00000099.namprd02.prod.outlook.com (2603:10b6:610:74:cafe::70) by CH0PR04CA0080.outlook.office365.com (2603:10b6:610:74::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26 via Frontend Transport; Mon, 14 Oct 2024 04:58:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH2PEPF00000099.mail.protection.outlook.com (10.167.244.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 14 Oct 2024 04:58:34 +0000 Received: from airavat.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 13 Oct 2024 23:58:32 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 3/5] MAINTAINERS: Change AMD PMF driver status to "Supported" Date: Mon, 14 Oct 2024 10:27:57 +0530 Message-ID: <20241014045759.1517226-4-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> References: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF00000099:EE_|PH7PR12MB5782:EE_ X-MS-Office365-Filtering-Correlation-Id: 5782d017-1a56-4e83-000a-08dcec0cdbbf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: TicuIj28gFWginjHs+FzHu7s1NOmHvsOmIlVh5SEpjnMaTsFg9RTmywjFn6Nt/a6joWI0pR289Eejbr5gla56vstg4pvI3kgLXWUJo8rue58W4XgE1BE1v3i87z85zIHyKYxYXa99FWrhqXGTAYkNMmR/eKLd+a73b6lEBOoYlcY9Euu++Wpm4pEofg8VIJTk5Y34KgIGhRL4LxOvCvVx58l0mb/ifgRPkxbiV5tnnryCXDvkUQmgS2OUdmr3W0U5mDvnpiGzdwEinugnsvOj0Rc+PwLRt0zGJHTamcenT31tmfz5kcDML68j7Ix37lWf+qp/7GG4+aHvqk4rmvjef9mm6ZNYlES9FHpko6Ly3gc7XTRTU1EU2wPoDIsPIde8cs9OQI5UK/EYB8KVY7oblRX4/9nCuVsJ7vFgu0WxOT8pEeAzsyWn8cQMLXexvRqQxLQLVs8Ybqp4K1jhE2UBwHL1VEMsJ/r6ipa7cisgQbI/SOd5vTbN4mGiGzmwC2Hi125cvXaWSRTE3cUnncD+3g/xWzVacsobBh6FfV4h5junipah15HDnVtTC6+l0t9xloYkzDeUl0nVAzXitJmYQGm3oM/niNdGdCsvhQYvRjXNCNqR6Dn1L4CJbOFFd8tG77I2jPA+vRw1UkNicYq97jGy0w9/ORDSMZHuZqOyVs/bOFctUnz/0YbIHmf6X/yr4HN96PwHxEDOE9vEwjn3gDe3csCPd4lQs8dyMXumVLwv5fp8TRkrDuEDLGs3iMUELjY5KaHaZ4ZDNRCenwTsUXVdy6918yUxJtnIOA4B/R0f05RHDZjnMcf8/aGu/q4O1XLce7/rpLL4PWs3juZH7RAhf5QAKKsAII5+Q3czdJGIk1E/S2aJ3hdT7mFBWWXD/PanJgOX18IaWAbPwUQh3EY41YE+GnCLiSZKdbcT8V2n/iYLx58/PzZsfNnEWqIy82/w9U7as/3K1yUUdntZui80JejJSI3FOttiKyxD8cV+sYCrFEnGBM7KLsL+YpM2VIMJm9mTVYLgL2S/oH0JkP68m9+C6p+xE0Oy3OTLfJn3UzZuIR6hjVQHf6CJKgYxCpVcAUELgVf06OgBX1x+KsbYJwhj5XRQg+jVZ8kDJ07M3Q5OocjvGD6rFLQPE8/O2ipb9QXNj/vGdVU9/RHrHkUFATA8Aa6mVMg3vjr6AaTLwbPNnz1K8wwCS67OcsBWwUrd4OfcS1mHjIgi/gXTE7wSrULsQKTZC+eCZznhkh1tyTWvobe1ZZDJPTfs00bBawPrr1nXBRfsk4fdmWwECU1GUPKbIBHuu55myCdRBSfFS9PzL3361yXRzTr0tJx3O/jp1rAi4sOjsUICehG75k/cPE2zTGHfebaqebQ1TRsVSk5JO1yFhc4z0/puSIR X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 04:58:34.9476 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5782d017-1a56-4e83-000a-08dcec0cdbbf X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF00000099.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5782 The AMD PMF driver is actively being developed, so the MAINTAINERS record should reflect "Supported" instead of "Maintained." Update the MAINTAINERS database to reflect this change. Signed-off-by: Shyam Sundar S K --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7ad507f49324..c2aecaab779f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1131,7 +1131,7 @@ F: drivers/platform/x86/amd/pmc/ AMD PMF DRIVER M: Shyam Sundar S K L: platform-driver-x86@vger.kernel.org -S: Maintained +S: Supported F: Documentation/ABI/testing/sysfs-amd-pmf F: drivers/platform/x86/amd/pmf/ From patchwork Mon Oct 14 04:57:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13834155 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2048.outbound.protection.outlook.com [40.107.94.48]) (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 5C09A12CD96 for ; Mon, 14 Oct 2024 04:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881923; cv=fail; b=LAjehxS9O+XxeRD00lAEn+hYY+8iUlomFwLYxOMagjjZsx5Aq6Y1iAQXhgD9JN/yEjEVJxPqNFYwbRfaN9G0fbLprA2Ch8BPb5V4Npm8N8eLEEUHTg8T9TYVl0z60HBfCI+Ffa7CKTk4TPnxnEToNxLrbpHSJ+SRgv5IATClszA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881923; c=relaxed/simple; bh=XmHY1RmgVhQGe80sacis1KZIanzQvOIyneY3VLkN9aA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UDaLpjtiuY44vwoHODQXxrI/MYS1O6FSjZeS8wobI5+8TGOsp8vMrnFKpqGmCmf0KnY9ioRYaa8FVvL7iOT6aJVD7gtHqry2Xj1AP76rqdCQaoIJQJJ94TW2PVblFAWM5qJPBr1KAIbYeNGbjEZ6heis8tx5z03rvqoKkoaM2SI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Bio4Y1u3; arc=fail smtp.client-ip=40.107.94.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Bio4Y1u3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=L47p9bbkLYy0PDCpUjVdw1Arq9Wr25/ATzzwJGladtg5srKLyOwnVr1BUHnA7iXcWtXPeoFSlzgFu9tUnpx361YJReN+ozFMuHSd3guhZShxsP3zM9kJ8sSYTyb/qJX5LPyu2iasLsGB6zCNEnxsN33b2M9apMUAI65veMNhFav/CYrO7iMTOXZQtJLE6b5DcF/zfLugtz4Haoh8bAbGSg7CMbroBmHWA+7JPoozoh4xf6YAoUJHHC1A9osvbGR/Dk2dDPC+nJ4/+DdEDH/tLwbU/6qOwClfX1N2JDvd4PATsJlEwEfPeb6e1ny+428p73DhrmQbvdJFGxtmH7UvVw== 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=xx2LV4H55sra7R0mOBSgG89pQL5MStokV5igoBJ3mLA=; b=ku/XontKLIB+QH1Tte3I7gY227JTE9aHop4lfjEk7ftVXRMnY2wdXm+jjjwWEboxU+yFAmD7DMZwiC5YU2P5shGqJrcFbwx7ZqqHa+sN03qM5ZdEz/t0Dg87I6Dt0ebwL8kLzULRbCqBkTFLB8jjqKBwm9HpAtC8dCyn7+Og54Y+1pImJB7WcA1TOzjGk5xFVf0NgRLAkvfWIkAA0nJkYXWZE+MV6I4NYetuZjDTlSTXgKRtYvS9S88z0UAVeVtoxc++zR5S3jo+ZK8kpR5l+qwRePZZkYEnFATQstxRQZQc9Zhg8bdknDZ9FZ9n1VratzxUDb03VJGO2OPM2Eniug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xx2LV4H55sra7R0mOBSgG89pQL5MStokV5igoBJ3mLA=; b=Bio4Y1u36ZZcDdf9bdvdOKa3gvSMdgA4BcMFkA8YaCs1suqISEoRAYB76neAtz9Cy7EQ3ShQJgJbi34RgGP9/QrDhMTA7eGnJ6uTjFnO8SZHdaZt/gCewkLP5cmEU2lJhdK0nmd0+MncuPS2/tMR51+RYpObaD6WenEjhhIOBAk= Received: from CH2PR14CA0032.namprd14.prod.outlook.com (2603:10b6:610:56::12) by IA0PR12MB7603.namprd12.prod.outlook.com (2603:10b6:208:439::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Mon, 14 Oct 2024 04:58:37 +0000 Received: from CH2PEPF0000009E.namprd02.prod.outlook.com (2603:10b6:610:56:cafe::ed) by CH2PR14CA0032.outlook.office365.com (2603:10b6:610:56::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26 via Frontend Transport; Mon, 14 Oct 2024 04:58:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH2PEPF0000009E.mail.protection.outlook.com (10.167.244.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 14 Oct 2024 04:58:36 +0000 Received: from airavat.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 13 Oct 2024 23:58:34 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 4/5] platform/x86/amd/pmf: Switch to platform_get_resource() and devm_ioremap_resource() Date: Mon, 14 Oct 2024 10:27:58 +0530 Message-ID: <20241014045759.1517226-5-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> References: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF0000009E:EE_|IA0PR12MB7603:EE_ X-MS-Office365-Filtering-Correlation-Id: 6124191f-ec35-4fec-0acb-08dcec0cdce9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: yyAF+agYw3ee5lvNTaxzB/YT9MMM3Jsl5TiX9om3YVmYWaUEYZkGtxivhdQ/F8muk+hkNx+DomKzbg0ck4Ah4JS4jbbxvCfAOEbeeC4YwMvxZ2kl6YSsarIpYbnAVygYFqX6cFp5vZcGAYv5OV+Uq8GWyf4MCuNEMsyLB+aP+SuuGoQD94CMpzPY3AtH1Di+8NkZSJl67QmBCvICHq5LNUCvke/INA8SJiqHQPPd6mOndN4alGpX1sH2HMi9KC/QdW3KGlEVc8dXRsKVlPw65nBDJNxfzP5xBBFeHV23jWJrLnIbJ9M+PK9l0OSlYdTRgwx1k4w3etsnc0m4tVuMNlA6UCAiD68W0XDidSUtg5W8Z8KPn8xBShtirheNy94lXuHAPMe2VVWCCXckrvbzRvVZL5u8wFTJ4U8GPx3u4evqLIRy+SEl6a4WZnkcOo0s1FJhrhYUyZdxRhk6WZB09XLgSMrMjvID7TuUFvkc5x0jOiarw4bmV65zryVVjUjfndQtAEuHwgV4nai892IimPtBqSl/mxQw5uMTx+26srVAlQuatIdChzdnSoV7+8rufQFIutN1rm+4ghyteKrsftU1lZXk/amwnk7DW3BzNfzpuF4OALYcJScghh75YRsHVWOsb7ZaFr5CJJejWDx8OKhU93d704HMeG9JTccpdEeOGbstcd8qpDuMi3ol4X8U1kx6CAYPfevIEoJDZpWKu5XM86ubFXCF2n2Q6F/tHgCDLKGr8JICy4KFsvycltQ/R6iNPgP4SFxJZ5L1JvcxJLya+rrIGPSzE95VJ9X/K4pvzjJLJnlsPfJFQgb+Augr4o/JMrC7lln2ODdawq3bRxxNgsYqEMVPyZumuGue3ohANDznxeZlhTNfPtQi1A/Gvu+sBPfXss8MLJazg3JZ1WyJPy1CglGbPafFqzR8a8jCfigZ4K1YkSArkXe1cLA16NhRweTQ19hg+Bbo4ytQLZi//l7ni5QWhh9nMBzMXzF7M3AXh6cMt16wum/br56MmGk34gPv8CgiiadKErVZiOXXvGsT2kOQ/iQyDbe6+P/IQlEY4ZL0YlRqeO80XMBCpIvQPKpBrgvipR2ai8Mq1mSizlWgoaiuaT/3kV5rvYLGhs5apTnhjl8NTaBRfed/uAD9LPWp7n3BTMAnAl614+m7AA0E2kPnrycghgM6cWf2/4FRW5m/A4birTO+n8rYxwZ5dGtgW6uZYOezUUt/b4HjoiTXeZrhmLaI/QaG8b2zagGMFp6wxCZe6qs2xHG1M5cSv4rsGlKWNju2jqkRNTFBUTxzcUbIm2FKXM+wd1+zYqnRFMi1X9U43vuVvW3RexQdFYA8Rpeiza9dXSW6lZI+0gEGFwxnOZ7wJmSZys2eM4ftK0vzrMxNzev9oLrP X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 04:58:36.8853 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6124191f-ec35-4fec-0acb-08dcec0cdce9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF0000009E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7603 Use platform_get_resource() to fetch the memory resource instead of acpi_walk_resources() and devm_ioremap_resource() for mapping the resources. Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/Kconfig | 1 + drivers/platform/x86/amd/pmf/acpi.c | 37 ++++++++------------------- drivers/platform/x86/amd/pmf/pmf.h | 6 +++-- drivers/platform/x86/amd/pmf/tee-if.c | 8 +++--- 4 files changed, 20 insertions(+), 32 deletions(-) diff --git a/drivers/platform/x86/amd/pmf/Kconfig b/drivers/platform/x86/amd/pmf/Kconfig index f4fa8bd8bda8..99d67cdbd91e 100644 --- a/drivers/platform/x86/amd/pmf/Kconfig +++ b/drivers/platform/x86/amd/pmf/Kconfig @@ -11,6 +11,7 @@ config AMD_PMF select ACPI_PLATFORM_PROFILE depends on TEE && AMDTEE depends on AMD_SFH_HID + depends on HAS_IOMEM help This driver provides support for the AMD Platform Management Framework. The goal is to enhance end user experience by making AMD PCs smarter, diff --git a/drivers/platform/x86/amd/pmf/acpi.c b/drivers/platform/x86/amd/pmf/acpi.c index d5b496433d69..40f1c0e9ec6d 100644 --- a/drivers/platform/x86/amd/pmf/acpi.c +++ b/drivers/platform/x86/amd/pmf/acpi.c @@ -433,37 +433,22 @@ int apmf_install_handler(struct amd_pmf_dev *pmf_dev) return 0; } -static acpi_status apmf_walk_resources(struct acpi_resource *res, void *data) +int apmf_check_smart_pc(struct amd_pmf_dev *pmf_dev) { - struct amd_pmf_dev *dev = data; + struct platform_device *pdev = to_platform_device(pmf_dev->dev); - switch (res->type) { - case ACPI_RESOURCE_TYPE_ADDRESS64: - dev->policy_addr = res->data.address64.address.minimum; - dev->policy_sz = res->data.address64.address.address_length; - break; - case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: - dev->policy_addr = res->data.fixed_memory32.address; - dev->policy_sz = res->data.fixed_memory32.address_length; - break; - } - - if (!dev->policy_addr || dev->policy_sz > POLICY_BUF_MAX_SZ || dev->policy_sz == 0) { - pr_err("Incorrect Policy params, possibly a SBIOS bug\n"); - return AE_ERROR; + pmf_dev->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!pmf_dev->res) { + dev_err(pmf_dev->dev, "Failed to get I/O memory resource\n"); + return -EINVAL; } - return AE_OK; -} + pmf_dev->policy_addr = pmf_dev->res->start; + pmf_dev->policy_sz = resource_size(pmf_dev->res) - 1; -int apmf_check_smart_pc(struct amd_pmf_dev *pmf_dev) -{ - acpi_handle ahandle = ACPI_HANDLE(pmf_dev->dev); - acpi_status status; - - status = acpi_walk_resources(ahandle, METHOD_NAME__CRS, apmf_walk_resources, pmf_dev); - if (ACPI_FAILURE(status)) { - dev_dbg(pmf_dev->dev, "acpi_walk_resources failed :%d\n", status); + if (!pmf_dev->policy_addr || pmf_dev->policy_sz > POLICY_BUF_MAX_SZ || + pmf_dev->policy_sz == 0) { + dev_err(pmf_dev->dev, "Incorrect policy params, possibly a SBIOS bug\n"); return -EINVAL; } diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h index 8ce8816da9c1..a79808fda1d8 100644 --- a/drivers/platform/x86/amd/pmf/pmf.h +++ b/drivers/platform/x86/amd/pmf/pmf.h @@ -13,6 +13,7 @@ #include #include +#include #include #define POLICY_BUF_MAX_SZ 0x4b000 @@ -355,19 +356,20 @@ struct amd_pmf_dev { /* Smart PC solution builder */ struct dentry *esbin; unsigned char *policy_buf; - u32 policy_sz; + resource_size_t policy_sz; struct tee_context *tee_ctx; struct tee_shm *fw_shm_pool; u32 session_id; void *shbuf; struct delayed_work pb_work; struct pmf_action_table *prev_data; - u64 policy_addr; + resource_size_t policy_addr; void __iomem *policy_base; bool smart_pc_enabled; u16 pmf_if_version; struct input_dev *pmf_idev; size_t mtable_size; + struct resource *res; }; struct apmf_sps_prop_granular_v2 { diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c index 19c27b6e4666..544c5ce08ff0 100644 --- a/drivers/platform/x86/amd/pmf/tee-if.c +++ b/drivers/platform/x86/amd/pmf/tee-if.c @@ -257,7 +257,7 @@ static int amd_pmf_invoke_cmd_init(struct amd_pmf_dev *dev) return -ENODEV; } - dev_dbg(dev->dev, "Policy Binary size: %u bytes\n", dev->policy_sz); + dev_dbg(dev->dev, "Policy Binary size: %lld bytes\n", dev->policy_sz); memset(dev->shbuf, 0, dev->policy_sz); ta_sm = dev->shbuf; in = &ta_sm->pmf_input.init_table; @@ -512,9 +512,9 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev) if (ret) goto error; - dev->policy_base = devm_ioremap(dev->dev, dev->policy_addr, dev->policy_sz); - if (!dev->policy_base) { - ret = -ENOMEM; + dev->policy_base = devm_ioremap_resource(dev->dev, dev->res); + if (IS_ERR(dev->policy_base)) { + ret = PTR_ERR(dev->policy_base); goto error; } From patchwork Mon Oct 14 04:57:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13834156 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2065.outbound.protection.outlook.com [40.107.243.65]) (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 0D75612CD96 for ; Mon, 14 Oct 2024 04:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881925; cv=fail; b=DlHjESqzSbE4HQ1vjVUeA3Wpfx03+SoA6AvHtTsvyAiX5W0dDT8r8Rhgl8atcHsbqOY/LzMwsOgcivxb1rX3Vtav2awpNGGIGwE+YX5QCm/kHI92eqIHDQV2lQeWCt+K2yyAbl8kzOtiT2Q84ZCw+NgTu+TTCy7ncQRaARkVots= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728881925; c=relaxed/simple; bh=je8fVkpVkgeDr7N+z/t8YzpswML6S+Sr410n06+TBX0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c2GypCpAWdTJP8imqH/0xjpfPHupztuTm0yay50AuZ5p0saP//wg8B9uf92dZgq8GTVum+SJv7RbApBUqSlWOXgWYzaw4m7IonyF2KmZf37kRGbL0lURvshPCq9eAQ+0PrUGsSJUEILvgybOTYousBFibzb5QDgAkPgw3qnRI70= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=ty2wnMJm; arc=fail smtp.client-ip=40.107.243.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="ty2wnMJm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NsY558ZtOdei/Rq6aQ7IpCrOowPnnfDj31rq2HTOqgy+X3XjAiIeW0yLelxHHGDX5LwyZIO1CB4OQekAQrtv9Nb3/vrIZs0oAlKzdDs5rDHu28PGIkN6KFRns4ExuNDBPa2+Pw6ay3DrB/8ZKHcZD1ZmvUbppjN2mIXshUFZFFwp9+D/IEDw06pMCUfbkmePCEbNw3+wqQ3bPvmnsd+HMRaNL01pMGPzdQuCnrLLmSx7zYQvTBYaen7ME9wIHAgcTMmyqqof4FrsO0+w/WAX2rDMK1u5OmV5gFNRcp6OEP68EN2q3Sm1srrGppp8xS+iLYJfAwzLnspJ4ABjPh/cNg== 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=DLo4vz4q9TpTcX1oYkIVPk7XG+r0Obo4aZBC5KDX6o4=; b=TaTiX2jFmhd1UfefbspmTHKuSMlxjra+7KRtMs45DO2LVYgpv5Ru7Gr2USsi7yIi1iktpNl9AHGqZbRb3T32F1MEVpRKcHUgUgSn9BaqxO/KwuP9RCR2E2k7KaWTdy9DQm29oGLLBUa5EszLkE9JYOcbO8nb3DvVctjF6G9UpbeEe5tGgbD2KG/UZPH5rsXJTC3fR5t4q7M1Ac2yIJA+zWaks8PpK0NVFfD+dTy/uFBycQiSmbFOo/J8Y5HLyPCJbEp6nfeqgHH4jlyKAEUqUq3M/Wq5VSyg/y791LzgMVQ2SMD4P8RYh7oBJOo6VO9j0Pk0KKH4e2ZE3nZLv8/Uvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DLo4vz4q9TpTcX1oYkIVPk7XG+r0Obo4aZBC5KDX6o4=; b=ty2wnMJmEeK6dmH6rRE1qcpY0dJ4lnbTY+dfMhsf50d6QKS3YyKZSHt6zyGRNZOH6OSYzzl9r7RkkRBDf3mWVaaOnlhI5b0z+/lfmCDo7XVRuNkSY/iWVI0MUyu02JM3J2CMZupRJmFotqiZMTRH5W6tkgCiTuSlDJfAnp3xfxQ= Received: from CH0PR04CA0064.namprd04.prod.outlook.com (2603:10b6:610:74::9) by PH7PR12MB6611.namprd12.prod.outlook.com (2603:10b6:510:211::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Mon, 14 Oct 2024 04:58:39 +0000 Received: from CH2PEPF00000099.namprd02.prod.outlook.com (2603:10b6:610:74:cafe::3f) by CH0PR04CA0064.outlook.office365.com (2603:10b6:610:74::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27 via Frontend Transport; Mon, 14 Oct 2024 04:58:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH2PEPF00000099.mail.protection.outlook.com (10.167.244.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8048.13 via Frontend Transport; Mon, 14 Oct 2024 04:58:38 +0000 Received: from airavat.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sun, 13 Oct 2024 23:58:36 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH 5/5] platform/x86/amd/pmf: Add PMF driver changes to make compatible with PMF-TA Date: Mon, 14 Oct 2024 10:27:59 +0530 Message-ID: <20241014045759.1517226-6-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> References: <20241014045759.1517226-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF00000099:EE_|PH7PR12MB6611:EE_ X-MS-Office365-Filtering-Correlation-Id: 82d065f7-c43f-4ac8-32b1-08dcec0cde1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: GxHLJ1dNsrQZckJFEWQ9m4dSenN0yh33KRvO7FTn+JOv7ezHJZ4hcWrl+G06kwU24Orni8ZP1tMIF/pYnBifgnOiU2SiI9MVIe4mpwfOC09B+h+dx1N9QoCGOu8K3FRA3huKONBCNRkD+6WeaxaODB6tqsLSlpssyUY6F2Vxw4rPXcPzqXy7v4htcLlhfipTOHyBeoDecWaHsQiE5XvNqGszO1z9eQLuqhYLaOl4XKe8NeDzJNoA65EhFHzADugChGRxugMwPtqW2SPQ+r3YRr5p539Re/1xKcej00esKwxvnxFSzaGE1B1dAvXmUSdlV6V2+uKCLA9bvvIUc0kiJgUwcU33cKv+RzTSta7goMFtJ3GMAjXAnfj6+Gi4z9blHbxwEiXWXdkgq+gmwStczr1RkjlDzdPxTkoUNRt9wIXpn9jdqRHegXvtp3JQjCZXR/iBdgO5fjclBZZDEilKsS+jtT4RubQquCT/+hStaYtQ5jSpI1GdFx+6Kia8LlLcXTesrBLrXP04WjSGhcNx4lzANDgwUFjr12jJR8HUp66s8+J+0SkdTCt5+zDBFR3Yk1Iq0WNwCkuoF5xrIPYPWPMKpoClD1dL6CZ9LjHZwKEnfZCfCZoITkBdFmbUEDsSyOkp/c7dTjvM7OyF4AKvkXM8eRHcComky30jj+MqoUPzxowuP+hl/fuNVMirtTsthKAoS28450aEXR6/lxtvKujOk7UKSlEDAjCOo5qh6zWjcRyb683H1g4ZKsLxWoxA/D20qhgpPNX9vFzpe9gT627+k3F1CB78KUPwm8u7f8iKoPY7ikw769CiXmo22ajrShTktlIL5T4aae8rvpEkrbkytawxdUe7Mnv7vgGYxsHTvEvY4cN7ZNaMqW6+PQpu7VAnRbVhOaepknHFtExHFIDKPOTkAjKlYm8zpBP4PnxObHSezHY67UlnvWshbcv6qoQMC0STfblfX2MsYaGX7rP2CBaBJtC9J5EhHOQIQWrLcahdmMD1sw1lgyhTn+K991E2QdA0oV1tG/Q9LpT/0yGrOf3SPBq7GMCG7tbFV5SKHT8Ooe0rhDuje+377k2P75JClWk7wIyio7CXy0E5d87J3JeNHbLSzK5EAbMEsR3aXt9EekbbWzARncmSTJ+ji6ndvu5DdnEtmL3rrMaP/hug5uPSbR3X+ozbqQ/iGe1nyyre58tXPwnnS2veiypuwjFhpsxJIqkfqeyCsxxaFNFe4zpku67CdarMJu6um7f4qUjbRgQSbF55ruYb/ud2TKYW1BIyuOg8FuSkcUZhrZ0g4O354dYW14V6nB261njzoLGNVtKwP6una57M3COCGjbE9riRmhZpTfVNQVmhdzhZXVIL2Vtj0umwPHTVAwk= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 04:58:38.7914 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82d065f7-c43f-4ac8-32b1-08dcec0cde1a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF00000099.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6611 The PMF driver will allocate shared buffer memory using the tee_shm_alloc_kernel_buf(). This allocated memory is located in the secure world and is used for communication with the PMF-TA. The latest PMF-TA version introduces new structures with OEM debug information and additional policy input conditions for evaluating the policy binary. Consequently, the shared memory size must be increased to ensure compatibility between the PMF driver and the updated PMF-TA. Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmf/pmf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h index a79808fda1d8..18f12aad46a9 100644 --- a/drivers/platform/x86/amd/pmf/pmf.h +++ b/drivers/platform/x86/amd/pmf/pmf.h @@ -106,7 +106,7 @@ struct cookie_header { #define PMF_TA_IF_VERSION_MAJOR 1 #define TA_PMF_ACTION_MAX 32 #define TA_PMF_UNDO_MAX 8 -#define TA_OUTPUT_RESERVED_MEM 906 +#define TA_OUTPUT_RESERVED_MEM 922 #define MAX_OPERATION_PARAMS 4 #define PMF_IF_V1 1