summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Machek <pavel@suse.cz>2003-07-06 23:34:25 -0700
committerSteve French <cifs.adm@hostme.bitkeeper.com>2003-07-06 23:34:25 -0700
commitf597d1debdd1f5314a0177cb68d1d0ced960929b (patch)
tree46a2ccaf405bc1bacc8dfc68fb6f529fd792a7f7
parentbd824b9fb179ceba690d683a79eeb6f0f0ff5f06 (diff)
[PATCH] suspend SMP-kernel with one CPU
This allows suspend to work on UP machines, even if the kernel is compiled for SMP.
-rw-r--r--kernel/suspend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/suspend.c b/kernel/suspend.c
index 843cbaf6d433..1033ee31df68 100644
--- a/kernel/suspend.c
+++ b/kernel/suspend.c
@@ -1203,12 +1203,12 @@ static int read_suspend_image(const char * specialfile, int noresume)
void software_resume(void)
{
-#ifdef CONFIG_SMP
- printk(KERN_WARNING "Software Suspend has a malfunctioning SMP support. Disabled :(\n");
-#else
+ if (num_online_cpus() > 1) {
+ printk(KERN_WARNING "Software Suspend has malfunctioning SMP support. Disabled :(\n");
+ return;
+ }
/* We enable the possibility of machine suspend */
software_suspend_enabled = 1;
-#endif
if (!resume_status)
return;