From patchwork Mon Aug 19 22:08:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shanker Donthineni X-Patchwork-Id: 13769039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C769C52D7C for ; Mon, 19 Aug 2024 22:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ofsILX6ZZfrLZYUwOO6jfJiLkNJdD8780PmYx2gj7mk=; b=aCLve0Od3OPklatnKi7F9O89Np Io6j1XgiRLx1Htbr2oERabX++9uMrwE8JsyyTRxv58lMuQ29lvTF3Gbr5fXJHXBWOF7j2a206vsfR AHcQgRi6tw83P6IKBtqybWleX0JhyuALEYrpZKWzEkHg9az0BAdGGWrYemDfCfinxFG64Bd9a6Hx7 vzeqmUlvZV5dXaJ0s80t1SfpWMRZAeV6HauvhZqv4S9N34wnsvrz1Qsk+eqfXTsrjZd+j81losoGo oW/hE7cMgOdE50FDS0bF09MPEVAWR0Zl/8xn80+jsWF/VS7jg7mfIe1jCAHfYmbypkmYZX+bCUNQb xd0zrNXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgAZd-000000034S2-2jiV; Mon, 19 Aug 2024 22:10:01 +0000 Received: from mail-bn7nam10on2060b.outbound.protection.outlook.com ([2a01:111:f403:2009::60b] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgAYV-000000034H9-0cby for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 22:08:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LnJo7ZBKpDsmsB07moa3299DsZ0ikBQ4SJze7aJ31+pLRzScWcSzt1chwbweXKiRIRY4OxBCb24QCXKYESB9XntNwgd0XivWyTxvSmik53aOvjQQPxsmF0ND2jSeVkm08A6pI73LP2Q3D9Z05SunWR3qpQhWLbrprDyJzdypml5DykGSJqCgWhQ0NBlj7BlwdzyChOM7+0TOknZcDNqhXKtyEpSVcq8bOxEDPcvSDe5kB+0WpivZ3N7ncs6fnrIch+aIAj2TCvYZD6aS4e65m1nCP+kd4eDke/yQMRgY82K6wTXFzCYxqSYtoQSKVDyXj3kx3boLN8VShfqKH/2hQg== 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=ofsILX6ZZfrLZYUwOO6jfJiLkNJdD8780PmYx2gj7mk=; b=H/pdzcX2CIEu7MsH3L3oo1cUxz1Zs7pcV0Tg5WHUCd1336r42uS0sqMdgMxiKqxWGropfKNXE+elmMil9NiMiix55eUL19oN4JhkjnZIPCeEp0Yy0xltwmWIs+ruAhe6yLN6NEIiFJRVcyDODQvprzcfCji0Lyq8P62W2/HPfMVEpZ+PMvR+YF8Y+LCMuJlUzNcbMVbj5V0AwXMJb/9W9CEC4tKWUkdhwm6AAxQhXWakurYq1VMnuFV2qnPjIYWTbQUVDmZIys/O+pvn1G6etXgRKoLBlFJ/NfYnMYbMM6wt9K4KotiKc6Owp+afw/Xw2PhnYC0Rckgo03QWp/V1Iw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ofsILX6ZZfrLZYUwOO6jfJiLkNJdD8780PmYx2gj7mk=; b=sq4L6t5Ay/cFmyD/sStC/OPfrmZLz0k9Y3BYnBv883dJH032qhGujOX+rJ5MuMK6ydEJT42pRrVTJbH3XjWL/N4wY5HXsU5d1EpXDDYE10z4jIbUT523jrUNQAbHhsIyp+e4y5b0WMIGrb/cKRC0BHzDiVNsMK51G7sS6vtKB7/qLvJbr9YXawnGOk5rHv/JawANtXHhV+wsaIcnifjoL/EvK3ChDiiFn8MkOrK0tsfGc6bqd2CSG+mdpGvejHhnw8c2xVE9BGCtIwS9CSglecPE9l3keKcp/88twiqPBcTAx0U+xis8R8lHuZMVmKuDCPVQlFiQrgxhqE15G63++Q== Received: from SJ0PR13CA0221.namprd13.prod.outlook.com (2603:10b6:a03:2c1::16) by MN2PR12MB4288.namprd12.prod.outlook.com (2603:10b6:208:1d2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Mon, 19 Aug 2024 22:08:41 +0000 Received: from SJ1PEPF0000231D.namprd03.prod.outlook.com (2603:10b6:a03:2c1:cafe::af) by SJ0PR13CA0221.outlook.office365.com (2603:10b6:a03:2c1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13 via Frontend Transport; Mon, 19 Aug 2024 22:08:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SJ1PEPF0000231D.mail.protection.outlook.com (10.167.242.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.11 via Frontend Transport; Mon, 19 Aug 2024 22:08:40 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 19 Aug 2024 15:08:21 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 19 Aug 2024 15:08:20 -0700 Received: from SDONTHINENI-DESKTOP.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 19 Aug 2024 15:08:20 -0700 From: Shanker Donthineni To: James Morse CC: Catalin Marinas , Shanker Donthineni , Rohit Mathew , , , , Vikram Sethi Subject: [PATCH] arm_mpam: Fix T241-MPAM-4 workaround Date: Mon, 19 Aug 2024 17:08:18 -0500 Message-ID: <20240819220818.201870-1-sdonthineni@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231D:EE_|MN2PR12MB4288:EE_ X-MS-Office365-Filtering-Correlation-Id: 56681b00-96d0-4cb0-e065-08dcc09b7b8b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: hvLsXZl5aUMg44FLvb2f+zfvc5T+yxAHaDFKV49QkCPwmnORA9pet04U3Ev+tQFR81VnPnY8pRKgQh9RTDVSxJRdOAcYuwQ8Qx8s3Q+xMxOxJii/+IMjpCNMYbbv4qPVGag8d1jhwLbinPpM/XBNgaDjFdbC/or61sI77yhaYZSpy4+/u+1uB2kM+MijEEET+sEejoTsaDF9+DZzVOxo6QbVUtJ2gHnQoHl+OWPy5JShLHo6wxOZXd0MrFWU5iEk1EJOzZgmyYKT04zv4zFxeUoa7cnacis/RLmzb5mVcOl/Y2sUuk8gRxnaRWBOJIMlUApBVcV/rvn0V7F2J6XeSmhZRSpNkFCLA7E3V1KEVVRdPMDctPJZn6fMmgh0mrNdxF4wjAVDzH+wZq0m+idWYvbK6Sm0Qzs/B+ekge9sHDyKGCYPLPoSTFg1vABc1MA3Qso4eLYEBwbLUJEPEi+nwZC8V7jQRfQGfNw6MMHNF9+YA1ATPR7aQgV2QP+joQAyeBuksYgxQYETRugkXBxmwtmD364FtAfTt6tkdwAOMlyIN4KD2AIwjJr3axsRmFxUeDV80W/xtcMaDSHDaMm5ATrBO4bmg6wvuvb/V922BdGT/r18LSPyJWl5WxHqA/qeAS8BPPVHT6ILDQsrWLu0PYR2iPIyFyW5vGKdUnHwkDuBhvDGT+csFW+L18SVUoJca5V2tY4sBiDZzQLkFsNHCrrLLxGDRg2nb026iLSasXgCDd6v+y+fFOWkDIXoVvhDqt7PdL8UOFVRStWlPxRHmU8K/q6B1icJScTV6xPQZR6v63wEl5jfZ/59Kgzmls+myyqA1SWs8jW8VX+d+9rdi5gqJ7MASTNugeYA0igGrFVN3vmokDxIjaJEOAeknJTrYBlQn3youU9Mmnol1t+CfQmc78sGV8RB8ZqWAvk4HtTCbC0TDDwbLF9Dog+kG8yc+B1Ukoe/1tY8xpo4cHUMtUTKLQ/NTARUYWphac/qrIloQy/KaEjGGfwoemqpDWzrUqxTAG03v7bJSwaFExdV44BrRJFeSo42id7k0clOkv6VFNxw7O7l628cQn52fislpw5qotZXjGRjwKwqvk4yxEOsIxQdN/UyDTn2Q9rvKO8On/UcvqvkpC9/2vMKFPRC+fuvZnkAFoRRuGVzWbtL4/YyI129YSrufm5HOZ3g45AZE1JPIjBQWkKDa0Bsus5LhcXsieD+SwyMS9xYe1JzyiIKtwDEOm8ox/LnPChsGJ2u1hr6JgyZJR3jO6Udo9sn7yB00R9igSkiIfnLhtAu4UvQZi3uHgZyHKb03A92crAbSfxtV4lcCgmJSvcaIDdkvip54mywXxnwaLO/vfnp0fc+szyuvVwbT8Ub4PFkQxK8A0EameY/f55wsPWVI32B7Oph4Sd2NItyw104DaiUikx+g8XUfQ2I0Y7qVR/6EaJFPZaGAGq8yGZOo4zwlm9x X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 22:08:40.4214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 56681b00-96d0-4cb0-e065-08dcc09b7b8b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF0000231D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_150851_219845_F6520F09 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The workaround for T241-MPAM-4 was applied incorrectly, leading to MBW_MIN being programmed with a zero value when the user specifies MBW_MAX is less than 5%. This patch ensures that MBW_MIN is programmed with a non-zero value, set to 1 to fix the T241-MPAM-4 as expected. Fixes: 13ff1b527e40 ("arm_mpam: Add workaround for T241-MPAM-4") Signed-off-by: Shanker Donthineni --- drivers/platform/arm64/mpam/mpam_devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/arm64/mpam/mpam_devices.c b/drivers/platform/arm64/mpam/mpam_devices.c index a802ca1c9f05..e49a27c02c66 100644 --- a/drivers/platform/arm64/mpam/mpam_devices.c +++ b/drivers/platform/arm64/mpam/mpam_devices.c @@ -2990,7 +2990,7 @@ static void mpam_extend_config(struct mpam_class *class, struct mpam_config *cfg } if (mpam_has_quirk(T241_FORCE_MBW_MIN_TO_ONE, class) && - cfg->mbw_min == 0) { + cfg->mbw_min <= min_hw_granule) { cfg->mbw_min = min_hw_granule + 1; mpam_set_feature(mpam_feat_mbw_min, cfg); }