]> git.hungrycats.org Git - linux/commitdiff
[PATCH] suspend SMP-kernel with one CPU
authorPavel Machek <pavel@suse.cz>
Mon, 7 Jul 2003 06:34:25 +0000 (23:34 -0700)
committerSteve French <cifs.adm@hostme.bitkeeper.com>
Mon, 7 Jul 2003 06:34:25 +0000 (23:34 -0700)
This allows suspend to work on UP machines, even if the kernel
is compiled for SMP.

kernel/suspend.c

index 843cbaf6d433afa2f57adb3a10f1cb17185efdb4..1033ee31df68e313827262ff6257f07c680e8761 100644 (file)
@@ -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;