From: kbuild test robot <lkp@intel.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: kbuild-all@01.org, tglx@linutronix.de,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
bigeasy@linutronix.de, linux-rt-users@vger.kernel.org,
Sekhar Nori <nsekhar@ti.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Grygorii Strashko <grygorii.strashko@ti.com>
Subject: Re: [4.1.3-rt10][RFC PATCH] PM / sleep: freeze: fix bug "sleeping function called from invalid context"
Date: Wed, 21 Oct 2015 06:35:56 +0800 [thread overview]
Message-ID: <201510210647.9xx8nY9L%fengguang.wu@intel.com> (raw)
In-Reply-To: <1445373303-26264-1-git-send-email-grygorii.strashko@ti.com>
[-- Attachment #1: Type: text/plain, Size: 4111 bytes --]
Hi Grygorii,
[auto build test ERROR on v4.3-rc6 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
url: https://github.com/0day-ci/linux/commits/Grygorii-Strashko/PM-sleep-freeze-fix-bug-sleeping-function-called-from-invalid-context/20151021-043733
config: avr32-atngw100_defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=avr32
All error/warnings (new ones prefixed by >>):
>> kernel/power/suspend.c:32:31: error: linux/wait-simple.h: No such file or directory
>> kernel/power/suspend.c:41: warning: type defaults to 'int' in declaration of 'DEFINE_SWAIT_HEAD'
>> kernel/power/suspend.c:41: warning: parameter names (without types) in function declaration
kernel/power/suspend.c: In function 'freeze_enter':
>> kernel/power/suspend.c:74: error: implicit declaration of function 'swait_event'
>> kernel/power/suspend.c:74: error: 'suspend_freeze_wait_head' undeclared (first use in this function)
kernel/power/suspend.c:74: error: (Each undeclared identifier is reported only once
kernel/power/suspend.c:74: error: for each function it appears in.)
kernel/power/suspend.c: In function 'freeze_wake':
>> kernel/power/suspend.c:95: error: implicit declaration of function 'swait_wake'
kernel/power/suspend.c:95: error: 'suspend_freeze_wait_head' undeclared (first use in this function)
vim +32 kernel/power/suspend.c
26 #include <linux/suspend.h>
27 #include <linux/syscore_ops.h>
28 #include <linux/ftrace.h>
29 #include <trace/events/power.h>
30 #include <linux/compiler.h>
31 #include <linux/moduleparam.h>
> 32 #include <linux/wait-simple.h>
33
34 #include "power.h"
35
36 const char *pm_labels[] = { "mem", "standby", "freeze", NULL };
37 const char *pm_states[PM_SUSPEND_MAX];
38
39 static const struct platform_suspend_ops *suspend_ops;
40 static const struct platform_freeze_ops *freeze_ops;
> 41 static DEFINE_SWAIT_HEAD(suspend_freeze_wait_head);
42
43 enum freeze_state __read_mostly suspend_freeze_state;
44 static DEFINE_RAW_SPINLOCK(suspend_freeze_lock);
45
46 void freeze_set_ops(const struct platform_freeze_ops *ops)
47 {
48 lock_system_sleep();
49 freeze_ops = ops;
50 unlock_system_sleep();
51 }
52
53 static void freeze_begin(void)
54 {
55 suspend_freeze_state = FREEZE_STATE_NONE;
56 }
57
58 static void freeze_enter(void)
59 {
60 if (pm_wakeup_pending())
61 goto out;
62
63 raw_spin_lock_irq(&suspend_freeze_lock);
64 suspend_freeze_state = FREEZE_STATE_ENTER;
65 raw_spin_unlock_irq(&suspend_freeze_lock);
66
67 get_online_cpus();
68 cpuidle_resume();
69
70 /* Push all the CPUs into the idle loop. */
71 wake_up_all_idle_cpus();
72 pr_debug("PM: suspend-to-idle\n");
73 /* Make the current CPU wait so it can enter the idle loop too. */
> 74 swait_event(suspend_freeze_wait_head,
75 suspend_freeze_state == FREEZE_STATE_WAKE);
76 pr_debug("PM: resume from suspend-to-idle\n");
77
78 cpuidle_pause();
79 put_online_cpus();
80
81 raw_spin_lock_irq(&suspend_freeze_lock);
82
83 out:
84 suspend_freeze_state = FREEZE_STATE_NONE;
85 raw_spin_unlock_irq(&suspend_freeze_lock);
86 }
87
88 void freeze_wake(void)
89 {
90 unsigned long flags;
91
92 raw_spin_lock_irqsave(&suspend_freeze_lock, flags);
93 if (suspend_freeze_state > FREEZE_STATE_NONE) {
94 suspend_freeze_state = FREEZE_STATE_WAKE;
> 95 swait_wake(&suspend_freeze_wait_head);
96 }
97 raw_spin_unlock_irqrestore(&suspend_freeze_lock, flags);
98 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 11783 bytes --]
next prev parent reply other threads:[~2015-10-20 22:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 20:35 Grygorii Strashko
2015-10-20 22:35 ` kbuild test robot [this message]
2015-10-20 23:37 ` kbuild test robot
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=201510210647.9xx8nY9L%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=bigeasy@linutronix.de \
--cc=grygorii.strashko@ti.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®