Make swsusp work [testing patch]
Subsystems (3)
Hi!
This should make swsusp work. [Don't apply, dirty hacks ahead].
Pavel
arch/i386/kernel/acpi.c +2 -1
@@ -555,7 +555,8 @@*/ void __init acpi_reserve_bootmem (void ) { - acpi_wakeup_address = (unsigned long )alloc_bootmem_low (PAGE_SIZE ); + acpi_wakeup_address = (unsigned long )alloc_bootmem_low (10 *PAGE_SIZE ); +/* FIXME: have to check wakeup code is not > PAGE_SIZE! */ printk (KERN_DEBUG "ACPI: have wakeup address 0x%8.8lx\n" , acpi_wakeup_address); }
arch/i386/kernel/acpi_wakeup.S +66 -33
174 lines not on this page · raw message
arch/i386/kernel/traps.c +2 -0
@@ -211,6 +211,7 @@ ss = regs->xss &0xffff ; }print_modules (); +mdelay (1000 );printk ("CPU: %d\nEIP: %04x:[<%08lx>] %s\nEFLAGS: %08lx\n" ,smp_processor_id (),0xffff & regs->xcs, regs->eip,print_tainted (), regs->eflags);
@@ -223,6 +224,7 @@ regs->xds & 0xffff, regs->xes & 0xffff, ss);printk ("Process %s (pid: %d, threadinfo=%p task=%p)" , current->comm, current->pid,current_thread_info (), current); +mdelay (4000 );/* * When in-kernel, we also print out the stack and code at the * time of the fault..
arch/i386/mm/init.c +1 -1
@@ -488,7 +488,7 @@* the WP-bit has been tested. */ #ifndef CONFIG_SMP -zap_low_mappings (); +// zap_low_mappings(); #endif }
drivers/ide/ide-disk.c +53 -30
125 lines not on this page · raw message
drivers/ide/ide-probe.c +1 -0
@@ -1058,6 +1058,7 @@ "%s","IDE Drive"); drive->gendev.parent = &hwif->gendev; drive->gendev.bus = &ide_bus_type; + drive->gendev.driver_data = drive; sprintf (name, "ide/host%d/bus%d/target%d/lun%d", (hwif->channel && hwif->mate) ? hwif->mate->index : hwif->index,
drivers/ide/ide.c +2 -25
@@ -3122,21 +3122,6 @@#endif } -static int default_standby (ide_drive_t *drive) -{ -return 0 ; -} - -static int default_suspend (ide_drive_t *drive) -{ -return 0 ; -} - -static int default_resume (ide_drive_t *drive) -{ -return 0 ; -} -static int default_flushcache (ide_drive_t *drive) {return 0 ;
@@ -3193,9 +3178,6 @@ {ide_driver_t *d = drive->driver; -if (d->standby ==NULL ) d->standby = default_standby; -if (d->suspend ==NULL ) d->suspend = default_suspend; -if (d->resume ==NULL ) d->resume = default_resume;if (d->flushcache ==NULL ) d->flushcache = default_flushcache;if (d->do_request ==NULL ) d->do_request = default_do_request;if (d->end_request ==NULL ) d->end_request = default_end_request;
@@ -3274,13 +3256,8 @@ide_drive_t * drive =container_of (dev,ide_drive_t,gendev);ide_driver_t * driver = drive->driver; -if (driver) { -if (driver->standby) - driver->standby (drive); -if (driver->cleanup) - driver->cleanup (drive); - } - +if (driver && driver->cleanup) + driver->cleanup (drive);return 0 ; }
drivers/md/md.c +13 -1
@@ -36,6 +36,7 @@#include <linux/bio.h> #include <linux/devfs_fs_kernel.h> #include <linux/buffer_head.h> /* for invalidate_bdev */ +#include <linux/suspend.h> #include <linux/init.h>
@@ -2470,6 +2471,8 @@wait_event_interruptible (thread->wqueue,test_bit (THREAD_WAKEUP , &thread->flags)); +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD );clear_bit (THREAD_WAKEUP , &thread->flags);
@@ -2774,7 +2777,7 @@if (!ok) { mddev->recovery_running = -EIO ;md_recover_arrays (); -// stop recovery, signal do_sync .... +/* stop recovery, signal do_sync .... */ } }
@@ -2795,6 +2798,9 @@struct list_head *tmp;unsigned long last_check; +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD ); +/* just incase thread restarts... */ if (mddev->recovery_running <=0 )return ;
@@ -2810,6 +2816,9 @@ mddev->curr_resync =2 ; ITERATE_MDDEV(mddev2,tmp) { +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD ); +if (mddev2 == mddev)continue ; if (mddev2->curr_resync &&
@@ -2909,6 +2918,9 @@*/ cond_resched (); +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD ); + currspeed = (j-mddev->resync_mark_cnt)/2 /((jiffies-mddev->resync_mark)/HZ +1 ) +1 ;if (currspeed > sysctl_speed_limit_min) {
include/linux/ide.h +0 -3
@@ -1189,9 +1189,6 @@ unsigned supports_dma : 1; unsigned supports_dsc_overlap : 1;int (*cleanup)(ide_drive_t *); -int (*standby)(ide_drive_t *); -int (*suspend)(ide_drive_t *); -int (*resume)(ide_drive_t *);int (*flushcache)(ide_drive_t *);ide_startstop_t (*do_request)(ide_drive_t *,struct request *,sector_t );int (*end_request)(ide_drive_t *,int ,int );
kernel/suspend.c +38 -29
197 lines not on this page · raw message
mm/page_alloc.c +1 -1
@@ -368,7 +368,7 @@unsigned long flags;struct page *page =NULL ; -if (order ==0 ) { +if ((order ==0 ) && !cold) {struct per_cpu_pages *pcp; pcp = &zone->pageset[get_cpu ()].pcp[cold];
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net. What goes next? Inserting advertisment *into* email?