Received: by 2002:ac0:b7d5:0:0:0:0:0 with SMTP id v21csp14745ime; Thu, 28 Jul 2022 15:16:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ZSVvDRimkFLPnHGpAZAFxzCiVsI8fe/NL7+syuApX7iJceBv/I44KdnXh2zZck9nOZ65u X-Received: by 2002:a17:90a:9418:b0:1f1:e251:cabf with SMTP id r24-20020a17090a941800b001f1e251cabfmr795137pjo.79.1659046588871; Thu, 28 Jul 2022 15:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659046588; cv=none; d=google.com; s=arc-20160816; b=vf3/uMqxVjhfjhjbcOHUeAWafPvEIRvDizYpEKY6aXGnPScHDd2Hz4zo9JAKM0OPox TP7tAaMb35q4vfjd5TdQmY4gHlg3iHPniNFFCbr6m26Ypo4HgBFRTmDA29ADA2UOfuKz 6d4oXLzXYhf2R55LIMq1eO5RNOrKbKlWaHrcPsZsItVYzjUs8OwEAiolukOH6QSxnnTw 2754VTr2kK/Q1z+/L4JaxbZVVsGmwxDH4nkc5+FGolmhuzNy390uoBBU8fIOqsv3u6/9 Koj9oXO8TWqHCHSYE4YjTTDnK2ODz16n2i4lVUQWmrqrDIchgLSW/eKrFZdTe/XoVuYz WZoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=a3nRIeocSsbr5JavglqbMlfFw5zjeGEzCCkE+JdDNW0=; b=a1wQZ2C0X2dSkeF+fd9wZU5gyZfuDjNteaASFLnURYjBmHnwGIl7FXSgV4EYiYQQCP oRyVHt45DjsLBp8ASCJjsC3uT37w/KC8HZZESbHys19tU801gKWR3MxY7wnkKJB7Qh1u OFm2MCwm3v+Q5mgzVAm2LmHU+D2mcuAWFO4art3HNt15PfCGFPWg88O+5OT4djyPzxLi R8c8MnGwJrv/WwGEpMTxqcu7hLl6kF7BAdtX23k/IiKN1IvB6VG1O9SoPmQSEO6XdVJa Q2MDYAkX0Xp7q56aztdYNRgYbFsRpFzNXaNl6WnDJuFLPkZze1RH2Ym+rSSS5OjypxSB gAGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a170902f78a00b0016d9e2902aesi2230644pln.293.2022.07.28.15.16.12; Thu, 28 Jul 2022 15:16:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbiG1WLj (ORCPT + 99 others); Thu, 28 Jul 2022 18:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231993AbiG1WLg (ORCPT ); Thu, 28 Jul 2022 18:11:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 82FF678DD5; Thu, 28 Jul 2022 15:11:35 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC431106F; Thu, 28 Jul 2022 15:11:35 -0700 (PDT) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DF4D13F70D; Thu, 28 Jul 2022 15:11:34 -0700 (PDT) From: Jeremy Linton To: linux-pm@vger.kernel.org Cc: rafael@kernel.org, lenb@kernel.org, viresh.kumar@linaro.org, robert.moore@intel.com, devel@acpica.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Jeremy Linton Subject: [PATCH v2 0/1] Disable FIE on machines with slow counters Date: Thu, 28 Jul 2022 17:10:42 -0500 Message-Id: <20220728221043.4161903-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org FIE assumes the delivered/relative perf registers are fast to read so it goes ahead and hits them quite frequently. On a couple Arm platforms though they end up in PCC regions which require mailbox handshaking with other parts of the platform. This results in a lot of overhead in the cppc_fie task. As such lets runtime disable FIE if we detect it enabled on one of those platforms. Also allow the user to manually disable it via a module parameter. v1->v2: Apply Rafael's review comments. Move the MODULE_PARAM into the ifdef Fix compiler warning when ACPI_CPPC_LIB is disabled. Jeremy Linton (1): ACPI: CPPC: Disable FIE if registers in PCC regions drivers/acpi/cppc_acpi.c | 41 ++++++++++++++++++++++++++++++++++ drivers/cpufreq/cppc_cpufreq.c | 19 ++++++++++++---- include/acpi/cppc_acpi.h | 5 +++++ 3 files changed, 61 insertions(+), 4 deletions(-) -- 2.35.3