]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
power: console flush during suspend
authorBibek Basu <bbasu@nvidia.com>
Mon, 14 Dec 2015 06:32:31 +0000 (12:02 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Fri, 18 Dec 2015 17:20:46 +0000 (09:20 -0800)
If the console lock is taken by non boot cpus, then during
suspend conosole buffer may not flush because all nonboot
cpus will be disabled. So,if no_console_suspend is passed
in kernel commandline, flush console before disabling
nonboot cpus.

Bug 200143487

Change-Id: I1a4455a1f515694a75ff7a96d08f24bf4777bf5c
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/922363
(cherry picked from commit 1f17d55e442d5768a7e37183bf835c20132c3617)
Reviewed-on: http://git-master/r/924111
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
kernel/power/suspend.c

index 6d4f0a3f658c8dd587f555dcb87f1ffce2659ec1..9c69f75cae68179457756e33f6a759f3cdadce60 100644 (file)
@@ -213,6 +213,11 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
                goto Platform_wake;
        }
 
+       /* flush console buffer if console_suspend_enabled cleared */
+       if (!console_suspend_enabled) {
+               console_lock();
+               console_unlock();
+       }
        ftrace_stop();
        error = disable_nonboot_cpus();
        if (error || suspend_test(TEST_CPUS)) {