Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1471413rdg; Sat, 14 Oct 2023 03:55:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGt0LiyDu4S9PoU6fmD4/WIJjoWpbuHESzII/rSMtW/VNlGIy/zYiy0wvYx7tsk5cNRSysN X-Received: by 2002:a05:6a20:12cb:b0:136:faec:a7dc with SMTP id v11-20020a056a2012cb00b00136faeca7dcmr35758952pzg.11.1697280915170; Sat, 14 Oct 2023 03:55:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697280915; cv=pass; d=google.com; s=arc-20160816; b=yuM7pY9B9C+O3uVO6xwnjBW1EZuoMxM7Ci/1X2sHNX8paHodtjqkllXyJe0dAdRgK6 zh7quE8RxJjsPM3ZaYtTH09lZgJzyuoustyn+fKYHJxCJletM08JoY6G8xPp9k/+UiMj Nn93FY2osDmmNYy8vTS+cLICRvstOUzetJzA0MqHhwg0KTL7BJc2BplW8hCbHERKqU/K A3rj32qgbijlz6N57wXYgFCpQJskTn4ih7m7PaId4HyGOpTe0ys95e4ee6BL1BB5cGQ6 1gpALqCVPo2YoGjl7r2o31I0A5y7M8BGsKi60pTrPtsi78SZLfVOUdKpOiQg5o1D9S9I EkYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=fEnrPINaycVAKVwwagSZhm4tQ1BmztctPX1j3CdecUQ=; fh=unGb0PxJ5fVahQU1umCcRoLhLnQ+wIQ4RXeupiqakAo=; b=sVyH15YHsqrBxMnOkKxz9T6xV+a7pK/mdMlJ+9yb1VGuLtHFHB5rfYTRs7UeDK3G1m DClefs0zejNIKjLLwmIhGt7qbrLtlilugpoZCNRJqScFbYsfpueGa24iMrQ0IppFi9+s PyimYkspSTp0m1/mUmHI9SVJ7lolN8uSeWKtrTAguOdB1qMz8gEF0M4/HNUQLoK74XIx Y03z0QybkAKcxitG4B34Y9hv9X+NH7DXIbUVJhdyX4aml9HzZoqWRQRtbvNgDOnbpiRs QUYqqWGicKQn3vT0C4oj6+uC9BzlonaG+moXJf5H+lvsjCwMXjgbsEmzBw8Yg8kDnD70 SmfQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=QXlQ6wMC; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id az1-20020a056a02004100b00577f65baa3esi6659049pgb.775.2023.10.14.03.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 03:55:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=QXlQ6wMC; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0B1A780A8035; Sat, 14 Oct 2023 03:55:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233048AbjJNKyx (ORCPT + 99 others); Sat, 14 Oct 2023 06:54:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232957AbjJNKyv (ORCPT ); Sat, 14 Oct 2023 06:54:51 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2A0AD; Sat, 14 Oct 2023 03:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GdlnmOaju7p+ePaXKqmGPnLKUiHhIM4r2Dwm/DhTGSFqYv6MEacwLG4lLhHHfE9rE5qSu5Mp3PIy2C/18A3BVUy8gQh5b3zgzP0COsY2Y9lequL4Oq9XBbUuNvmfGobsa5Ir3x8fWxnfAZxZ5gABRSWue4BFeDcUCap3yd28KCA+vTFsG+3kDRzuPypuTTNUjBdExsVjl89XpJDC61u7Afll7DpHoYp4OsMpg4r8QkhMWEmxu6qF9cBpGa6s0sxaJy7ngEq5WWtLbO1NFviyqyTB//UQ9XkXERtnH+bHuJQg1ebqMcUs/1wuAfzK3P9XneC1XxcxT9iqaGTEfHXxUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=fEnrPINaycVAKVwwagSZhm4tQ1BmztctPX1j3CdecUQ=; b=RU56XZ2O/OhMGKEWEGaoyhQcLK+QpBUUExlaA3lAppTDZ8deBf2Evu9xat2s/ranwBNk8+o9Or6LydDcfsi52gmMVQUUo8ZuprafRBj2R3UaVgNj8CNuk2HP/RqiWKd341DEtq7MQhz3yHnH1HWuxSjt62UTWyefSy56wtTFmvFCXzQ7EtCV4+4p29f9szLewcwbZ0ZD21pbmCeV42s1N2Hgwis3sVGiOU7NLZ6czdQk4pz6x18bzc2hSz5aGUhrIwKMrWtz/LNLbt6BecVGbtDI5KxQINajxEy4U1rVVAX7KsbQRGiyY/tUJAze8SlYX+63Dkg2MnjXj1TCZRVzbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=kernel.org 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 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=fEnrPINaycVAKVwwagSZhm4tQ1BmztctPX1j3CdecUQ=; b=QXlQ6wMCwp6BskK5IhLsqyin/kV/7/HMayDv85WWHOUU8qYuJLuMtyCm87WsHCy+wvRBb+udrPKlZ7Gbsmmwr37BQqFvJonb134WL/jW1BBWL8WC3m0H9fWg7NkqVaywWDRPgusqfdA+FxXyyP/+O+7qS7NPtvMfNGJq0Y0MeSanl7Gx6BBEPogXf0/JOPCB4KWaHnGCNqi4fBfzq6w/pb8mY6wgybgi/pwRh1Gub/4Ve1/dQ6G49zeCv+2V7yrjoKpJyxz7chhYI+gHe8bhcy2VgzqCzArln3o5ThyVxAbylB7px4ZydunpkXxWnlCzy3ez+luGXvS2wwRge/WoWA== Received: from SA1P222CA0079.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:35e::16) by SJ2PR12MB8157.namprd12.prod.outlook.com (2603:10b6:a03:4fa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.47; Sat, 14 Oct 2023 10:54:46 +0000 Received: from SN1PEPF000252A0.namprd05.prod.outlook.com (2603:10b6:806:35e:cafe::9a) by SA1P222CA0079.outlook.office365.com (2603:10b6:806:35e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.29 via Frontend Transport; Sat, 14 Oct 2023 10:54:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SN1PEPF000252A0.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Sat, 14 Oct 2023 10:54:46 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 14 Oct 2023 03:54:33 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 14 Oct 2023 03:54:33 -0700 Received: from sumitg-l4t.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sat, 14 Oct 2023 03:54:29 -0700 From: Sumit Gupta To: , , , , , CC: , , , , , , , Subject: [Patch v5 0/2] Add support for _TFP and change throttle pctg Date: Sat, 14 Oct 2023 16:24:24 +0530 Message-ID: <20231014105426.26389-1-sumitg@nvidia.com> X-Mailer: git-send-email 2.17.1 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A0:EE_|SJ2PR12MB8157:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f25d8e0-2688-47d9-ef0d-08dbcca3faed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RpGLKSeN+rXGdHXIUdIN0ye1Ywc5bzuFaylKLMbqm1VJwxtpj2H1li67V1Xqe8W7w9rEc0ltSIQW10b80dJY7IaCJmnHwSfCTcsoccKgN4vuvA0x+1sVeWGlG8osVPEBFwvgIqYWSltFISIriTtySuY8mhTqbOvzF+CKtDJqrz5cRIVNgHg+f+l9FRHLAQEyTeyASVW4OBwJq73PXLDp3eofGLnTyzY1/qlM5tst8HaWhP9STsBXRvf/xs/ikCM3vUUX/PuNq+vYG8lcxyxpib2Gzy+fK16DK3GZDX0OpYySKIShwnOJopdYoHeCgYUuerzeH9Zz6PyD1LmxrfJnE+47oLzo8gATVUwaUPBpdadsxkEEOqt/NzQXahiZNKgYsDW5kq6H+OFceAImbDHvxhZlp7K70nkNqjuP4IpfSVB6cJ3mKe5JhHIhm94GwsfWcUe10v8drrkhH7SAJYHnc/7R6XIr5tlYeMRXk+xexjn+kHVe8JStMk1+AqTDMWizsbDCPwhSIjsgn9w2UITwApYHbhpfIWIIJZyoENLDsiXmm2qVJ1dNj4Z4X32yA6NUscfSTBaXCxJEHSnDQIQSRIAGps+NMp+yXIG7le3JHjWcWTom9V/4O3pJZ4qfAN434pbtStAOk2eSlJfCqyI3C/7VQSxMTIABCpU8pQQO9+5y3yw9r1G++RBovqynD06m2yjgjC9YX914lCfNvR+jITQIugk8b7ix7eUcZoSVoizG/ICgKE7BR1x9ng4FYVqL9KaTcs/UKbtbusB6uXXWyQ0BJmH7xnHkXIo/IBHTYq3OYBhvOMvdeJc615kPPYESV3jrgsihIlJ0cK+AkUmSFQ== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(346002)(396003)(376002)(136003)(230922051799003)(451199024)(64100799003)(1800799009)(82310400011)(186009)(36840700001)(46966006)(40470700004)(40480700001)(40460700003)(7696005)(6666004)(966005)(478600001)(36860700001)(47076005)(36756003)(86362001)(7636003)(356005)(82740400003)(2906002)(83380400001)(1076003)(426003)(336012)(26005)(107886003)(2616005)(70206006)(70586007)(5660300002)(41300700001)(110136005)(54906003)(8936002)(8676002)(4326008)(316002)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2023 10:54:46.3283 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f25d8e0-2688-47d9-ef0d-08dbcca3faed 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.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000252A0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8157 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 14 Oct 2023 03:55:06 -0700 (PDT) This patch set adds two improvements to get a finer control over the impact of thermal throttling on performance. Requesting to merge the patches if no further changes needed. 1) Patch 1: Adds support to read "Thermal fast Sampling Period (_TFP)" ACPI object and use it over "Thermal Sampling Period (_TSP)" for Passive cooling if both are present. 2) Patch 2: Adds support to reduce the CPUFREQ reduction percentage and not always cause throttling in steps of "20%" for Tegra241 SoC. Both patches can be applied independently. --- v4[4] -> 5: - Patch 2: fix kernel robot warning for acpi_thermal_cpufreq_pctg(). v3[3] -> 4: - Patch 2: move ARM code from generic to new file 'thermal_cpufreq.c'. : get 'cpufreq_thermal_pctg' value for Tegra241 from new file. : move dummy/null function to 'acpi.h'. v2[2] -> v3: - Patch1: rebased on top of linux-next. - Patch2: use __read_mostly for the cpufreq_thermal_* variables. : add static to new function acpi_thermal_cpufreq_config_nvidia. : add null function if CONFIG_HAVE_ARM_SMCCC_DISCOVERY undefined : removed redundant parenthesis. v1[1] -> v2: - Patch1: add ACPI spec section info in commit description and rebased. - Patch2: add info about hardware in the commit description. : switched CPUFREQ THERMAL tuning macros to static variables. : update the tunings for Tegra241 SoC only using soc_id check. Jeff Brasen (1): ACPI: thermal: Add Thermal fast Sampling Period (_TFP) support Srikar Srimath Tirumala (1): ACPI: processor: reduce CPUFREQ thermal reduction pctg for Tegra241 drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/thermal_cpufreq.c | 20 ++++++++++++++++ drivers/acpi/processor_thermal.c | 35 +++++++++++++++++++++++++--- drivers/acpi/thermal.c | 17 +++++++++----- include/linux/acpi.h | 9 +++++++ 5 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 drivers/acpi/arm64/thermal_cpufreq.c [4] https://lore.kernel.org/lkml/20231009171839.12267-1-sumitg@nvidia.com/ [3] https://lore.kernel.org/linux-acpi/20231006153612.5851-1-sumitg@nvidia.com/ [2] https://lore.kernel.org/lkml/20230913164659.9345-1-sumitg@nvidia.com/ [1] https://lore.kernel.org/lkml/20230817093011.1378-1-sumitg@nvidia.com/ -- 2.17.1