diff -ruN 1925/include/linux/suspend-debug.h 1926/include/linux/suspend-debug.h --- 1925/include/linux/suspend-debug.h 2003-04-25 12:05:09.000000000 +1200 +++ 1926/include/linux/suspend-debug.h 2003-04-28 08:07:10.000000000 +1200 @@ -6,7 +6,7 @@ #define name_suspend "Suspend Machine: " #define name_resume "Resume Machine: " -#define swsusp_version "beta 19-25" +#define swsusp_version "beta 19-26" #define name_swsusp "Swsusp " swsusp_version ": " #define console_suspend " S U S P E N D T O D I S K " /* Same length to ensure one overwrites the other */ #define console_resume "R E S U M E F R O M D I S K" diff -ruN 1925/include/linux/suspend.h 1926/include/linux/suspend.h --- 1925/include/linux/suspend.h 2003-04-25 11:56:37.000000000 +1200 +++ 1926/include/linux/suspend.h 2003-04-28 08:06:37.000000000 +1200 @@ -37,6 +37,11 @@ were allocated */ } suspend_pagedir_t; +struct pbelink { + char dummy[sizeof(struct pbe) - sizeof(struct pbe *)]; + struct pbe * next; +}; + #define SWAP_FILENAME_MAXLENGTH 32 struct suspend_header { diff -ruN 1925/kernel/suspend.c 1926/kernel/suspend.c --- 1925/kernel/suspend.c 2003-04-25 22:21:58.000000000 +1200 +++ 1926/kernel/suspend.c 2003-04-28 11:33:48.000000000 +1200 @@ -173,11 +173,6 @@ static int suspend_console = 0; /* Console being used for suspend - may not be default if splash screen displayed */ #endif -struct pbelink { - char dummy[sizeof(struct pbe) - sizeof(struct pbe *)]; - struct pbe * next; -}; - struct swaplink { char dummy[PAGE_SIZE - sizeof(swp_entry_t)]; swp_entry_t next; @@ -258,9 +253,9 @@ beepERR; printk("Waiting for you to press and release SHIFT before continuing.\n"); while (!(shift_state & (1 << KG_SHIFT))) - yield(); + schedule(); while ((shift_state & (1 << KG_SHIFT))) - yield(); + schedule(); if (was_locked) spin_lock_irq(&suspend_pagedir_lock); } @@ -298,7 +293,7 @@ static struct sysinfo swapinfo; static unsigned long copybuff = 0; -#define NUM_SYNC_WRITES 4 +#define NUM_SYNC_WRITES 1 struct io_info { union p_diskpage buffer; struct page * cache_page; @@ -520,8 +515,8 @@ console_print(console_suspend, strlen(console_suspend)); /* Print action */ - posn[0] = (char) (video_num_columns / 4); - posn[1] = (char) (video_num_lines / 3); + posn[0] = (unsigned char) (video_num_columns / 4); + posn[1] = (unsigned char) (video_num_lines / 3); putconsxy(suspend_console, posn); /* Blank out previous contents of line - assumes text length <= bar width */ @@ -557,7 +552,6 @@ barposn = 0; hide_cursor(suspend_console); - MDELAY(1000); console_loglevel = orig_loglevel; #endif } @@ -642,7 +636,7 @@ PRINTNOLOG(SUSPEND_VERBOSE, 1, "Pausing %s.\n", SUSPEND_PAUSE ? "enabled" : "disabled"); while ((shift_state & (1 << KG_SHIFT))) - yield(); + schedule(); toggled = 1; } if (SUSPEND_PAUSE && (!toggled) && (pause)) { /* Don't pause if just toggled */ @@ -656,9 +650,9 @@ console_print(" ", 1); printk("Waiting for you to press and release SHIFT before continuing.\n"); while (!(shift_state & (1 << KG_SHIFT))) - yield(); + schedule(); while ((shift_state & (1 << KG_SHIFT))) - yield(); + schedule(); /* If pressing ALT, toggle ABORTING flag */ if ((!SUSPEND_ABORTING) && (!now_resuming)) { if ((shift_state & (1 << KG_ALT))) { @@ -705,9 +699,9 @@ and that may lead to 100%CPU sucking because those threads just don't manage signals. */ current->flags |= PF_FROZEN; - current->flags &= ~PF_FREEZE; while (current->flags & PF_FROZEN) - yield(); + schedule(); + current->flags &= ~PF_FREEZE; } /* 0 = success, else # of processes that we failed to stop */ @@ -2665,7 +2659,7 @@ prepare_status("Syncing data..."); PRINTK(SUSPEND_VERBOSE, "Calling sys_sync.\n"); sys_sync(); - yield(); + schedule(); PRINTFREEMEM("after calling sys_sync"); /* Stop I/O */ @@ -2768,7 +2762,7 @@ { swsusp_state[0] = 1; while(SUSPEND_PENDING) { - yield(); + schedule(); if (suspend_task) refrigerator(PF_REFRIGERATE); } @@ -2930,13 +2924,13 @@ printk(KERN_ERR "BIG FAT WARNING: if you continue booting with this kernel, be sure to mkswap your swap partition. Otherwise, you may severely damage your filesystem on next reboot with the kernel that wrote the resume image."); printk(KERN_ERR "Press SHIFT to reboot or CONTROL to continue booting with this kernel\n"); while (!(shift_state & ((1 << KG_SHIFT) | (1 << KG_CTRL)))) - yield(); + schedule(); if (shift_state & (1 << KG_SHIFT)) machine_restart(NULL); printk(KERN_ERR "ARE YOU SURE: Unless you really know what you're doing just reboot on the correct kernel or use the noresume boot option."); printk(KERN_ERR "Press SHIFT to reboot or CONTROL to continue booting with this kernel\n"); while (!(shift_state & ((1 << KG_SHIFT) | (1 << KG_CTRL)))) - yield(); + schedule(); if (shift_state & (1 << KG_SHIFT)) machine_restart(NULL); return -EPERM;