From patchwork Tue Oct 15 10:30:17 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: 13836110 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2051.outbound.protection.outlook.com [40.107.236.51]) (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 89AC0146D6B for ; Tue, 15 Oct 2024 10:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988258; cv=fail; b=CQtP8BZrEn2uGDVXVUxyrWMZq4xAn8L0cCTfG9aX5Xd4J4lKh3A3WqMNXS8ll6RlKWASXVKxF+FA0JubPbprEKrgdw4YcRwtE+18r81Qb8515NUkclUqwY6UcFpXOi8Bl/+P8yzxx5FpgY5haNGuDQuNgfxbPvV6wRQiFDgoJFg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988258; c=relaxed/simple; bh=FNErLgjRpZhdBNSB1a2jntVthk+vfoGnr0dE/DPtHb8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oyJCicTp5CnbShn4SC5o4cOo5khp3pnQnMsSPJ++b0mUmoZqE/6gbjMDFTBAJ7b1Vagat25MKqDKY6IqOiuHTUclvimcIJNFXzb/KLBUNpWWCUK18IJ6SxRpqCtV2MMUIPN21KBHhOB2cb8mvCqOEGvh79+skFKTrqzjHCaubkY= 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=q3tyl5kP; arc=fail smtp.client-ip=40.107.236.51 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="q3tyl5kP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pG9p2N/4yOrtrecxdfLxXCKDLaEXAmjYSQ7HQMBeRIS7io/J4zPuzzvuWTr2Ar1JTlJJ5xtMHuGPL34fauQvI5ah/o3//mS0vOfqHAgSIIJKvS7uPtdGPR5YWS7J36AK6oW4QYB7+rVjxzYh/Sg5dow+Bmr8bgYqD+fhSoy+zQnU9oTFpy5MUxx5IQ3T7zrtOa/OUdHxTobW7SJGdumqqypU9p6ITT6z9dxJoF/VU+UlY87/f+vZM+4+mBHE5THKDBP2g5+XwqY91wY8HQjuNxis7lUTQWXkn3uLW/gtBHu2FaJArluwT8VQxcS+0yIiIQBHxogNBjRp6nAmL0NHng== 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=QupwYws95J4CvlctEA6JPE5996m9avla1bCna6hFJXnArCeKqLoleKP+281PV968YdB4LUrCldkK5DevNdbmFF3CCMPFO5DZaiMTvtpwnZtcmJMjZiq+tWG6bhxkBa6vk8sMFVIuYilb6PCqbePKiY77rER0PxrJaV46AQ4od06nrmFPB/U6Ni1lG5pA7PCA2fXWlcAkQk5hggywWOQMijB9gUHxsqgtPiQmjXZAMbQHIlGVVXyAxsY5GBcjo/qjs/C66edsRDOVwFqkgm2V9QkXTozeqxwxwE8ExGCrFW7ZFYo4cgeeX3n7zrHkKczgd+i/U/8jAaM8tZ8wI+gVuA== 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=q3tyl5kPXWKq6xkdbb/bo9t40OakTlVMpjfkFLDboLERkKU30pL/PF6kfGn2iwxUnUi/m7gMyqzp7G+IffFRM0KUINkAoGSPWe+3LT5tQP+Mb7uSPdo0cTBMlNlSaItlUvyL/5+N527xCCggi0x9GrVYIIJOKGJDbiZTHybHKdA= Received: from SA1P222CA0134.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c2::7) by SN7PR12MB7321.namprd12.prod.outlook.com (2603:10b6:806:298::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.20; Tue, 15 Oct 2024 10:30:53 +0000 Received: from SN1PEPF00026369.namprd02.prod.outlook.com (2603:10b6:806:3c2:cafe::f4) by SA1P222CA0134.outlook.office365.com (2603:10b6:806:3c2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:30:53 +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 SN1PEPF00026369.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:30:52 +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; Tue, 15 Oct 2024 05:30:50 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH v2 1/5] platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model Date: Tue, 15 Oct 2024 16:00:17 +0530 Message-ID: <20241015103021.1843019-2-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015103021.1843019-1-Shyam-sundar.S-k@amd.com> References: <20241015103021.1843019-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: SN1PEPF00026369:EE_|SN7PR12MB7321:EE_ X-MS-Office365-Filtering-Correlation-Id: 0588cd30-bb4e-4d40-4582-08dced0471ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: IU6jr58l2iILp4MjmlAwVZ270sPrBory1BAWNs7by20LzJEud9wuMfUF+PLSIvI0bEoAHCgJWjSxr7Auv/AbwLPWlTkzvGnNK2SnJCDR1bhtIGalb5NAK6MLXA/yse9aBZ71EAnmY48iAmUBD+KufTCpZaTLWfgY/Aeh88vCyKwRYZpmUACDrB1sPKrQUexyOoUM2WR720dFg0RAvAe41NRjcD10jZv+qsePi3dg3zD5jfC4z4fpqalPqGDcIcUHDRQg08HNFPQYD/gRKFDp6fXNZ4O3lHIIB1lVgFzlqrC1sWqLngOYyg7pRAvQhxqrEi96PFC+15FXp8b/nZ94VMTfquyXwIn+8ah/736WRnLTNFZ0kBxS9tLHO8drIEhHg1gmlWLEGyarYw9fsayb8uIRsjYs3/nGdBskEQ4S2+oM2qAs45XvIkGYHc0MYoHtZ90CmcyHhoP43j1ilP+hkCdYDW9jSzoH5h7Nv/eYaxP9BAWehvmrC1mw3vd2DQTS03IwjzyTtOMLzZTu/JDbfKUbD3921v9NI4jqYqIb9+VnAyJSlrFtd/z3rj3Qsx8zQZjPKGfTXFHLp+wWlD6pusknFmb8T5Ydq5ASuU2wwQxhl8dZuGqDcPEYOk8e/z8wADyUpMd2ol63RFgXzg7e2auSlq42xeZgFp9F/SbRWZkZ/fGeBkPJ6Lqs7kHzYOgW6MwjAHU0gYTnEN5WKkas9HCbIv7V7UGBGXx2g13A2Ss7uxaMOW8EJXPae88vNacHh1yj0HtRlU/6hcNpIhyzdDFg+Hhfx4FWtlDmdr+U2+NHAKBLRMO/mR6H7IBokSa9mzafn6kDVKOScvB9yHcGmsPvaDycPYYNmN/tKFhTzKpti17vUiWvtZH1fAIK7qjdUxt28nCiXHFZ0WQizhhE2z/L0oFD/ENFgOAh2VUL7k2SunTKhvGxJdpAVBAWDrGYmAu5/bF+fvMsPLNDcuAy9wKaSbT3Qcl1++5l8ANfkGWgZtL0JPsFORcZGGY2YRqFbVPv835tfQpDeC1g4E9TPNNLdbipjf/6qYdZ0bngoEaOY2/+t4U+U4QsszIU489XnfFV97mZ2P6oNSatyb81aJcaRA3IAP+DmfRkZ0nM8S1LWbX/IDheghlk0a8R4bBD7J8dZWEq7QVNX3LYsgOlr6bCYH9rfZGsqBdKSw1x6oVizNCtyB8nQlw6d3gWYyAR6BektvqD58jAas2/N30PgqIeBQMU64AxoRfFb7lpPiCKuCYHNnFu+VhuqP46wAxVSQmMAm0seBetqN4aE3bVoTIWhCafCgQadj5tx+53f+Rj18+FiGgejTeWVHgsCMjPbOIO4H/xV2JOSFh3emVwIr4GQ+1AaKRPg0p6UtMh7wEomHjVVqV6wJ9ksx70G6eX 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)(82310400026)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 10:30:52.6013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0588cd30-bb4e-4d40-4582-08dced0471ed 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: SN1PEPF00026369.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7321 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 Tue Oct 15 10:30:18 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: 13836111 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2040.outbound.protection.outlook.com [40.107.220.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 56BE41F9413 for ; Tue, 15 Oct 2024 10:30:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988259; cv=fail; b=ZTwiDpfWr41LJUuFLn28bltwWYCbvyQhzD1gULSPChpfdugq0kwwnv+24s7AzFRdDXHyGegM8C3Dv5Jll8ldhiuEc3OBbR9nJF8mqq4Fve9ZiOigWP8DsX9oZAFs4vuCPj5sYl4S8WN41uieP9l+bBWkggeXHsb3q9DmvcTHxX8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988259; c=relaxed/simple; bh=HhYZm+iPGKuDtvi46VjRU3YfuuKhXqJjyF5POXDKKFc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=T10WPaW4SSCKn9JCdDxV0IrcU0aro7uH3JOXun/wWRYMsDGCmy7K0aCFWJcFDjWEt1OjDEoWNzAOsCKdY0k+0SDl3vWj1UngbNsrEv5yrGNTQA8b3bXzAT+Ez7Zdjjvde/9zjdI1G9cWzUJifB0TjCM8ZQ3UX1mY/5W12uuvzMY= 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=ONOQy4NV; arc=fail smtp.client-ip=40.107.220.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="ONOQy4NV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vugmAMs+jjnxZCKE66ArTkD/96c7cXNXoK/wLqE4UASg/8p7A1LVsKeEb412TjJpC6QsFqWkMpP3ZKo3r7Frs0/yDIue5aTQ4ckWle0YjIE8DmD8C11QSkc17KmDaYnVRl6DBM8YPk4C3QqARG0XsB8ypaehIEG7TgaUpnR1dULq+ah0T08G7DFGDvwQX5BmjTrHaZfXnMAJhZWDcxt3UZ+EKUI9Fegbvb/rIfoQNBDnu/UuBZWfF6mudbgAlSo8evvWmxNffOtaXoMsmUfMxQv9PajmviN9aeFGER1Mhs9TgbrYtBpnJ4tjr6oI5qc0zy4ckNkoB6GviTml//CNDQ== 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=xsUXGOiKYaKTYimpV0E9PMwx2yP8RtU51raPgjr/0n/wM2HLVSZDSryl2OLLXYnIIcktSsIMBP/wkDO/J00jt3DcBHzhCexGiZARaFKwhf6LVh3PymgzZW6xxJW+sSQtSHtxHBiBXTinag7Qpu5c+HwBRP6itmD4xqISGFZ0R3ltg6KJappY9ej5XQL5GUw0CL7fIb8TdAvQ7ZmyAVrgLuGNGszPG7KXzEPBew6JkLxLGXePA7TYE7lvy6VMMKDEmDzoWdkU5leI28hOtTYSeb9ARPQf8O81rf5RaIre8lmCMluyqvZm89AnHhI/9LtE1VTV5o7cs0tK5INb32yawA== 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=ONOQy4NVA2+Xi9+HhD6eGKTRfbiue3naMP09JuMQpy3oIhcbVLxkXpy/HuRSpK6wfJIT2kyF37NdH6xVpMWyZ4hDxx/HQ6YsRiymCQoeJ9hj29CJCEJSzzmvi0emPJ/ikIfkNA+KAQTdFHXKVVJV3FK3jzpMsOWp2tHzWsNviTo= Received: from SA0PR11CA0204.namprd11.prod.outlook.com (2603:10b6:806:1bc::29) by SJ2PR12MB7963.namprd12.prod.outlook.com (2603:10b6:a03:4c1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.24; Tue, 15 Oct 2024 10:30:54 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:1bc:cafe::b0) by SA0PR11CA0204.outlook.office365.com (2603:10b6:806:1bc::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.29 via Frontend Transport; Tue, 15 Oct 2024 10:30:54 +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 SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:30:54 +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; Tue, 15 Oct 2024 05:30:52 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH v2 2/5] platform/x86/amd/pmf: Use dev_err_probe() to simplify error handling Date: Tue, 15 Oct 2024 16:00:18 +0530 Message-ID: <20241015103021.1843019-3-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015103021.1843019-1-Shyam-sundar.S-k@amd.com> References: <20241015103021.1843019-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: SN1PEPF0002636A:EE_|SJ2PR12MB7963:EE_ X-MS-Office365-Filtering-Correlation-Id: 050e4db0-ff6b-4194-4ceb-08dced047334 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: nt1zumWneiTQ+haymZf73KixEKnhz0kPKhQ71HePgkyOts0ope/+MC4YuZt95ji4s5m+aLBOaSE2zi7cuT6pTAcUym1rXuF4jRjNvWOUQ9pdPhX6oWUlh4trM7nE8OhjBqM2W7GWuaIuJ3thmROTnoI86RjTushJm1vQ3hdMDP42fg93NCMGSkBXPSkV6zvPhMtO+vIGe7X7LLUxea/zfv3upz7xjn0haZXD6YoBhbNficXNYFXktxy/zF8QxmBygScZEjIfjvW5uarke0GdJ+qQDTHIEaOzbm61outv1o4eT7f4wDO1ACFYrzWwvFn3xcHmXy7oPJcVtX3kpQ4N/RAmIiwOzg08msA02OtsVeq6qBxc9n3DlkkUauTaNr3Jtfarppsy24syaGiDbnhpcZMJRKNnZUNQGelbcGx22UStOLjpk5aALemlfOfM3+E4OURFY0VII+07z1+zq97ySJvzwwLDB4lslDtcIXtDKTtCz65qUYDAhrBuIh07hoQVlnijejmzmgJT7LftFYmETC2zr7I+k47T+oz+y5k93z9EcREoq4Qnt9q1nPFN7bkiu5n5IB49GI49h65I+GHhp1ncpkzVBpnCCjWFtA6cBBTHvj72FDbOak1Aotz+4G/oIBYpcwRQFVBmZf5zfPJD4xUy1z6ROgHvzbKBQkNzXt9BXuEQXosI50ewZOyJ/BJEgC28z+Wpe8qJ2gUauUJeO7x9XfbgkYs+PJvHMeNVI3fr/9h4OV12RXtA7FoXL2sf9EDJOYCNn6hVE+2tMmCh4QNbhl3BiGV7zeuCNiX3/ZeDQqNEK7FI0+lK90HEVjVD5N1TQ/Cm8OiWU4Be6ewBPqNlIG3RXvR9exf3erELVCcpc6Rd5oItfVbldfPQoLTUgiEFHzU5YbuKEU4l0Xi9aBw/yRPBjjJdFOkV5eGTft6ZICNL9Q+jkbNkIhmq8P+OIyHYrNzzwQ+yHD7TZbaIkSJuU7A31i2Gfn5ubnEcwW2uz3DfnZpnZ63aMqxUXbQ53v0bnXBlixTBhTBVWF79jelrgzP3AMHN6zIkO/l0rt7ra/4DGCWQbdfja9IzmEUXQ1NUF5aoByF1ho+6wmV7/U0JLrDnahe6c3DffZiMipfuUOEVAZjNrBF5+WFEnA/4PSwlF8hAqVfE98w4XNchPNFiNQNJsWlIlNTg4B32xId3gjdiyqdCnUjsJvmzZrClrWvvFLmpvU2JIR7KyFnKEKdWnrdHg+xI6x4UZpaK6nvB9yfARkeovWF0s0/Fpt/+xDJIrbqwr42efwVd7NboN8D4lkeYy27PTalcBrSKEXaLXW7n6H/doGHCaxSNIhYqGhQDQELvR3RA3+BDGd7oHKCEVI5+HIfcOsqkAwQSKR0+eBYWlmxERJAdc0ZAhGPI 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: 15 Oct 2024 10:30:54.7446 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 050e4db0-ff6b-4194-4ceb-08dced047334 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: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7963 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 Tue Oct 15 10:30:19 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: 13836113 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2074.outbound.protection.outlook.com [40.107.237.74]) (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 CC628146D6B for ; Tue, 15 Oct 2024 10:31:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988265; cv=fail; b=sE2TEGojuL5yZF/WmbUR6qQQhSncbZeStTJhxLc68Z7T/SSyaCBaXzJwmKzg3be0mWVTYGfdePJo+DC0PVQR9xHXM72bt28Eiz/sRiD8D7D6exUNke+sGYSjHcXOqMciezcUHMrHztnQPG6aeZwUznI9NNdWMNq0hLD7Q9HgX7E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988265; c=relaxed/simple; bh=9XZgT7lrX7GYQbnx+RUpjcJslSwCzl+nfM8cxlbVwEw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pCJgIUgOYBocQbwVC9eP9TLiyooYaMDei+RcRRyw7zdBirJKGqetARAl84gBkfAnntHtUHtFZpc4P5BjY/4LidWz/zRqirSYns+r3DCmHbpexbr1dWVs0hon4rR+uT7ws1hzn/qnVZ1tU5gfOGO0mKltxQR1mZj1FoksWqs0i1E= 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=bGUvEXiT; arc=fail smtp.client-ip=40.107.237.74 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="bGUvEXiT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qsxdsiY4MsWNN3fKVdk/tsNL7vBeuakulcdaMGVkQkAJM0Q6AIF8PIOKxNdc/N4mi6g4U+ba8t7Z/w0MH7i8CiBoEkggcrgqmSfnd7Y7TBSpM4xoKzmjFoLj72W84w6+6pqNnGnmeW4oWE5BKd8tufNnh0g9om9yD1c5ntM1h+aA6FS+Et0E+XnGLORKbqlEjXD57HWnGhFxz4QpGtDGk+yphXtZ+OLrv2Xy+BoWOFqguRms2qVh3+RGxa/R6cfLVJ4iva0yE9pIQ75CED0xyJdn5lOlOb3x+4xndYP3wPZ4W0RCGpK9MpERgUHC757UIxRaz8lWWuSMDmvKe1PuFg== 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=zH5iToBloVwDLKvzuVAgR0nNL547Xh4dvX+DmoC88SerV+uOl6Fp+eDXefjDphb4I7Oz5I6ELgic2aGO5+hd6cdeWQ8AxFBqcG6naVUT5bo/yKbi32D4AFRV/oFOTZbHuH6SNEtrg4mA3pzJe0UEb5zkren0e/lawKLLpbgM3IPCRX24w9f1/7fMBfTFig3BDx8OhcASDRrkCG46VS0EGBt3TxKXbevjNDqKCZElOAb3XYbaoqaFmWU7f2lewPqhynxT54d9azFm1/GHgJVHihkEcDR0OXX5s4H/85J6BQlW0cy36mGz+2+SOEnMJSxZllF9cTgdvsrqZpYH7LA3gQ== 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=bGUvEXiTIvmA7brjIXpAsSNBkYVRtSdejgn++n5N0qVI22iUmBhmqeMJWjWfOS2c0mCOWHhKIqtWvx9pMV6vS2USxNJ52/xXONDugRrJiJp629uRW0eMnK/jV7FoK4YGn8x/JobQ7nyKtKZ+dH7Io3wK1HyH7A1unzGGShT9KVg= Received: from SA0PR11CA0182.namprd11.prod.outlook.com (2603:10b6:806:1bc::7) by IA1PR12MB8333.namprd12.prod.outlook.com (2603:10b6:208:3fe::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Tue, 15 Oct 2024 10:30:57 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:1bc:cafe::37) by SA0PR11CA0182.outlook.office365.com (2603:10b6:806:1bc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27 via Frontend Transport; Tue, 15 Oct 2024 10:30:57 +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 SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:30:57 +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; Tue, 15 Oct 2024 05:30:54 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH v2 3/5] MAINTAINERS: Change AMD PMF driver status to "Supported" Date: Tue, 15 Oct 2024 16:00:19 +0530 Message-ID: <20241015103021.1843019-4-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015103021.1843019-1-Shyam-sundar.S-k@amd.com> References: <20241015103021.1843019-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: SN1PEPF0002636A:EE_|IA1PR12MB8333:EE_ X-MS-Office365-Filtering-Correlation-Id: 65337d34-1ad6-4aca-61be-08dced0474ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: zmAKY7tmVlHAzbpVIfifg8bpTFpEl0e9VKEiOcGAQz5v7Zm8W6lWKxs2PEbcVuqfV+5Pr42J2bLQ7la563x0auFI/v4p5q2FEl/vdmDcJddEFhU0bIv/U3BOglxiNeKuvpNA6FEiV20tniereccRW17NghGhOkP6MmAJzswo7VGsWQPGuEBaqq7xYHoxn7a8Ka6IUXa9p/Sd58Z1xA34mZPwbnqPZPMVMyy/JE9ddejj04E+Hm5ixV515YBl2udSWeYXw2Q6UNpsQ01c1ibBNzh16PacHK31Elj6hSqDEf9qOUdOYUV+KuVwuOG8MkLzTmzTfs8Bemcaq82CZ+uC+jxpCPMF4jXY2dvEByUxFnMouTRPgUJ9/dbywSefxcFeKkklTTC17JgflOLJPV/IED8NjXNr1rFW6b4I45n+wiUHK/j5uZ/BvSmbYW8e/THal+nisN+rBD8S3XAStW8I11DRVY/EWcPUACuQPlxnRNMccSmT33xr7KRiqxNBvmd9Chfi3S4rWB+ZwNSm6bs2B3wgpPwkUS17Voikwq0rTuE3M7boHIStQivvhq7Fxno4zAeAKjW5zSQeEsFhbekNhQ8znEiK0K9642AjqxH16z1PnbDIgyTw52awPqiOBuu3r9G1jxPfmMy6ubnHztQqULqll3++wpF53RfocuMLM4hpsJO+kQvM2I9vgrKDE+Giy0+zi1GqFG08eu+ppOXr5mBne0j1hW2iin2R/5ypTyPn7QWn7Cy6I7Ef6Zf6UMeCeaDs+HGbDg5BthUT4IQEKsondXD35vNGtJQW7046Ga1anbSeFn2x6JYQ4W7EX5ivDEqAJEo3AUNWAD9rVNmudNoMq+0Gk/d4TDR3VNoQrBaiAE+TcUuPWRntfyzn8jrcPjBUpLM4St4atl4YjP5Tcf4tYpxQsaA1Wi00HCvivc5+bqpv61Ow94HSevDYg3GIHbce8U5BEDHClc71AKr6Moj3VNRNSfDNt3GE3mPHkYckhyeMF45Z1fTS2JfaQRrrM9F08AABjR4m2l7QV/ZzSc9GLvSlqpd1/t9SgR0ahJE9LV+yjvz7QeWvL0mZ4f7ncmZraMxYsH7fiFcErqpsYEHTfmUEcjfhRVbrizO0PLY7+IFcjfZnU3QoIlAX8stHX48G2Jb2STJrPZasXlPWpdRowLExgK0Ox6EyebIvsJajIt0w/1/uEui4m9T6hz7T6yuc0BezvahDX+L3v0dLlVz/p3BxFjp8RbajiJpLCh/HXvS7AxISvUDhoIJDBVvfHRno2QlVMvSX/seQiUcP2LTNdJRz5phro7EL06qu1Q0z68pSeeGLcjCgcwdQOVfgYwgBTYhk2D6jNdKUQ3nODymY/BxlFxjCntQ29OaB+LvRxMAfe+KcbkjMwWqOznlR 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)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 10:30:57.4164 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65337d34-1ad6-4aca-61be-08dced0474ce 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: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8333 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 Tue Oct 15 10:30:20 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: 13836112 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2064.outbound.protection.outlook.com [40.107.237.64]) (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 A6EDB1E7C1F for ; Tue, 15 Oct 2024 10:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988264; cv=fail; b=OKOayt3qkBlVJIzTrK5bVOKz2avayhynJMp0xa8ozJLbD1PZ9dFsGe0tTn4AjDk0R2/lePlllUqgfNIzQDDvFgMK5vxUyo3NmgufpYtKJ/aOFLh8O7ZHr8ea0nQ+Erw0w9raiseOXFEEbBAckoqa7gZnJ88cQv9s8pNuI92lSRs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988264; c=relaxed/simple; bh=Jjn4areCX8F2LOI89S9CncZSowVC4ROcfEVG2DgGkpg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IlvoK3/eWTCe49mOxRGPyYXxD3OnX026TVPAtGHblDdUKPtjQnrKzat2VXH2QaRi4At7onyAcJe+8ZcQeboZ2FQRgsvlSDRbprUH6Us1zK56sC1fb7cDRtUDHUYfetFQMHbCpMOb8nwxEmofAnjgbuzQyKGdWl84qfU1k5Ir41g= 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=zyHwIAsN; arc=fail smtp.client-ip=40.107.237.64 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="zyHwIAsN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cAXYp3mf7fHremrGwrvzYe2RxIPOXnGe7SyINTVvtD6Uj1LCBGO6jTkpEhJw4IjWay5ivoSTIVai94R0Eo1poMp7dUUptt+nKUdvhFr/r/8AqtapZkHmrtQU1p7Tj5f+YhgPV5CM1PqEZSyPydNMFFb0JI8PQZMWo/8k305/UjDLMU5WHQLJ7JfV1/49CZCl6R6JZ/KWUkWcqFPR1kTlI3m5gUc2o+shPcbtuGHJBp/7nc1uavco0UQC8Yz8Ld/Sf4t2APpQVsqp63E60cr2TND35jHNHP/66wtgbafnPX1E8fyouzt94wC5rcO1/QS9Reu6J30eA07IEx2oIRMEqA== 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=Kh/9ZrDeR5vTciBa+zkWd+l8hp7wM7FrrrKdpdt+rXQ=; b=YYMIBdJQC+2l/z2353hzQmAh5ZQj0Y1V4pBmSf76ZTzztuG+EoxSzdS/rE0T/Nq7aSS3yJeKTnkM2m4owrxrqqLSXOwYhpTEV/m9zSl3SWcXS6r32wyz0e+EP1KnNMbdv4pdQprqHEmWaKFzuNFiJMujS+CdM5CejjMiZY/BCHJ1kHB20q1/Jv7BREaQdQf/u7wrCaxImIrbpHo8hmSmRmgnCF9DKI7CmOLcLAZNQp8bAWIEDJuo2HJeYrCJV/CRGxu8ZhneeRFdwrqLnfYAUyijMcR/FsvUF2sK982OFba/cAZ2uhqU6Yol5e9q0n0G0/ArmyeuAnN96EsRexVEtw== 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=Kh/9ZrDeR5vTciBa+zkWd+l8hp7wM7FrrrKdpdt+rXQ=; b=zyHwIAsNXfTrcSkY5JN5yr9sY5rha5rPivJHI5tUz4bz5TiyezzbxU9Cti6nL3QaBEBpdKva6tB4nbf1QA5lBci9s2ybGMHBFfeswdJH6AFhi5WHSFET13idSdaKHMEb5VE+a0aDGFufxkryQhzKpEhWYMobSEVamcMbEob+8+4= Received: from SA1P222CA0109.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c5::26) by IA1PR12MB6410.namprd12.prod.outlook.com (2603:10b6:208:38a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Tue, 15 Oct 2024 10:30:59 +0000 Received: from SN1PEPF0002636B.namprd02.prod.outlook.com (2603:10b6:806:3c5:cafe::db) by SA1P222CA0109.outlook.office365.com (2603:10b6:806:3c5::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27 via Frontend Transport; Tue, 15 Oct 2024 10:30:59 +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 SN1PEPF0002636B.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:30:59 +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; Tue, 15 Oct 2024 05:30:56 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH v2 4/5] platform/x86/amd/pmf: Switch to platform_get_resource() and devm_ioremap_resource() Date: Tue, 15 Oct 2024 16:00:20 +0530 Message-ID: <20241015103021.1843019-5-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015103021.1843019-1-Shyam-sundar.S-k@amd.com> References: <20241015103021.1843019-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: SN1PEPF0002636B:EE_|IA1PR12MB6410:EE_ X-MS-Office365-Filtering-Correlation-Id: 23ff06f7-3430-4d8c-488a-08dced0475c9 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: h0/2N3DZT9o6GuroZyE4xibOANzHqIrjEGtZlyW8vgCYIa6Jb/KxHGi6exLkMTYBBuyZZQmQWZRlibdtsY2Wld6n+t9oOMEImGHZ5XwLCMVMzhPCK8XRowBgw22utTqvPq3ydnyuEbEHI/GxEVc6c5W8n2FKga7GZVXkMSKE5Y8jQ9Ehf/buklql3/yhKHyEBUd1urBnnpLv/n0WY9RaiEGW2GuCyW0Ca56rYBuLw3DiQGMnDTd3cqf73pm64w9rwAocRMnVkbchOQHWAgjrscutke3H6W56Ufhzb+GAFL+FLWZPHoy8Al+EhbhcdJ9i+1MZA7Numc5+Hs71kJVzcs/6bua3WPb/oWRAR/2tOhVQY+xTAWG/vHBtnEH9hGaAXjJwskbqEQ8wE4vNpGTO5Nq6h7g3JuZ/3nHrD8pmNMa1bHRTbv800NIhgYffrHHWe8YFcwgWr76/xAlB3FZLMbCgj5S3Sy2JmdukL1yODvOVoE4IoNuOHgv83GwwQuyB12F8U5rakEistBCVAV/li7cXd9xzsVQUxF3eb7T2958gW72Kve2Ou3rwqySgWNF/Wj1DmyKuVu84dFVKlJ/pUftwUzlxwibP71+KXJaFewZ4LqPN6ZYOstlBDTYWqVUN5PLbbt2SgwtX0/ax1How89w3kCExVqksj4LbzZWIAKm/FtvnBvKBMxsww3ie45aLQi2af5552daonXMxm14Z+phnXLK5CkhL4aTg1Wm6wz1ImawwKAm5Xk+7Y4mB8ldhuXTqOgLjqn8GBZOI8/Fd+v0Jf2ApJFQElTSawAqLvIeOlaH4Bui3f+79n1oWS6qDBumgB+q7EgBIpyByp/IKWIAqkJCrtcFVnLeq8HOuGCRBWzth4eo3LAeBqQWTgulYCucggtV74sqkwk+RohowTykwdAnbr6RE6oaKR7QT3cf1xP54NeOoUxY6Atcmmc6XN6oIo9E0kc5ZFK8ke6hAxJfwAkk973K0/uzQGfhxhPH8UzZ0PfyAYADtyZ7N0WQYIXOPdgdc4p6Wr5cdVcNiH7grpkZPaPwMiNi0UvAHnScUcmpM8K13KrkZMpDl27JhvwdXCiteLnfz6EPVlmWkufNfNvAZGNLgoyRWR3trVKWIwcEnYTR0VtLNGnGowNfRB91U21XaXGcOU3436LpYjNcc4oJdX+XrKtHl9T3TC9BycZkLgdN2GzmZLNu9e66WKgfLG85oTRv+GnKBrAEE/85exEBFo3cvWXnwV98Qx/RQkBZ2y/JqnOFEtHEGM2+K/W/1sfn4/h3qPMQZ8MwEK8y7Olw0bYcXorMKbCFPHozVhfikEtAt8UhSmC4G81/dNF09om8Jz05h5GuIwhZC5fa7CaO5zUQOIDtIt9QNF0+3lEFlEBQvZiSpik5Z/NvV 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)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 10:30:59.0764 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23ff06f7-3430-4d8c-488a-08dced0475c9 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: SN1PEPF0002636B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6410 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..2d871ff74fa7 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 = pmf_dev->res->end - pmf_dev->res->start; -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..555b8d6314e0 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: %llu 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 Tue Oct 15 10:30:21 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: 13836114 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2043.outbound.protection.outlook.com [40.107.220.43]) (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 07E7F1E3DC1 for ; Tue, 15 Oct 2024 10:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988269; cv=fail; b=DbNPyq14fodsbrQRfnNwjAljBeKQq0oLaHpPbUwWcoGnxChbbQxZl+a42TcDiAK/mptM8lu4WSZK+m5Y/dVFE/Kl5xwf48+OJ3Lalu+lyv7YNy73NEy+MS988HDv0Q8mW7wwVE/aw3aWXIzRk8e+UApMhbq6t1jt8RK+SPprbQA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728988269; 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=VwhAhtiG9DJurDxROTUkl5fc/l1lxt8XbBnyHJgT4eXVVjFvNm7TM2QFIyFfTR8ozz+fcRiSg5wW8jP2DI5HS+3sbKatLAg18H6HAKGmQUtMpcl/AdQ6IARpLlC/SG/GHrdwtGS9Nh5z16Et9dj7z/6xoQ1ZJwO7aQ3o0vnUPLs= 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=FX6g168N; arc=fail smtp.client-ip=40.107.220.43 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="FX6g168N" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mAUxduMMipMITh63cweQIyrJNHhErQ+D8VKbwytkLRBgyMf1XCLr+jbbfuR1LlXOtckOsOJFyfGkUDMhNuJ+bk3Id54zUZPWZGTDEHHbtdn0mVFlwBLE3ltcxgHQT5EW+rYlKI5S1BSgixnkJStShkgK3ch0ZVBwbffNcEmqD46UlNri/gV7cbUJjcN21g7SyEQhGHv4pyAK0NZpByQP/FjsO6975LIsDU8TwPGOnCrhHOuuNRR8oSj+HTYQCm2DfI2HIaz0sFzAr0khQ+Igjik8YRTgBewjfU6CPVwFWkjrU1gHHD0m7nr2mrPGc5l1HIn0v2xY1r/n3uJmEF8q9A== 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=scNV/WESO4TdLTL29S2f1MQqjN0CXQf3rkGsQVSpDPd2mbR7W2qqsn2uVaBH5mc2BFt7sq/+LVVPQnI8yW5mQ58oQ3q8jt1UWX89hTb+fERJpL717Q+I1NRy56gAbQNrELg1tOkzB2SJROKmsonSIBS51tWd9xogtmkCY0V0yG5sbZJ0cLGPYoB7Llupv7HYHQLVxdxk2MuezzSNr3sSx2fL3To4C0WRRvVHEpHAhSQuD9uauhMwODnDmMQUAzrCZkRUleOTagUv0sutu/pluzv9o6nByrimHxGt1EEUuqY1vae3Y+h0UJg2WpAaqDMSm/k4AApH66ZApdDorDq+WA== 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=FX6g168NmnkNBbDv6fmDKJ4ayRRLtDUOu+LKS1+coDoJ4gxEjApO9DPLZrFW5qJwvRz2Z910kzRpif0uU0NnmI9jfYqcf56KMOBD9nta8h/Wyb4hIAH6FHsLqcBt17uoF3jX32JGMX3FNATjGFj+4gxURRU2ovEzD8KubGg9g3Q= Received: from SN4PR0501CA0046.namprd05.prod.outlook.com (2603:10b6:803:41::23) by CY8PR12MB7124.namprd12.prod.outlook.com (2603:10b6:930:5f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Tue, 15 Oct 2024 10:31:02 +0000 Received: from SN1PEPF0002636E.namprd02.prod.outlook.com (2603:10b6:803:41:cafe::b5) by SN4PR0501CA0046.outlook.office365.com (2603:10b6:803:41::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:31:02 +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 SN1PEPF0002636E.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8069.17 via Frontend Transport; Tue, 15 Oct 2024 10:31:01 +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; Tue, 15 Oct 2024 05:30:58 -0500 From: Shyam Sundar S K To: , CC: , , "Shyam Sundar S K" Subject: [PATCH v2 5/5] platform/x86/amd/pmf: Add PMF driver changes to make compatible with PMF-TA Date: Tue, 15 Oct 2024 16:00:21 +0530 Message-ID: <20241015103021.1843019-6-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241015103021.1843019-1-Shyam-sundar.S-k@amd.com> References: <20241015103021.1843019-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: SN1PEPF0002636E:EE_|CY8PR12MB7124:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e478a43-1084-47fb-4c85-08dced047782 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: tj7e6QY7r6WjHTWMaE/ScOVOiGaoRRG7WC/FBRlXp9OW0p2LdFSmKjDwA1lrfJ83nrOGN4CsEXM4xTl5RzBqnTyZjjZqXRz19nEnooCae1ROrNCLpwuoCY8IhjX4QKXi9M35Gyau0K4gJo/LKPTLO5WonkG0N109XMVdVR590E8mxAU9hcZSqKSZHtnYMcAO3zpC9YUkZuYpRYaB8fLdaMU7rj3du8qKwjmc2nvxDzTAcWdEtRUWoceUR+bLVFbDfckmSt3KW2V7UpN8SuJlQYWVyPwwDQVkrLc4EmMRsw24ScwAaO+BJx5UAZFXg+aqP9ESHwDTpu9LhYw9eqVmSC8+oBwj0qzYIUvk4MUW2QH6yZAvFDTX8nVytFQzLVdHRxL+nFSjSmB0Bk7N6WGRce9CjNR/lpRN1av3uy3sjyGJ7VvvAzOnzHE0A0fuZGWspq0S76WVnrU62oclQTTTM8X5nahJoQpXqY0XSkd6YoqJ9bTNWr3mWVseeR11zEC/7qujTnXCJp7I5ibfNReRKG179X563TZrKlDNvVVii1PqV3DieIvVYV+jAClkwoEukPpSoMpidNxgMzCcxCePFBWGlYoRM6KWysVqb9SnMlZFcpRey0R3if9m6y/xm77BzlR/Ej6TLzBso/3yto5xhO0VW5XuI3r4SJCCAoixc/obOsdsYHHH8zriXlq8j/gVr7fl37h6mYGh671PP/v+2Te9+iqifavvfUJdRBvxI/mV7lPDMNDSEVL1pQujUB5xTP0TbeNcvCeIJJyWNsC0kCU66P7KkqlBHTLlKWEju1jbk7BorNos3FPrbQenVaW7DNJDr8WvDik5+tALmncojEHba/ozM76M0NhSnyp0AVLefMqfZO3kwdilA5dm174yPNNM8XD/lxfTyy9TPEdGpwWhSIKureyEmYFiiJkzmbIXuqppGAwM2ei+L6ZbKbhfzMBhKCk9/JEpICBLxPCZ4LkycnRDzQjw48somFu/aksfa78UURGO4DpD4fnziEvPHPq47W4lys0tW3jtu1nsdIgEYQDTOPF3N/bplekDIvU5+oS0Uk69/BZS6FXahsbxd4HGjgayjQwjsFXHWJHbB/UYwAp4v7Sm1EvwRDMZ7EUzfJyq/4L6jnmbSAnC7zo6BL/csW9EHkEM6mcAiFINy9vAit2kThZ7krUTs+vph4HP/6rHDoeCFGNIItd/3i3qTi5eWL3bZ4pqD3bxWvETGUj6Ka5jkUM2yZJ9EAh60W1dsljtjqFuuV5pl3TC7HklGrjvbwIzV55OtxzLdNNdqDC0yb+nYzfANOzAlmHKbLEB1/EaZ85OORSkF4M+sgU+Ocit3LH0cIRrQsygZ0e9GM3xomC7lNsE/j5hJ8juY+w= 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)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 10:31:01.9666 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e478a43-1084-47fb-4c85-08dced047782 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: SN1PEPF0002636E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7124 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