summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorSai Gurrappadi <sgurrappadi@nvidia.com>2014-06-12 13:12:18 -0700
committerMandar Padmawar <mpadmawar@nvidia.com>2014-06-19 07:33:36 -0700
commitdbea38f8ed4302deecba1856b8ac5867bbd0f1f5 (patch)
tree7f0f9d6e14ae5678cca0b94810c0c910e0179d4b /drivers/misc
parentdd1314c9a7a35e3f2ccfdfae1d2e1766beda7160 (diff)
Revert "drivers: misc: Put CPU1 online before LP0"
This reverts commit 7e2ffe6c059b6fbae01480605e5aef8093e5fb4c. No longer need this WAR here as it has been better implemented in pm.c by setting the suspend_in_progress flag earlier on the suspend path. Bug 1522953 Change-Id: Ib1dca4e1c0babca2895d9ab751a6b7df4f039011 Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/422816 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peng Du <pdu@nvidia.com> Reviewed-by: Chao Xu <cxu@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/Makefile1
-rw-r--r--drivers/misc/suspend_handler_min_cpus_t132.c79
2 files changed, 0 insertions, 80 deletions
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 9d8111a61bd9..e16746257063 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -86,4 +86,3 @@ obj-$(CONFIG_DENVER_CPU) += force_idle_t132.o
obj-$(CONFIG_ARCH_TEGRA) +=tegra_timerinfo.o
obj-$(CONFIG_MODS) += mods/
obj-$(CONFIG_DENVER_CPU) += idle_test_t132.o
-obj-$(CONFIG_DENVER_CPU) += suspend_handler_min_cpus_t132.o
diff --git a/drivers/misc/suspend_handler_min_cpus_t132.c b/drivers/misc/suspend_handler_min_cpus_t132.c
deleted file mode 100644
index 4dd84dc30875..000000000000
--- a/drivers/misc/suspend_handler_min_cpus_t132.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * drivers/misc/suspend_handler_min_cpus_t132.c
- *
- * Copyright (c) 2014 NVIDIA CORPORATION. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include <linux/types.h>
-#include <linux/module.h>
-#include <linux/err.h>
-#include <linux/pm_qos.h>
-#include <linux/suspend.h>
-
-static struct pm_qos_request suspend_min_cpus_req;
-
-/*
- * XXX: LP0 WAR: If CPU1 is offline on LP0, the device will fail to go into LP0
- * because the CPU gets put into C6 during normal hotplug. This causes LP0 (C7)
- * to fail thereby hanging the system. Work around this by bringing back CPU1
- * online and putting it in C7 before requesting LP0 from CPU0
- */
-static int suspend_pm_notify(struct notifier_block *nb,
- unsigned long event, void *data)
-{
- if (event == PM_SUSPEND_PREPARE) {
- pm_qos_update_request(&suspend_min_cpus_req,
- num_possible_cpus());
- if (num_online_cpus() != num_possible_cpus()) {
- pr_err("%s: min online cpu request failed\n",
- __func__);
- return NOTIFY_BAD;
- }
- } else if (event == PM_POST_SUSPEND)
- pm_qos_update_request(&suspend_min_cpus_req,
- PM_QOS_MIN_ONLINE_CPUS_DEFAULT_VALUE);
-
- return NOTIFY_OK;
-}
-
-/*
- * The priority of this suspend notifier should always be higher than
- * cpu_hotplug's pm_notifier. Otherwise cpu_hotplug will disable hotplug
- * operations on suspend causing the following cpu_up call in
- * suspend_pm_notify to fail
- */
-static struct notifier_block suspend_pm_notifier = {
- .notifier_call = suspend_pm_notify,
- .priority = 1,
-};
-
-static int __init suspend_handler_min_cpus_init(void)
-{
- int err = register_pm_notifier(&suspend_pm_notifier);
-
- if (err)
- pr_err("%s: Failed to register pm notifier\n",
- __func__);
-
- pm_qos_add_request(&suspend_min_cpus_req, PM_QOS_MIN_ONLINE_CPUS,
- PM_QOS_MIN_ONLINE_CPUS_DEFAULT_VALUE);
-
- return err;
-}
-module_init(suspend_handler_min_cpus_init);
-
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("T132 Suspend handler for min online cpus constraint");