From: Mario Limonciello <mario.limonciello@amd.com>
To: Hans de Goede <hdegoede@redhat.com>,
Mark Gross <mgross@linux.intel.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: "open list:X86 PLATFORM DRIVERS"
<platform-driver-x86@vger.kernel.org>,
<linux-acpi@vger.kernel.org>,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
Goswami Sanket <Sanket.Goswami@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH v3 5/5] platform/x86: amd-pmc: Drop CPU QoS workaround
Date: Mon, 14 Mar 2022 00:03:39 -0500 [thread overview]
Message-ID: <20220314050340.1176-5-mario.limonciello@amd.com> (raw)
In-Reply-To: <20220314050340.1176-1-mario.limonciello@amd.com>
A workaround was previously introduced as part of commit 646f429ec2de
("platform/x86: amd-pmc: Set QOS during suspend on CZN w/ timer wakeup")
to prevent CPUs from going into the deepest state during the execution
of the `noirq` stage of `amd_pmc`. As `amd_pmc` has been pushed to the
last step for suspend on AMD platforms, this workaround is no longer
necessary.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
changes from v2->v3:
* No changes
changes from v1->v2:
* No changes
drivers/platform/x86/amd-pmc.c | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index 752a99d759d2..b3c6b5cc83c1 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -21,7 +21,6 @@
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
-#include <linux/pm_qos.h>
#include <linux/rtc.h>
#include <linux/suspend.h>
#include <linux/seq_file.h>
@@ -96,9 +95,6 @@
#define PMC_MSG_DELAY_MIN_US 50
#define RESPONSE_REGISTER_LOOP_MAX 20000
-/* QoS request for letting CPUs in idle states, but not the deepest */
-#define AMD_PMC_MAX_IDLE_STATE_LATENCY 3
-
#define SOC_SUBSYSTEM_IP_MAX 12
#define DELAY_MIN_US 2000
#define DELAY_MAX_US 3000
@@ -153,7 +149,6 @@ struct amd_pmc_dev {
struct device *dev;
struct pci_dev *rdev;
struct mutex lock; /* generic mutex lock */
- struct pm_qos_request amd_pmc_pm_qos_req;
#if IS_ENABLED(CONFIG_DEBUG_FS)
struct dentry *dbgfs_dir;
#endif /* CONFIG_DEBUG_FS */
@@ -628,14 +623,6 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
rc = rtc_alarm_irq_enable(rtc_device, 0);
dev_dbg(pdev->dev, "wakeup timer programmed for %lld seconds\n", duration);
- /*
- * Prevent CPUs from getting into deep idle states while sending OS_HINT
- * which is otherwise generally safe to send when at least one of the CPUs
- * is not in deep idle states.
- */
- cpu_latency_qos_update_request(&pdev->amd_pmc_pm_qos_req, AMD_PMC_MAX_IDLE_STATE_LATENCY);
- wake_up_all_idle_cpus();
-
return rc;
}
@@ -678,9 +665,6 @@ static int amd_pmc_suspend(void *context, bool constraints)
return 0;
fail:
- if (pdev->cpu_id == AMD_CPU_ID_CZN)
- cpu_latency_qos_update_request(&pdev->amd_pmc_pm_qos_req,
- PM_QOS_DEFAULT_VALUE);
return rc;
}
@@ -707,11 +691,6 @@ static void amd_pmc_resume(void *context)
if (rc)
dev_err(pdev->dev, "error writing to STB: %d\n", rc);
- /* Restore the QoS request back to defaults if it was set */
- if (pdev->cpu_id == AMD_CPU_ID_CZN)
- cpu_latency_qos_update_request(&pdev->amd_pmc_pm_qos_req,
- PM_QOS_DEFAULT_VALUE);
-
/* Notify on failed entry */
amd_pmc_validate_deepest(pdev);
}
@@ -890,7 +869,6 @@ static int amd_pmc_probe(struct platform_device *pdev)
goto err_pci_dev_put;
amd_pmc_dbgfs_register(dev);
- cpu_latency_qos_add_request(&dev->amd_pmc_pm_qos_req, PM_QOS_DEFAULT_VALUE);
return 0;
err_pci_dev_put:
--
2.34.1
next prev parent reply other threads:[~2022-03-14 5:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 5:03 [PATCH v3 1/5] ACPI / x86: Add support for LPS0 callback handler Mario Limonciello
2022-03-14 5:03 ` [PATCH v3 2/5] ACPI / x86: Pass the constraints checking result to LPS0 callback Mario Limonciello
2022-03-14 5:03 ` [PATCH v3 3/5] ACPI / x86: Check LPI constraints by default Mario Limonciello
2022-03-14 5:03 ` [PATCH v3 4/5] platform/x86: amd-pmc: Move to later in the suspend process Mario Limonciello
2022-03-14 5:03 ` Mario Limonciello [this message]
2022-03-14 9:05 ` [PATCH v3 1/5] ACPI / x86: Add support for LPS0 callback handler Hans de Goede
2022-03-14 13:32 ` Limonciello, Mario
2022-03-14 13:37 ` Hans de Goede
2022-03-16 15:02 ` Rafael J. Wysocki
2022-03-16 15:34 ` Rafael J. Wysocki
2022-03-16 15:43 ` Limonciello, Mario
2022-03-16 15:52 ` Rafael J. Wysocki
2022-03-16 16:43 ` Limonciello, Mario
2022-03-16 17:27 ` Rafael J. Wysocki
2022-03-15 1:01 ` David E. Box
2022-03-14 9:12 ` Lukas Wunner
2022-03-14 13:28 ` Limonciello, Mario
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220314050340.1176-5-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=Sanket.Goswami@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hdegoede@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.