2004-09-09 13:46:25

by Pavel Machek

[permalink] [raw]
Subject: FYI: my current bigdiff

Hi!

This is my bigdiff. It is not for inclusion (I'll have to split it),
but it contains some usefull code (I believe :-).

Oh, it speeds up swsusp quite a lot.

Pavel
--
When do you have heart between your knees?



--- clean-mm/Documentation/power/swsusp.txt 2004-08-24 09:01:50.000000000 +0200
+++ linux-mm/Documentation/power/swsusp.txt 2004-09-07 21:15:17.000000000 +0200
@@ -20,26 +20,6 @@
You need to append resume=/dev/your_swap_partition to kernel command
line. Then you suspend by echo 4 > /proc/acpi/sleep.

-Pavel's unreliable guide to swsusp mess
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-There are currently two versions of swap suspend in the kernel, the old
-"Pavel's" version in kernel/power/swsusp.c and the new "Patrick's"
-version in kernel/power/pmdisk.c. They provide the same functionality;
-the old version looks ugly but was tested, while the new version looks
-nicer but did not receive so much testing. echo 4 > /proc/acpi/sleep
-calls the old version, echo disk > /sys/power/state calls the new one.
-
-[In the future, when the new version is stable enough, two things can
-happen:
-
-* the new version is moved into swsusp.c, and swsusp is renamed to swap
- suspend (Pavel prefers this)
-
-* pmdisk is kept as is and swsusp.c is removed from the kernel]
-
-
-
Article about goals and implementation of Software Suspend for Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Author: G??bor Kuti
@@ -75,10 +55,6 @@
About the code

Things to implement
-- SMP support. I've done an SMP support but since I don't have access to a kind
- of this one I cannot test it. Please SMP people test it. .. Tested it,
- doesn't work. Had no time to figure out why. There is some mess with
- interrupts AFAIK..
- We should only make a copy of data related to kernel segment, since any
process data won't be changed.
- Should make more sanity checks. Or are these enough?
@@ -90,11 +66,6 @@
- We should not free pages at the beginning so aggressively, most of them
go there anyway..

-Drivers that need support
-- pc_keyb -- perhaps we can wait for vojtech's input patches
-- do IDE cdroms need some kind of support?
-- IDE CD-RW -- how to deal with that?
-
Sleep states summary (thanx, Ducrot)
====================================

@@ -109,7 +80,8 @@
echo 4b > /proc/acpi/sleep # for suspend to disk via s4bios


-FAQ:
+Frequently Asked Questions
+==========================

Q: well, suspending a server is IMHO a really stupid thing,
but... (Diego Zuccato):
--- clean-mm/arch/i386/kernel/acpi/wakeup.S 2004-08-24 09:02:23.000000000 +0200
+++ linux-mm/arch/i386/kernel/acpi/wakeup.S 2004-09-07 21:15:17.000000000 +0200
@@ -11,8 +11,23 @@
#
# If physical address of wakeup_code is 0x12345, BIOS should call us with
# cs = 0x1234, eip = 0x05
-#
+#

+#define BEEP \
+ inb $97, %al; \
+ outb %al, $0x80; \
+ movb $3, %al; \
+ outb %al, $97; \
+ outb %al, $0x80; \
+ movb $-74, %al; \
+ outb %al, $67; \
+ outb %al, $0x80; \
+ movb $-119, %al; \
+ outb %al, $66; \
+ outb %al, $0x80; \
+ movb $15, %al; \
+ outb %al, $66;
+
ALIGN
.align 4096
ENTRY(wakeup_start)
@@ -20,6 +35,7 @@
wakeup_code_start = .
.code16

+ BEEP
movw $0xb800, %ax
movw %ax,%fs
movw $0x0e00 + 'L', %fs:(0x10)
--- clean-mm/arch/i386/power/swsusp.S 2004-09-07 21:12:20.000000000 +0200
+++ linux-mm/arch/i386/power/swsusp.S 2004-09-09 01:28:28.000000000 +0200
@@ -31,7 +31,7 @@
movl $swsusp_pg_dir-__PAGE_OFFSET,%ecx
movl %ecx,%cr3

- movl pagedir_nosave,%ebx
+ movl pagedir_nosave, %ebx
xorl %eax, %eax
xorl %edx, %edx
.p2align 4,,7
--- clean-mm/drivers/acpi/fan.c 2004-08-24 09:01:53.000000000 +0200
+++ linux-mm/drivers/acpi/fan.c 2004-09-07 21:15:19.000000000 +0200
@@ -94,10 +94,10 @@
goto end;

if (acpi_bus_get_power(fan->handle, &state))
- goto end;
-
- p += sprintf(p, "status: %s\n",
- !state?"on":"off");
+ p += sprintf(p, "status: ERROR\n");
+ else
+ p += sprintf(p, "status: %s\n",
+ !state?"on":"off");

end:
len = (p - page);
--- clean-mm/drivers/acpi/sleep/proc.c 2004-08-24 09:03:14.000000000 +0200
+++ linux-mm/drivers/acpi/sleep/proc.c 2004-09-07 21:15:19.000000000 +0200
@@ -57,7 +57,8 @@
int error = 0;

if (count > sizeof(str) - 1)
- goto Done;
+ return -EIO;
+
memset(str,0,sizeof(str));
if (copy_from_user(str, buffer, count))
return -EFAULT;
@@ -65,17 +66,16 @@
/* Check for S4 bios request */
if (!strcmp(str,"4b")) {
error = acpi_suspend(4);
- goto Done;
+ return error ? error : count;
}
state = simple_strtoul(str, NULL, 0);
#ifdef CONFIG_SOFTWARE_SUSPEND
if (state == 4) {
- software_suspend();
- goto Done;
+ error = software_suspend();
+ return error ? error : count;
}
#endif
error = acpi_suspend(state);
- Done:
return error ? error : count;
}

--- clean-mm/drivers/base/power/power.h 2004-08-24 09:01:51.000000000 +0200
+++ linux-mm/drivers/base/power/power.h 2004-09-07 21:15:19.000000000 +0200
@@ -1,5 +1,4 @@
-
-
+/* FIXME: This needs explanation... */
enum {
DEVICE_PM_ON,
DEVICE_PM1,
--- clean-mm/drivers/char/keyboard.c 2004-09-07 21:12:22.000000000 +0200
+++ linux-mm/drivers/char/keyboard.c 2004-09-07 21:15:19.000000000 +0200
@@ -1076,6 +1076,23 @@
sysrq_down = down;
return;
}
+ if (test_bit(KEY_LEFTALT, key_down) &&
+ test_bit(KEY_RIGHTALT, key_down) &&
+ test_bit(KEY_LEFTSHIFT, key_down) &&
+ test_bit(KEY_RIGHTSHIFT, key_down) &&
+ down && !rep) {
+ handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty);
+#ifdef CONFIG_KGDB_SYSRQ
+ sysrq_down = 0; /* in case we miss the "up" event */
+#endif
+ return;
+ }
+
+ if (down)
+ set_bit(keycode, key_down);
+ else
+ clear_bit(keycode, key_down);
+
if (sysrq_down && down && !rep) {
handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty);
#ifdef CONFIG_KGDB_SYSRQ
@@ -1111,11 +1128,6 @@
raw_mode = 1;
}

- if (down)
- set_bit(keycode, key_down);
- else
- clear_bit(keycode, key_down);
-
if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty &&
(!L_ECHO(tty) && tty->driver->chars_in_buffer(tty))))) {
/*
--- clean-mm/drivers/video/aty/radeon_pm.c 2004-08-24 09:03:18.000000000 +0200
+++ linux-mm/drivers/video/aty/radeon_pm.c 2004-09-07 21:15:20.000000000 +0200
@@ -871,7 +871,8 @@
agp_enable(0);
#endif

- fb_set_suspend(info, 1);
+ if (system_state != SYSTEM_SNAPSHOT)
+ fb_set_suspend(info, 1);

if (!(info->flags & FBINFO_HWACCEL_DISABLED)) {
/* Make sure engine is reset */
@@ -880,12 +881,14 @@
radeon_engine_idle();
}

- /* Blank display and LCD */
- radeonfb_blank(VESA_POWERDOWN, info);
-
- /* Sleep */
- rinfo->asleep = 1;
- rinfo->lock_blank = 1;
+ if (system_state != SYSTEM_SNAPSHOT) {
+ /* Blank display and LCD */
+ radeonfb_blank(VESA_POWERDOWN, info);
+
+ /* Sleep */
+ rinfo->asleep = 1;
+ rinfo->lock_blank = 1;
+ }

/* Suspend the chip to D2 state when supported
*/
--- clean-mm/fs/bio.c 2004-09-07 21:12:30.000000000 +0200
+++ linux-mm/fs/bio.c 2004-09-07 21:15:20.000000000 +0200
@@ -143,7 +143,7 @@

bio = mempool_alloc(bio_pool, gfp_mask);
if (unlikely(!bio))
- goto out;
+ return NULL;

bio_init(bio);

@@ -157,13 +157,11 @@
noiovec:
bio->bi_io_vec = bvl;
bio->bi_destructor = bio_destructor;
-out:
return bio;
}

mempool_free(bio, bio_pool);
- bio = NULL;
- goto out;
+ return NULL;
}

/**
--- clean-mm/include/linux/page-flags.h 2004-09-07 21:12:33.000000000 +0200
+++ linux-mm/include/linux/page-flags.h 2004-09-07 21:15:21.000000000 +0200
@@ -75,7 +75,7 @@
#define PG_swapcache 16 /* Swap page: swp_entry_t in private */
#define PG_mappedtodisk 17 /* Has blocks allocated on-disk */
#define PG_reclaim 18 /* To be reclaimed asap */
-
+#define PG_nosave_free 19 /* Page is free and should not be written */

/*
* Global page accounting. One instance per CPU. Only unsigned longs are
@@ -278,6 +278,10 @@
#define ClearPageNosave(page) clear_bit(PG_nosave, &(page)->flags)
#define TestClearPageNosave(page) test_and_clear_bit(PG_nosave, &(page)->flags)

+#define PageNosaveFree(page) test_bit(PG_nosave_free, &(page)->flags)
+#define SetPageNosaveFree(page) set_bit(PG_nosave_free, &(page)->flags)
+#define ClearPageNosaveFree(page) clear_bit(PG_nosave_free, &(page)->flags)
+
#define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags)
#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
--- clean-mm/include/linux/suspend.h 2004-09-07 21:12:33.000000000 +0200
+++ linux-mm/include/linux/suspend.h 2004-09-07 21:15:22.000000000 +0200
@@ -31,6 +31,7 @@

/* mm/page_alloc.c */
extern void drain_local_pages(void);
+extern void mark_free_pages(struct zone *zone);

/* kernel/power/swsusp.c */
extern int software_suspend(void);
--- clean-mm/kernel/power/disk.c 2004-09-07 21:12:33.000000000 +0200
+++ linux-mm/kernel/power/disk.c 2004-09-08 22:47:41.000000000 +0200
@@ -71,7 +71,7 @@
machine_halt();
/* Valid image is on the disk, if we continue we risk serious data corruption
after resume. */
- printk("Please power me down manually\n");
+ printk(KERN_CRIT "Please power me down manually\n");
while(1);
return 0;
}
@@ -91,10 +91,20 @@

static void free_some_memory(void)
{
- printk("Freeing memory: ");
- while (shrink_all_memory(10000))
- printk(".");
- printk("|\n");
+ unsigned int i = 0;
+ unsigned int tmp;
+ unsigned long pages = 0;
+ char *p = "-\\|/";
+
+ printk("Freeing memory... ");
+ while ((tmp = shrink_all_memory(10000))) {
+ pages += tmp;
+ printk("\b%c", p[i]);
+ i++;
+ if (i > 3)
+ i = 0;
+ }
+ printk("\bdone (%li pages freed)\n", pages);
}


@@ -167,6 +177,7 @@
{
int error;

+ system_state = SYSTEM_SNAPSHOT;
if ((error = prepare()))
return error;

--- clean-mm/kernel/power/swsusp.c 2004-09-07 21:12:33.000000000 +0200
+++ linux-mm/kernel/power/swsusp.c 2004-09-09 08:56:20.000000000 +0200
@@ -74,11 +74,9 @@
/* References to section boundaries */
extern char __nosave_begin, __nosave_end;

-extern int is_head_of_free_region(struct page *);
-
/* Variables to be preserved over suspend */
-int pagedir_order_check;
-int nr_copy_pages_check;
+static int pagedir_order_check;
+static int nr_copy_pages_check;

extern char resume_file[];
static dev_t resume_device;
@@ -99,8 +97,8 @@
MMU hardware.
*/
suspend_pagedir_t *pagedir_nosave __nosavedata = NULL;
-suspend_pagedir_t *pagedir_save;
-int pagedir_order __nosavedata = 0;
+static suspend_pagedir_t *pagedir_save;
+static int pagedir_order __nosavedata = 0;

#define SWSUSP_SIG "S1SUSPEND"

@@ -119,9 +117,6 @@
*/
#define PAGES_FOR_IO 512

-static const char name_suspend[] = "Suspend Machine: ";
-static const char name_resume[] = "Resume Machine: ";
-
/*
* Saving part...
*/
@@ -141,10 +136,10 @@
rw_swap_page_sync(READ,
swp_entry(root_swap, 0),
virt_to_page((unsigned long)&swsusp_header));
- if (!memcmp("SWAP-SPACE",swsusp_header.sig,10) ||
- !memcmp("SWAPSPACE2",swsusp_header.sig,10)) {
- memcpy(swsusp_header.orig_sig,swsusp_header.sig,10);
- memcpy(swsusp_header.sig,SWSUSP_SIG,10);
+ if (!memcmp("SWAP-SPACE",swsusp_header.sig, 10) ||
+ !memcmp("SWAPSPACE2",swsusp_header.sig, 10)) {
+ memcpy(swsusp_header.orig_sig,swsusp_header.sig, 10);
+ memcpy(swsusp_header.sig,SWSUSP_SIG, 10);
swsusp_header.swsusp_info = prev;
error = rw_swap_page_sync(WRITE,
swp_entry(root_swap, 0),
@@ -265,9 +260,10 @@


/**
- * free_data - Free the swap entries used by the saved image.
+ * data_free - Free the swap entries used by the saved image.
*
* Walk the list of used swap entries and free each one.
+ * This is only used for cleanup when suspend fails.
*/

static void data_free(void)
@@ -287,7 +283,7 @@


/**
- * write_data - Write saved image to swap.
+ * data_write - Write saved image to swap.
*
* Walk the list of pages in the image and sync each one to swap.
*/
@@ -296,15 +292,19 @@
{
int error = 0;
int i;
-
- printk( "Writing data to swap (%d pages): ", nr_copy_pages );
+ unsigned int mod = nr_copy_pages / 100;
+
+ if (!mod)
+ mod = 1;
+
+ printk( "Writing data to swap (%d pages)... ", nr_copy_pages );
for (i = 0; i < nr_copy_pages && !error; i++) {
- if (!(i%100))
- printk( "." );
+ if (!(i%mod))
+ printk( "\b\b\b\b%3d%%", i / mod );
error = write_page((pagedir_nosave+i)->address,
&((pagedir_nosave+i)->swap_address));
}
- printk(" %d Pages done.\n",i);
+ printk("\b\b\b\bdone\n");
return error;
}

@@ -351,15 +351,16 @@
}

/**
- * free_pagedir - Free pages used by the page directory.
+ * free_pagedir_entries - Free pages used by the page directory.
+ *
+ * This is used during suspend for error recovery.
*/

static void free_pagedir_entries(void)
{
- int num = swsusp_info.pagedir_pages;
int i;

- for (i = 0; i < num; i++)
+ for (i = 0; i < swsusp_info.pagedir_pages; i++)
swap_free(swsusp_info.pagedir[i]);
}

@@ -379,7 +380,7 @@
swsusp_info.pagedir_pages = n;
printk( "Writing pagedir (%d pages)\n", n);
for (i = 0; i < n && !error; i++, addr += PAGE_SIZE)
- error = write_page(addr,&swsusp_info.pagedir[i]);
+ error = write_page(addr, &swsusp_info.pagedir[i]);
return error;
}

@@ -423,12 +424,12 @@
static int save_highmem_zone(struct zone *zone)
{
unsigned long zone_pfn;
+ mark_free_pages(zone);
for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
struct page *page;
struct highmem_page *save;
void *kaddr;
unsigned long pfn = zone_pfn + zone->zone_start_pfn;
- int chunk_size;

if (!(pfn%1000))
printk(".");
@@ -445,11 +446,8 @@
printk("highmem reserved page?!\n");
continue;
}
- if ((chunk_size = is_head_of_free_region(page))) {
- pfn += chunk_size - 1;
- zone_pfn += chunk_size - 1;
+ if (PageNosaveFree(page))
continue;
- }
save = kmalloc(sizeof(struct highmem_page), GFP_ATOMIC);
if (!save)
return -ENOMEM;
@@ -528,14 +526,11 @@
static int saveable(struct zone * zone, unsigned long * zone_pfn)
{
unsigned long pfn = *zone_pfn + zone->zone_start_pfn;
- unsigned long chunk_size;
struct page * page;

if (!pfn_valid(pfn))
return 0;

- if (!(pfn%1000))
- printk(".");
page = pfn_to_page(pfn);
BUG_ON(PageReserved(page) && PageNosave(page));
if (PageNosave(page))
@@ -544,10 +539,8 @@
pr_debug("[nosave pfn 0x%lx]", pfn);
return 0;
}
- if ((chunk_size = is_head_of_free_region(page))) {
- *zone_pfn += chunk_size - 1;
+ if (PageNosaveFree(page))
return 0;
- }

return 1;
}
@@ -561,6 +554,7 @@

for_each_zone(zone) {
if (!is_highmem(zone)) {
+ mark_free_pages(zone);
for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
nr_copy_pages += saveable(zone, &zone_pfn);
}
@@ -575,50 +569,20 @@
struct pbe * pbe = pagedir_nosave;

for_each_zone(zone) {
- if (!is_highmem(zone))
- for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
- if (saveable(zone, &zone_pfn)) {
- struct page * page;
- page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
- pbe->orig_address = (long) page_address(page);
- /* copy_page is no usable for copying task structs. */
- memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
- pbe++;
- }
- }
- }
-}
-
-
-static void free_suspend_pagedir_zone(struct zone *zone, unsigned long pagedir)
-{
- unsigned long zone_pfn, pagedir_end, pagedir_pfn, pagedir_end_pfn;
- pagedir_end = pagedir + (PAGE_SIZE << pagedir_order);
- pagedir_pfn = __pa(pagedir) >> PAGE_SHIFT;
- pagedir_end_pfn = __pa(pagedir_end) >> PAGE_SHIFT;
- for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
- struct page *page;
- unsigned long pfn = zone_pfn + zone->zone_start_pfn;
- if (!pfn_valid(pfn))
- continue;
- page = pfn_to_page(pfn);
- if (!TestClearPageNosave(page))
- continue;
- else if (pfn >= pagedir_pfn && pfn < pagedir_end_pfn)
+ if (is_highmem(zone))
continue;
- __free_page(page);
- }
-}
-
-void swsusp_free(void)
-{
- unsigned long p = (unsigned long)pagedir_save;
- struct zone *zone;
- for_each_zone(zone) {
- if (!is_highmem(zone))
- free_suspend_pagedir_zone(zone, p);
+ mark_free_pages(zone);
+ for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) {
+ if (saveable(zone, &zone_pfn)) {
+ struct page * page;
+ page = pfn_to_page(zone_pfn + zone->zone_start_pfn);
+ pbe->orig_address = (long) page_address(page);
+ /* copy_page is not usable for copying task structs. */
+ memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE);
+ pbe++;
+ }
+ }
}
- free_pages(p, pagedir_order);
}


@@ -668,8 +632,8 @@
/**
* alloc_pagedir - Allocate the page directory.
*
- * First, determine exactly how many contiguous pages we need,
- * allocate them, then mark each 'unsavable'.
+ * First, determine exactly how many contiguous pages we need and
+ * allocate them.
*/

static int alloc_pagedir(void)
@@ -684,6 +648,24 @@
return 0;
}

+/**
+ * free_image_pages - Free pages allocated for snapshot
+ */
+
+static void free_image_pages(void)
+{
+ struct pbe * p;
+ int i;
+
+ p = pagedir_save;
+ for (i = 0, p = pagedir_save; i < nr_copy_pages; i++, p++) {
+ if (p->address) {
+ ClearPageNosave(virt_to_page(p->address));
+ free_page(p->address);
+ p->address = 0;
+ }
+ }
+}

/**
* alloc_image_pages - Allocate pages for the snapshot.
@@ -697,18 +679,19 @@

for (i = 0, p = pagedir_save; i < nr_copy_pages; i++, p++) {
p->address = get_zeroed_page(GFP_ATOMIC | __GFP_COLD);
- if(!p->address)
- goto Error;
+ if (!p->address)
+ return -ENOMEM;
SetPageNosave(virt_to_page(p->address));
}
return 0;
- Error:
- do {
- if (p->address)
- free_page(p->address);
- p->address = 0;
- } while (p-- > pagedir_save);
- return -ENOMEM;
+}
+
+void swsusp_free(void)
+{
+ BUG_ON(PageNosave(virt_to_page(pagedir_save)));
+ BUG_ON(PageNosaveFree(virt_to_page(pagedir_save)));
+ free_image_pages();
+ free_pages((unsigned long) pagedir_save, pagedir_order);
}


@@ -721,7 +704,7 @@

static int enough_free_mem(void)
{
- if(nr_free_pages() < (nr_copy_pages + PAGES_FOR_IO)) {
+ if (nr_free_pages() < (nr_copy_pages + PAGES_FOR_IO)) {
pr_debug("swsusp: Not enough free pages: Have %d\n",
nr_free_pages());
return 0;
@@ -757,7 +740,7 @@
int error;

pr_debug("suspend: (pages needed: %d + %d free: %d)\n",
- nr_copy_pages,PAGES_FOR_IO,nr_free_pages());
+ nr_copy_pages, PAGES_FOR_IO, nr_free_pages());

pagedir_nosave = NULL;
if (!enough_free_mem())
@@ -788,7 +771,7 @@

pr_debug("swsusp: critical section: \n");
if (save_highmem()) {
- printk(KERN_CRIT "%sNot enough free pages for highmem\n", name_suspend);
+ printk(KERN_CRIT "Suspend machine: Not enough free pages for highmem\n");
return -ENOMEM;
}

@@ -872,6 +855,7 @@

/* Even mappings of "global" things (vmalloc) need to be fixed */
__flush_tlb_global();
+ wbinvd(); /* Nigel says wbinvd here is good idea... */
return 0;
}

@@ -907,8 +891,8 @@
int i;
unsigned long addre = addr + (PAGE_SIZE<<order);

- for(i=0; i < nr_copy_pages; i++)
- if((pagedir+i)->orig_address >= addr &&
+ for (i=0; i < nr_copy_pages; i++)
+ if ((pagedir+i)->orig_address >= addr &&
(pagedir+i)->orig_address < addre)
return 1;

@@ -950,9 +934,9 @@

printk("Relocating pagedir ");

- if(!does_collide_order(old_pagedir, (unsigned long)old_pagedir, pagedir_order)) {
+ if (!does_collide_order(old_pagedir, (unsigned long)old_pagedir, pagedir_order)) {
printk("not necessary\n");
- return 0;
+ return check_pagedir();
}

while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order)) != NULL) {
@@ -994,24 +978,14 @@

static atomic_t io_done = ATOMIC_INIT(0);

-static void start_io(void)
-{
- atomic_set(&io_done,1);
-}
-
static int end_io(struct bio * bio, unsigned int num, int err)
{
- atomic_set(&io_done,0);
+ if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
+ panic("I/O error reading memory image");
+ atomic_set(&io_done, 0);
return 0;
}

-static void wait_io(void)
-{
- while(atomic_read(&io_done))
- io_schedule();
-}
-
-
static struct block_device * resume_bdev;

/**
@@ -1030,7 +1004,7 @@
int error = 0;
struct bio * bio;

- bio = bio_alloc(GFP_ATOMIC,1);
+ bio = bio_alloc(GFP_ATOMIC, 1);
if (!bio)
return -ENOMEM;
bio->bi_sector = page_off * (PAGE_SIZE >> 9);
@@ -1046,9 +1020,12 @@

if (rw == WRITE)
bio_set_pages_dirty(bio);
- start_io();
+
+ atomic_set(&io_done, 1);
submit_bio(rw | (1 << BIO_RW_SYNC), bio);
- wait_io();
+ while (atomic_read(&io_done))
+ yield();
+
Done:
bio_put(bio);
return error;
@@ -1056,12 +1033,12 @@

int bio_read_page(pgoff_t page_off, void * page)
{
- return submit(READ,page_off,page);
+ return submit(READ, page_off, page);
}

int bio_write_page(pgoff_t page_off, void * page)
{
- return submit(WRITE,page_off,page);
+ return submit(WRITE, page_off, page);
}

/*
@@ -1104,6 +1081,7 @@
return -EPERM;
}
nr_copy_pages = swsusp_info.image_pages;
+ pagedir_order = get_bitmask_order(SUSPEND_PD_PAGES(nr_copy_pages));
return error;
}

@@ -1111,16 +1089,16 @@
{
int error;

- memset(&swsusp_header,0,sizeof(swsusp_header));
- if ((error = bio_read_page(0,&swsusp_header)))
+ memset(&swsusp_header, 0, sizeof(swsusp_header));
+ if ((error = bio_read_page(0, &swsusp_header)))
return error;
- if (!memcmp(SWSUSP_SIG,swsusp_header.sig,10)) {
- memcpy(swsusp_header.sig,swsusp_header.orig_sig,10);
+ if (!memcmp(SWSUSP_SIG, swsusp_header.sig, 10)) {
+ memcpy(swsusp_header.sig, swsusp_header.orig_sig, 10);

/*
* Reset swap signature now.
*/
- error = bio_write_page(0,&swsusp_header);
+ error = bio_write_page(0, &swsusp_header);
} else {
pr_debug(KERN_ERR "swsusp: Suspend partition has wrong signature?\n");
return -EINVAL;
@@ -1130,17 +1108,6 @@
return error;
}

-
-int __init verify(void)
-{
- int error;
-
- if (!(error = check_sig()))
- error = check_header();
- return error;
-}
-
-
/**
* swsusp_read_data - Read image pages from swap.
*
@@ -1153,14 +1120,18 @@
struct pbe * p;
int error;
int i;
-
+ int mod = nr_copy_pages / 100;
+
+ if (!mod)
+ mod = 1;
+
if ((error = swsusp_pagedir_relocate()))
return error;

- printk( "Reading image data (%d pages): ", nr_copy_pages );
+ printk( "Reading image data (%d pages): ", nr_copy_pages );
for(i = 0, p = pagedir_nosave; i < nr_copy_pages && !error; i++, p++) {
- if (!(i%100))
- printk( "." );
+ if (!(i%mod))
+ printk( "\b\b\b\b%3d%%", i / mod );
error = bio_read_page(swp_offset(p->swap_address),
(void *)p->address);
}
@@ -1177,9 +1148,7 @@
int i, n = swsusp_info.pagedir_pages;
int error = 0;

- pagedir_order = get_bitmask_order(n);
-
- addr =__get_free_pages(GFP_ATOMIC, pagedir_order);
+ addr = __get_free_pages(GFP_ATOMIC, pagedir_order);
if (!addr)
return -ENOMEM;
pagedir_nosave = (struct pbe *)addr;
@@ -1194,7 +1163,7 @@
error = -EFAULT;
}
if (error)
- free_pages((unsigned long)pagedir_nosave,pagedir_order);
+ free_pages((unsigned long)pagedir_nosave, pagedir_order);
return error;
}

@@ -1202,13 +1171,14 @@
{
int error = 0;

- if ((error = verify()))
+ if ((error = check_sig()))
+ return error;
+ if ((error = check_header()))
return error;
if ((error = read_pagedir()))
return error;
- if ((error = data_read())) {
- free_pages((unsigned long)pagedir_nosave,pagedir_order);
- }
+ if ((error = data_read()))
+ free_pages((unsigned long)pagedir_nosave, pagedir_order);
return error;
}

--- clean-mm/mm/page_alloc.c 2004-09-07 21:12:33.000000000 +0200
+++ linux-mm/mm/page_alloc.c 2004-09-07 21:15:23.000000000 +0200
@@ -437,26 +437,30 @@
#endif /* CONFIG_PM || CONFIG_HOTPLUG_CPU */

#ifdef CONFIG_PM
-int is_head_of_free_region(struct page *page)
+
+void mark_free_pages(struct zone *zone)
{
- struct zone *zone = page_zone(page);
- unsigned long flags;
+ unsigned long zone_pfn, flags;
int order;
struct list_head *curr;

- /*
- * Should not matter as we need quiescent system for
- * suspend anyway, but...
- */
+ if (!zone->spanned_pages)
+ return;
+
spin_lock_irqsave(&zone->lock, flags);
+ for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn)
+ ClearPageNosaveFree(pfn_to_page(zone_pfn + zone->zone_start_pfn));
+
for (order = MAX_ORDER - 1; order >= 0; --order)
- list_for_each(curr, &zone->free_area[order].free_list)
- if (page == list_entry(curr, struct page, lru)) {
- spin_unlock_irqrestore(&zone->lock, flags);
- return 1 << order;
- }
+ list_for_each(curr, &zone->free_area[order].free_list) {
+ unsigned long start_pfn, i;
+
+ start_pfn = page_to_pfn(list_entry(curr, struct page, lru));
+
+ for (i=0; i < (1<<order); i++)
+ SetPageNosaveFree(pfn_to_page(start_pfn+i));
+ }
spin_unlock_irqrestore(&zone->lock, flags);
- return 0;
}

/*


2004-09-10 04:13:31

by Kevin Fenzi

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Pavel" == Pavel Machek <[email protected]> writes:

Pavel> Hi! This is my bigdiff. It is not for inclusion (I'll have to
Pavel> split it), but it contains some usefull code (I believe :-).

Pavel> Oh, it speeds up swsusp quite a lot.

Indeed it does.

After 42 days of uptime with 2.6.8-rc2-mm1 I decided to upgrade.
swsusp was very stable, but was getting slower and slower. Eariler
tonight I suspended and it took about 15min to finish suspending.

So, I built a new 2.6.9-rc1-mm4 + this bigdiff for swsusp.

First suspend worked.
First resume came back, but all kinds of problems with my network,
with my usb, and with sound.

After looking around a bit it seems this is the issue:

Sep 9 21:32:27 voldemort kernel: ** PCI interrupts are no longer routed automatically. If this
Sep 9 21:32:27 voldemort kernel: ** causes a device to stop working, it is probably because the
Sep 9 21:32:27 voldemort kernel: ** driver failed to call pci_enable_device(). As a temporary
Sep 9 21:32:27 voldemort kernel: ** workaround, the "pci=routeirq" argument restores the old
Sep 9 21:32:27 voldemort kernel: ** behavior. If this argument makes the device work again,
Sep 9 21:32:27 voldemort kernel: ** please email the output of "lspci" to [email protected]
Sep 9 21:32:27 voldemort kernel: ** so I can fix the driver.

After that first suspend/resume:

Sep 9 21:35:28 voldemort kernel: Stopping tasks: ====================================|
Sep 9 21:35:28 voldemort kernel: Freeing memory... ^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H
\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-
^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^
H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^Hdone (44436 pages freed)

(BTW, that looks pretty nasty in the logs, even though it's very nice
to watch)

Sep 9 21:35:28 voldemort kernel: swsusp: Need to copy 13410 pages
Sep 9 21:35:28 voldemort kernel: ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
Sep 9 21:35:28 voldemort kernel: ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
Sep 9 21:35:28 voldemort kernel: ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
Sep 9 21:35:28 voldemort kernel: Restarting tasks... done
Sep 9 21:35:30 voldemort kernel: usbcore: registered new driver usbfs
Sep 9 21:35:30 voldemort kernel: usbcore: registered new driver hub
Sep 9 21:35:30 voldemort kernel: ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
Sep 9 21:35:30 voldemort kernel: ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
Sep 9 21:35:30 voldemort kernel: ohci_hcd 0000:02:0e.0: NEC Corporation USB
Sep 9 21:35:31 voldemort kernel: irq 10: nobody cared!
Sep 9 21:35:31 voldemort kernel: [<c01083ef>] __report_bad_irq+0x2a/0x8b
Sep 9 21:35:31 voldemort kernel: [<c01085e1>] note_interrupt+0x7c/0xde
Sep 9 21:35:31 voldemort kernel: [<c0108847>] do_IRQ+0xf7/0x116
Sep 9 21:35:31 voldemort kernel: [<c010678c>] common_interrupt+0x18/0x20
Sep 9 21:35:31 voldemort kernel: [<c011fa5f>] __do_softirq+0x2f/0x87
Sep 9 21:35:31 voldemort kernel: [<c011fadd>] do_softirq+0x26/0x28
Sep 9 21:35:31 voldemort kernel: [<c0108826>] do_IRQ+0xd6/0x116
Sep 9 21:35:31 voldemort kernel: [<c010678c>] common_interrupt+0x18/0x20
Sep 9 21:35:31 voldemort kernel: [<c0108c71>] setup_irq+0x69/0xaa
Sep 9 21:35:31 voldemort kernel: [<f88b68aa>] usb_hcd_irq+0x0/0x67 [usbcore]
Sep 9 21:35:31 voldemort kernel: [<c010891c>] request_irq+0x83/0xc5
Sep 9 21:35:31 voldemort kernel: [<f88ba6af>] usb_hcd_pci_probe+0x1f5/0x4dc [usbcore]
Sep 9 21:35:31 voldemort kernel: [<f88b68aa>] usb_hcd_irq+0x0/0x67 [usbcore]
Sep 9 21:35:31 voldemort kernel: [<c01863e1>] sysfs_make_dirent+0x2b/0x97
Sep 9 21:35:31 voldemort kernel: [<c01e3e58>] pci_device_probe_static+0x52/0x61
Sep 9 21:35:31 voldemort kernel: [<c01e3ea2>] __pci_device_probe+0x3b/0x4e
Sep 9 21:35:31 voldemort kernel: [<c01e3ee1>] pci_device_probe+0x2c/0x4a
Sep 9 21:35:31 voldemort kernel: [<c0229acd>] bus_match+0x3f/0x6a
Sep 9 21:35:31 voldemort kernel: [<c0229bdf>] driver_attach+0x56/0x80
Sep 9 21:35:31 voldemort kernel: [<c022a032>] bus_add_driver+0x91/0xaf
Sep 9 21:35:31 voldemort kernel: [<c022a54d>] driver_register+0x2f/0x33
Sep 9 21:35:31 voldemort kernel: [<c01e4120>] pci_register_driver+0x5c/0x84
Sep 9 21:35:31 voldemort kernel: [<f887e037>] ohci_hcd_pci_init+0x37/0x44 [ohci_hcd]
Sep 9 21:35:31 voldemort kernel: [<c0130ea8>] sys_init_module+0x135/0x1ba
Sep 9 21:35:31 voldemort kernel: [<c0105dcd>] sysenter_past_esp+0x52/0x71
Sep 9 21:35:31 voldemort kernel: handlers:
Sep 9 21:35:31 voldemort kernel: [<f88b68aa>] (usb_hcd_irq+0x0/0x67 [usbcore])
Sep 9 21:35:31 voldemort kernel: Disabling IRQ #10
Sep 9 21:35:31 voldemort kernel: ohci_hcd 0000:02:0e.0: irq 10, pci mem 0x40180000
Sep 9 21:35:31 voldemort kernel: ohci_hcd 0000:02:0e.0: new USB bus registered, assigned bus number 1
Sep 9 21:35:32 voldemort kernel: hub 1-0:1.0: USB hub found
Sep 9 21:35:32 voldemort kernel: hub 1-0:1.0: 3 ports detected
Sep 9 21:35:32 voldemort kernel: ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
Sep 9 21:35:32 voldemort kernel: ohci_hcd 0000:02:0e.1: NEC Corporation USB (#2)
Sep 9 21:35:32 voldemort kernel: ohci_hcd 0000:02:0e.1: irq 10, pci mem 0x40200000
Sep 9 21:35:32 voldemort kernel: ohci_hcd 0000:02:0e.1: new USB bus registered, assigned bus number 2
Sep 9 21:35:33 voldemort kernel: hub 2-0:1.0: USB hub found
Sep 9 21:35:33 voldemort kernel: hub 2-0:1.0: 2 ports detected
Sep 9 21:35:33 voldemort kernel: Loaded prism54 driver, version 1.2
Sep 9 21:35:33 voldemort kernel: ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 11 (level, low) -> IRQ 11
Sep 9 21:35:33 voldemort kernel: divert: allocating divert_blk for eth1
Sep 9 21:36:07 voldemort kernel: eth1: resetting device...
Sep 9 21:36:07 voldemort kernel: eth1: uploading firmware...
Sep 9 21:36:08 voldemort kernel: eth1: firmware upload complete
Sep 9 21:36:09 voldemort kernel: eth1: reset problem: no 'reset complete' IRQ seen
Sep 9 21:36:09 voldemort kernel: eth1: timeout waiting for mgmt response 1000, triggering device
Sep 9 21:36:10 voldemort kernel: eth1: timeout waiting for mgmt response
Sep 9 21:36:10 voldemort kernel: eth1: mgt_commit_list: failure. oid=ff020008 err=-110
Sep 9 21:36:10 voldemort kernel: eth1: timeout waiting for mgmt response 1000, triggering device
Sep 9 21:36:11 voldemort kernel: eth1: timeout waiting for mgmt response
Sep 9 21:36:11 voldemort kernel: eth1: mgt_commit_list: failure. oid=ff020003 err=-110
Sep 9 21:36:11 voldemort kernel: eth1: timeout waiting for mgmt response 1000, triggering device
Sep 9 21:36:12 voldemort kernel: eth1: timeout waiting for mgmt response
Sep 9 21:36:12 voldemort kernel: eth1: mgt_commit_list: failure. oid=10000000 err=-110
Sep 9 21:36:12 voldemort kernel: eth1: timeout waiting for mgmt response 1000, triggering device
Sep 9 21:36:13 voldemort kernel: eth1: timeout waiting for mgmt response
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=17000007 err=-110
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=19000001 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=10000002 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=19000004 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000000 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000001 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000002 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000004 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000005 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000006 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000007 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=12000003 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=150007e0 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=ff02000c err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit_list: failure. oid=ff020003 err=-12
Sep 9 21:36:13 voldemort kernel: eth1: mgmt tx queue is still full
Sep 9 21:36:13 voldemort kernel: eth1: mgt_update_addr: failure
Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit: failure
Sep 9 21:36:13 voldemort kernel: eth1: interface reset complete

Seems the usb and prism54 didn't play nice.

After booting with the pci=routeirq as suggested wireless and usb
played nice on suspend resume again.
I am copying this to the email address that is mentioned.

So, after that glitch:

- - The display is much nicer. Congrats.

- - Speed does seem to be nicer. It's taking me 40 seconds to do a
complete suspend/resume cycle.

- - Should PREEMPT and/or HIMEM work with this version? I can test them
if support has been added/fixed/tweaked for them.

I have only done a few cycles, but it looks nice and stable. I would
suggest you break it into smaller patches and get it applied.
Being applied to the main tree would be nice.

kevin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFBQSng3imCezTjY0ERAjT0AJwNvCL3WbN2ypJQedPOjL3nlF8DMwCeJYss
WNY5zEepODMsOoq2GNrWhfI=
=vFww
-----END PGP SIGNATURE-----

2004-09-10 09:44:55

by Pavel Machek

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

Hi!

> Pavel> Hi! This is my bigdiff. It is not for inclusion (I'll have to
> Pavel> split it), but it contains some usefull code (I believe :-).
>
> Pavel> Oh, it speeds up swsusp quite a lot.
>
> Indeed it does.
>
> After 42 days of uptime with 2.6.8-rc2-mm1 I decided to upgrade.
> swsusp was very stable, but was getting slower and slower. Eariler
> tonight I suspended and it took about 15min to finish suspending.
>
> So, I built a new 2.6.9-rc1-mm4 + this bigdiff for swsusp.
...
> After that first suspend/resume:
>
> Sep 9 21:35:28 voldemort kernel: Stopping tasks: ====================================|
> Sep 9 21:35:28 voldemort kernel: Freeing memory... ^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H
> \^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-
> ^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^
> H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^Hdone (44436 pages freed)
>
> (BTW, that looks pretty nasty in the logs, even though it's very nice
> to watch)

Hmm, not sure how to solve this. It does not look *that* bad in the
logs, I believe.

> Sep 9 21:36:13 voldemort kernel: eth1: mgt_commit: failure
> Sep 9 21:36:13 voldemort kernel: eth1: interface reset complete
>
> Seems the usb and prism54 didn't play nice.
>
> After booting with the pci=routeirq as suggested wireless and usb
> played nice on suspend resume again.

Good.

> I am copying this to the email address that is mentioned.
>
> So, after that glitch:
>
> - - The display is much nicer. Congrats.
>
> - - Speed does seem to be nicer. It's taking me 40 seconds to do a
> complete suspend/resume cycle.
>
> - - Should PREEMPT and/or HIMEM work with this version? I can test them
> if support has been added/fixed/tweaked for them.

Both should work.

> I have only done a few cycles, but it looks nice and stable. I would
> suggest you break it into smaller patches and get it applied.
> Being applied to the main tree would be nice.

I'm working on that, believe me.
Pavel

2004-09-10 17:30:48

by Kevin Fenzi

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Pavel" == Pavel Machek <[email protected]> writes:

>> kernel: Freeing memory...
>> ^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H
>> \^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-
>> ^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^
>> H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^Hdone
>> (44436 pages freed)
>>
>> (BTW, that looks pretty nasty in the logs, even though it's very
>> nice to watch)

Pavel> Hmm, not sure how to solve this. It does not look *that* bad in
Pavel> the logs, I believe.

Yeah, a minor issue.

>> - - The display is much nicer. Congrats.
>>
>> - - Speed does seem to be nicer. It's taking me 40 seconds to do a
>> complete suspend/resume cycle.
>>
>> - - Should PREEMPT and/or HIMEM work with this version? I can test
>> them if support has been added/fixed/tweaked for them.

Pavel> Both should work.

ok. I have built a 2.6.9-rc1-mm4+bigdiff with preempt and himem
enabled, and everything looks working so far. :)

>> I have only done a few cycles, but it looks nice and stable. I
>> would suggest you break it into smaller patches and get it
>> applied. Being applied to the main tree would be nice.

Pavel> I'm working on that, believe me. Pavel

kevin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFBQeQj3imCezTjY0ERAqXbAJ9hvPiMY4rzKH7coixPcLhNt6zYLgCdFNK2
kHOZED1Wt0S/uDdok5FbtHw=
=8chA
-----END PGP SIGNATURE-----

2004-09-10 22:52:51

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

On Thursday 09 September 2004 10:13 pm, Kevin Fenzi wrote:
> First suspend worked.
> First resume came back, but all kinds of problems with my network,
> with my usb, and with sound.
> ...
> After booting with the pci=routeirq as suggested wireless and usb
> played nice on suspend resume again.

Yes, I've had a couple other reports of this, but haven't made any
progress on tracking it down yet. (The other reports were from
vanilla -mm kernels, so I don't think it's related to Pavel's patch.)

I'm completely ignorant about how swsusp works; I guess this is my
chance to learn. "pci=routeirq" just causes us to do all the PCI
ACPI IRQ routing at boot-time, before the drivers start up. This
happens in pci_acpi_init(), which is a subsys_initcall that is run
at initial boot-time, but (I assume) not during a resume.

- Can you confirm that your USB and prism drivers were loaded
and working fine before the suspend?

- Could you post the whole dmesg log, including the part from
boot to suspend, and also the part after resume? I'd like
to see these both with and without "pci=routeirq" to see if
there's some meaningful difference.

- Can you capture the contents of /proc/interrupts before the
suspend?

Thanks for the problem report.

2004-09-11 16:44:39

by Stefan Seyfried

[permalink] [raw]
Subject: Re: FYI: my current bigdiff



Bjorn Helgaas wrote:

> I'm completely ignorant about how swsusp works; I guess this is my
> chance to learn. "pci=routeirq" just causes us to do all the PCI
> ACPI IRQ routing at boot-time, before the drivers start up. This
> happens in pci_acpi_init(), which is a subsys_initcall that is run
> at initial boot-time, but (I assume) not during a resume.

a resume is basically a fresh boot, including hardware initialization by
the compiled-in drivers (but not modules) but before starting init /
entering initrd, the old system state is read from swap, copied back and
somehow we continue where we left off at suspend time. Now the resume
methods of all device drivers are called, processes are restarted and we
are back in the game. (At least this is how i understood it all :-)

I can easily imagine that a driver with a slightly broken suspend /
resume method may fail without pci=routeirq if it does not do the irq
routing correctly during resume. It may work with pci=routeirq since
then everything is prepared for it before the resume actually happens.

Kevin may get away with unloading the usb host controller and the
prism54 drivers before suspend and reloading them after resume.

Stefan

2004-09-11 18:51:49

by Kevin Fenzi

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Bjorn" == Bjorn Helgaas <[email protected]> writes:

Bjorn> On Thursday 09 September 2004 10:13 pm, Kevin Fenzi wrote:
>> First suspend worked. First resume came back, but all kinds of
>> problems with my network, with my usb, and with sound. ... After
>> booting with the pci=routeirq as suggested wireless and usb played
>> nice on suspend resume again.

Bjorn> Yes, I've had a couple other reports of this, but haven't made
Bjorn> any progress on tracking it down yet. (The other reports were
Bjorn> from vanilla -mm kernels, so I don't think it's related to
Bjorn> Pavel's patch.)

Yeah, sounds like.

Bjorn> I'm completely ignorant about how swsusp works; I guess this is
Bjorn> my chance to learn. "pci=routeirq" just causes us to do all
Bjorn> the PCI ACPI IRQ routing at boot-time, before the drivers start
Bjorn> up. This happens in pci_acpi_init(), which is a
Bjorn> subsys_initcall that is run at initial boot-time, but (I
Bjorn> assume) not during a resume.

Bjorn> - Can you confirm that your USB and prism drivers were loaded
Bjorn> and working fine before the suspend?

Yes. I use the prism54 driver as my main connection on my laptop.
I use usb for a digital camera, it's also working as expected.

Bjorn> - Could you post the whole dmesg log, including the part from
Bjorn> boot to suspend, and also the part after resume? I'd like to
Bjorn> see these both with and without "pci=routeirq" to see if
Bjorn> there's some meaningful difference.

Ok. Attached.

Bjorn> - Can you capture the contents of /proc/interrupts before the
Bjorn> suspend?

Yes. Attached.

First is the dmesgs from boot without pci=routeirq.
Then the /proc/intterrupts from that boot.
Then a suspend.
Then any new dmesg messages
then the /proc/interrupts from that.

Next is the same cycle with the pci=routeirq passed.

Bjorn> Thanks for the problem report.

No problem, hope it helps.

kevin
- --
Linux version 2.6.9-rc1-mm4 ([email protected]) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #2 Fri Sep 10 10:41:56 MDT 2004
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ffd0000 (usable)
BIOS-e820: 000000003ffd0000 - 000000003fff0c00 (reserved)
BIOS-e820: 000000003fff0c00 - 000000003fffc000 (ACPI NVS)
BIOS-e820: 000000003fffc000 - 0000000040000000 (reserved)
127MB HIGHMEM available.
896MB LOWMEM available.
On node 0 totalpages: 262096
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 225280 pages, LIFO batch:16
HighMem zone: 32720 pages, LIFO batch:7
DMI 2.3 present.
ACPI: RSDP (v000 COMPAQ ) @ 0x000f9970
ACPI: RSDT (v001 COMPAQ CPQ004A 0x31050220 CPQ 0x00000001) @ 0x3fff0c84
ACPI: FADT (v002 COMPAQ CPQ004A 0x00000002 CPQ 0x00000001) @ 0x3fff0c00
ACPI: SSDT (v001 COMPAQ CPQGysr 0x00001001 MSFT 0x0100000d) @ 0x3fff64c3
ACPI: SSDT (v001 COMPAQ CPQMag 0x00001001 MSFT 0x0100000d) @ 0x3fff65d1
ACPI: DSDT (v001 COMPAQ EVON800 0x00010000 MSFT 0x0100000d) @ 0x00000000
Built 1 zonelists
No local APIC present or hardware disabled
Initializing CPU#0
Kernel command line: ro root=/dev/hda3 resume=/dev/hda2
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 1794.680 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1035124k/1048384k available (1991k kernel code, 12548k reserved, 811k data, 272k init, 130880k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 3538.94 BogoMIPS (lpj=1769472)
Security Scaffold v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
There is already a security framework initialized, register_security failed.
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 3febf9ff 00000000 00000000 00000000
CPU: After vendor identify, caps: 3febf9ff 00000000 00000000 00000000
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: After all inits, caps: 3febf9ff 00000000 00000000 00000080
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
CPU: Intel(R) Pentium(R) 4 Mobile CPU 1.80GHz stepping 04
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
ACPI: IRQ9 SCI: Edge set to Level Trigger.
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 110k freed
NET: Registered protocol family 16
EISA bus registered
PCI: PCI BIOS revision 2.10 entry at 0xf031f, last bus=3
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [C03C] (00:00)
PCI: Probing PCI hardware (bus 00)
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Routing Table [\_SB_.C03C._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.C03C.C03D._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.C03C.C04E._PRT]
ACPI: Embedded Controller [C0D0] (gpe 29)
ACPI: Power Resource [C140] (off)
ACPI: Power Resource [C154] (off)
ACPI: Power Resource [C158] (off)
ACPI: Power Resource [C15B] (off)
ACPI: Power Resource [C164] (on)
ACPI: PCI Interrupt Link [C0B6] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [C0B7] (IRQs *5 10 11)
ACPI: PCI Interrupt Link [C0B8] (IRQs 5 10 11) *0, disabled.
ACPI: PCI Interrupt Link [C0B9] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [C0BA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [C0BB] (IRQs) *0, disabled.
ACPI: PCI Interrupt Link [C0BC] (IRQs) *0, disabled.
ACPI: PCI Interrupt Link [C0BD] (IRQs) *0, disabled.
ACPI: Power Resource [C0CF] (on)
ACPI: Power Resource [C1D0] (off)
ACPI: Power Resource [C1D1] (off)
ACPI: Power Resource [C1D2] (off)
ACPI: Power Resource [C1D3] (off)
Linux Plug and Play Support v0.97 (c) Adam Belay
toshiba: not a supported Toshiba laptop
i8k: not running on a Dell system
i8k: vendor=Compaq, model=P2800N P180U540W825EC, version=68P
i8k: unable to get SMM Dell signature
i8k: unable to get SMM BIOS version
PCI: Using ACPI for IRQ routing
** PCI interrupts are no longer routed automatically. If this
** causes a device to stop working, it is probably because the
** driver failed to call pci_enable_device(). As a temporary
** workaround, the "pci=routeirq" argument restores the old
** behavior. If this argument makes the device work again,
** please email the output of "lspci" to [email protected]
** so I can fix the driver.
Machine check exception polling timer started.
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
apm: overridden by ACPI.
audit: initializing netlink socket (disabled)
audit(1094905964.4294965768:0): initialized
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
vesafb: probe of vesafb0 failed with error -6
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Real Time Clock Driver v1.12
i8042: ACPI [C161] at I/O 0x60, 0x64, irq 1
i8042: ACPI [C162] at irq 12
i8042.c: Detected active multiplexing controller, rev 1.1.
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
divert: not allocating divert_blk for non-ethernet device lo
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH3M: IDE controller at PCI slot 0000:00:1f.1
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ACPI: PCI Interrupt Link [C0B8] enabled at IRQ 11
ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x4440-0x4447, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x4448-0x444f, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide0...
hda: HTS548080M9AT00, ATA DISK drive
Using anticipatory io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: SD-R2102, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hda: max request size: 1024KiB
hda: 156301488 sectors (80026 MB) w/7877KiB Cache, CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 hda3
ide-floppy driver 0.99.newide
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard on isa0060/serio0
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
EISA: Probing bus 0 at eisa0
NET: Registered protocol family 2
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP: Hash tables configured (established 262144 bind 65536)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 8
NET: Registered protocol family 20
ACPI: (supports S0 S3 S4 S4bios S5)
ACPI wakeup devices:
C04E C0A0 C0A6 C0A9 C161 C162 C177 C11E
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 272k freed
ACPI: AC Adapter [C11A] (on-line)
ACPI: Battery Slot [C11C] (battery present)
ACPI: Battery Slot [C11B] (battery absent)
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [C11E]
ACPI: Lid Switch [C11D]
ACPI: Fan [C1D4] (off)
ACPI: Fan [C1D5] (off)
ACPI: Fan [C1D6] (off)
ACPI: Fan [C1D7] (off)
ACPI: Processor [C000] (supports C1 C2 C3, 8 throttling states)
ACPI: Thermal Zone [TZ1] (51 C)
ACPI: Thermal Zone [TZ2] (46 C)
ACPI: Thermal Zone [TZ3] (16 C)
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI Interrupt Link [C0BA] enabled at IRQ 10
ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.0: NEC Corporation USB
ohci_hcd 0000:02:0e.0: irq 10, pci mem 0x40180000
ohci_hcd 0000:02:0e.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.1: NEC Corporation USB (#2)
ohci_hcd 0000:02:0e.1: irq 10, pci mem 0x40200000
ohci_hcd 0000:02:0e.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
device-mapper: 4.1.0-ioctl (2003-12-10) initialised: [email protected]
Adding 4192956k swap on /dev/hda2. Priority:-1 extents:1
IA-32 Microcode Update Driver: v1.14 <[email protected]>
microcode: No suitable data for CPU0
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.1 (8190 buckets, 65520 max) - 364 bytes per conntrack
e100: Intel(R) PRO/100 Network Driver, 3.0.27-k2-NAPI
e100: Copyright(c) 1999-2004 Intel Corporation
ACPI: PCI interrupt 0000:02:08.0[A] -> GSI 10 (level, low) -> IRQ 10
divert: allocating divert_blk for eth0
e100: eth0: e100_probe: addr 0x40100000, irq 10, MAC addr 00:08:02:62:81:9D
Linux Kernel Card Services
options: [pci] [cardbus] [pm]
ACPI: PCI Interrupt Link [C0B9] enabled at IRQ 11
ACPI: PCI interrupt 0000:02:06.0[A] -> GSI 11 (level, low) -> IRQ 11
Yenta: CardBus bridge found at 0000:02:06.0 [0e11:004a]
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: socket 0000:02:06.0, mfunc 0x012c1202, devctl 0x64
Yenta: ISA IRQ mask 0x00d8, PCI irq 11
Socket status: 30000020
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x378-0x37f 0x3e8-0x3ff 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
Loaded prism54 driver, version 1.2
PCI: Enabling device 0000:03:00.0 (0000 -> 0002)
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 11 (level, low) -> IRQ 11
divert: allocating divert_blk for eth1
eth1: resetting device...
eth1: uploading firmware...
eth1: firmware upload complete
eth1: interface reset complete
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
divert: not allocating divert_blk for non-ethernet device sit0
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
divert: not allocating divert_blk for non-ethernet device tun0
eth1: no IPv6 routers present
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected an Intel i845 Chipset.
agpgart: Maximum main memory to use for agp memory: 941M
agpgart: AGP aperture is 256M @ 0x60000000
Synaptics Touchpad, model: 1
Firmware: 5.9
Sensor: 51
new absolute packet format
Touchpad has extended capability bits
-> 4 multi-buttons, i.e. besides standard buttons
-> multifinger detection
-> palm detection
input: SynPS/2 Synaptics TouchPad on isa0060/serio4
ts: Compaq touchscreen protocol output
[drm] Initialized radeon 1.11.0 20020828 on minor 0: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
CPU0
0: 111883 XT-PIC timer
1: 237 XT-PIC i8042
2: 0 XT-PIC cascade
8: 1 XT-PIC rtc
9: 23 XT-PIC acpi
10: 0 XT-PIC ohci_hcd, ohci_hcd
11: 117 XT-PIC yenta, eth1, radeon@PCI:1:0:0
12: 585 XT-PIC i8042
14: 9452 XT-PIC ide0
15: 1 XT-PIC ide1
NMI: 0
LOC: 0
ERR: 0
MIS: 0
eth1: islpci_close ()
ohci_hcd 0000:02:0e.0: remove, state 1
usb usb1: USB disconnect, address 1
ohci_hcd 0000:02:0e.0: USB bus 1 deregistered
ohci_hcd 0000:02:0e.1: remove, state 1
usb usb2: USB disconnect, address 1
ohci_hcd 0000:02:0e.1: USB bus 2 deregistered
usbcore: deregistering driver usbfs
usbcore: deregistering driver hub
eth1: removing device
divert: freeing divert_blk for eth1
Unloaded prism54 driver
Stopping tasks: ====================================|
Freeing memory... -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|done (41511 pages freed)
.................................swsusp: Need to copy 13254 pages
swsusp: Restoring Highmem
ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
Restarting tasks... done
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.0: NEC Corporation USB
irq 10: nobody cared!
[<c01086fb>] __report_bad_irq+0x2a/0x8b
[<c0108973>] note_interrupt+0x84/0x103
[<c0108c9b>] do_IRQ+0x13e/0x16a
[<c0106964>] common_interrupt+0x18/0x20
[<c0121f9f>] __do_softirq+0x2f/0x87
[<c012201d>] do_softirq+0x26/0x28
[<c0108c70>] do_IRQ+0x113/0x16a
[<c0106964>] common_interrupt+0x18/0x20
[<c01091c6>] setup_irq+0x7c/0xeb
[<f88b8d1e>] usb_hcd_irq+0x0/0x67 [usbcore]
[<c0108d7d>] request_irq+0x83/0xc5
[<f88bcd83>] usb_hcd_pci_probe+0x1f5/0x4dc [usbcore]
[<f88b8d1e>] usb_hcd_irq+0x0/0x67 [usbcore]
[<c01f3941>] pci_device_probe_static+0x52/0x61
[<c01f398b>] __pci_device_probe+0x3b/0x4e
[<c01f39ca>] pci_device_probe+0x2c/0x4a
[<c023b7b5>] bus_match+0x3f/0x6a
[<c023b8c7>] driver_attach+0x56/0x80
[<c023bd1a>] bus_add_driver+0x91/0xaf
[<c023c235>] driver_register+0x2f/0x33
[<c01f3c09>] pci_register_driver+0x5c/0x84
[<f8890037>] ohci_hcd_pci_init+0x37/0x44 [ohci_hcd]
[<c0134dcc>] sys_init_module+0x183/0x22f
[<c0105fa5>] sysenter_past_esp+0x52/0x71
handlers:
[<f88b8d1e>] (usb_hcd_irq+0x0/0x67 [usbcore])
Disabling IRQ #10
ohci_hcd 0000:02:0e.0: irq 10, pci mem 0x40180000
ohci_hcd 0000:02:0e.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.1: NEC Corporation USB (#2)
ohci_hcd 0000:02:0e.1: irq 10, pci mem 0x40200000
ohci_hcd 0000:02:0e.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Loaded prism54 driver, version 1.2
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 11 (level, low) -> IRQ 11
divert: allocating divert_blk for eth1
eth1: resetting device...
eth1: uploading firmware...
eth1: firmware upload complete
eth1: reset problem: no 'reset complete' IRQ seen
eth1: timeout waiting for mgmt response 1000, triggering device
eth1: timeout waiting for mgmt response
eth1: mgt_commit_list: failure. oid=ff020008 err=-110
eth1: timeout waiting for mgmt response 1000, triggering device
eth1: timeout waiting for mgmt response
eth1: mgt_commit_list: failure. oid=ff020003 err=-110
eth1: timeout waiting for mgmt response 1000, triggering device
eth1: timeout waiting for mgmt response
eth1: mgt_commit_list: failure. oid=10000000 err=-110
eth1: timeout waiting for mgmt response 1000, triggering device
eth1: timeout waiting for mgmt response
eth1: mgt_commit_list: failure. oid=17000007 err=-110
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=19000001 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=10000002 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=19000004 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000000 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000001 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000002 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000004 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000005 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000006 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000007 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=12000003 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=150007e0 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=ff02000c err=-12
eth1: mgmt tx queue is still full
eth1: mgt_commit_list: failure. oid=ff020003 err=-12
eth1: mgmt tx queue is still full
eth1: mgt_update_addr: failure
eth1: mgt_commit: failure
eth1: interface reset complete
eth1: mgmt tx queue is still full
eth1: no IPv6 routers present
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x378-0x37f 0x3e8-0x3ff 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
CPU0
0: 184600 XT-PIC timer
1: 399 XT-PIC i8042
2: 0 XT-PIC cascade
8: 3 XT-PIC rtc
9: 23 XT-PIC acpi
10: 100000 XT-PIC ohci_hcd, ohci_hcd
11: 137 XT-PIC yenta, radeon@PCI:1:0:0, eth1
12: 679 XT-PIC i8042
14: 10444 XT-PIC ide0
15: 1 XT-PIC ide1
NMI: 0
LOC: 0
ERR: 0
MIS: 0

Next is the same cycle with pci=noirq:

Linux version 2.6.9-rc1-mm4 ([email protected]) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #2 Fri Sep 10 10:41:56 MDT 2004
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ffd0000 (usable)
BIOS-e820: 000000003ffd0000 - 000000003fff0c00 (reserved)
BIOS-e820: 000000003fff0c00 - 000000003fffc000 (ACPI NVS)
BIOS-e820: 000000003fffc000 - 0000000040000000 (reserved)
127MB HIGHMEM available.
896MB LOWMEM available.
On node 0 totalpages: 262096
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 225280 pages, LIFO batch:16
HighMem zone: 32720 pages, LIFO batch:7
DMI 2.3 present.
ACPI: RSDP (v000 COMPAQ ) @ 0x000f9970
ACPI: RSDT (v001 COMPAQ CPQ004A 0x31050220 CPQ 0x00000001) @ 0x3fff0c84
ACPI: FADT (v002 COMPAQ CPQ004A 0x00000002 CPQ 0x00000001) @ 0x3fff0c00
ACPI: SSDT (v001 COMPAQ CPQGysr 0x00001001 MSFT 0x0100000d) @ 0x3fff64c3
ACPI: SSDT (v001 COMPAQ CPQMag 0x00001001 MSFT 0x0100000d) @ 0x3fff65d1
ACPI: DSDT (v001 COMPAQ EVON800 0x00010000 MSFT 0x0100000d) @ 0x00000000
Built 1 zonelists
No local APIC present or hardware disabled
Initializing CPU#0
Kernel command line: ro root=/dev/hda3 resume=/dev/hda2 pci=routeirq
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 1794.716 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1035124k/1048384k available (1991k kernel code, 12548k reserved, 811k data, 272k init, 130880k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 3538.94 BogoMIPS (lpj=1769472)
Security Scaffold v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
There is already a security framework initialized, register_security failed.
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 3febf9ff 00000000 00000000 00000000
CPU: After vendor identify, caps: 3febf9ff 00000000 00000000 00000000
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: After all inits, caps: 3febf9ff 00000000 00000000 00000080
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
CPU: Intel(R) Pentium(R) 4 Mobile CPU 1.80GHz stepping 04
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
ACPI: IRQ9 SCI: Edge set to Level Trigger.
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 110k freed
NET: Registered protocol family 16
EISA bus registered
PCI: PCI BIOS revision 2.10 entry at 0xf031f, last bus=3
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [C03C] (00:00)
PCI: Probing PCI hardware (bus 00)
PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Routing Table [\_SB_.C03C._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.C03C.C03D._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.C03C.C04E._PRT]
ACPI: Embedded Controller [C0D0] (gpe 29)
ACPI: Power Resource [C140] (off)
ACPI: Power Resource [C154] (off)
ACPI: Power Resource [C158] (off)
ACPI: Power Resource [C15B] (off)
ACPI: Power Resource [C164] (on)
ACPI: PCI Interrupt Link [C0B6] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [C0B7] (IRQs *5 10 11)
ACPI: PCI Interrupt Link [C0B8] (IRQs 5 10 11) *0, disabled.
ACPI: PCI Interrupt Link [C0B9] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [C0BA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [C0BB] (IRQs) *0, disabled.
ACPI: PCI Interrupt Link [C0BC] (IRQs) *0, disabled.
ACPI: PCI Interrupt Link [C0BD] (IRQs) *0, disabled.
ACPI: Power Resource [C0CF] (on)
ACPI: Power Resource [C1D0] (off)
ACPI: Power Resource [C1D1] (off)
ACPI: Power Resource [C1D2] (off)
ACPI: Power Resource [C1D3] (off)
Linux Plug and Play Support v0.97 (c) Adam Belay
toshiba: not a supported Toshiba laptop
i8k: not running on a Dell system
i8k: vendor=Compaq, model=P2800N P180U540W825EC, version=68P
i8k: unable to get SMM Dell signature
i8k: unable to get SMM BIOS version
PCI: Using ACPI for IRQ routing
** Routing PCI interrupts for all devices because "pci=routeirq"
** was specified. If this was required to make a driver work,
** please email the output of "lspci" to [email protected]
** so I can fix the driver.
ACPI: PCI Interrupt Link [C0B8] enabled at IRQ 11
ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI Interrupt Link [C0B7] enabled at IRQ 5
ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 5 (level, low) -> IRQ 5
ACPI: PCI Interrupt Link [C0B6] enabled at IRQ 11
ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:02:04.0[A] -> GSI 5 (level, low) -> IRQ 5
ACPI: PCI Interrupt Link [C0B9] enabled at IRQ 11
ACPI: PCI interrupt 0000:02:06.0[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI Interrupt Link [C0BA] enabled at IRQ 10
ACPI: PCI interrupt 0000:02:08.0[A] -> GSI 10 (level, low) -> IRQ 10
ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
ACPI: PCI interrupt 0000:02:0e.2[C] -> GSI 10 (level, low) -> IRQ 10
Machine check exception polling timer started.
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
apm: overridden by ACPI.
audit: initializing netlink socket (disabled)
audit(1094906321.780:0): initialized
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
vesafb: probe of vesafb0 failed with error -6
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Real Time Clock Driver v1.12
i8042: ACPI [C161] at I/O 0x60, 0x64, irq 1
i8042: ACPI [C162] at irq 12
i8042.c: Detected active multiplexing controller, rev 1.1.
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
divert: not allocating divert_blk for non-ethernet device lo
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH3M: IDE controller at PCI slot 0000:00:1f.1
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
ICH3M: chipset revision 2
ICH3M: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x4440-0x4447, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x4448-0x444f, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide0...
hda: HTS548080M9AT00, ATA DISK drive
Using anticipatory io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: SD-R2102, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hda: max request size: 1024KiB
hda: 156301488 sectors (80026 MB) w/7877KiB Cache, CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 hda3
ide-floppy driver 0.99.newide
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard on isa0060/serio0
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
EISA: Probing bus 0 at eisa0
NET: Registered protocol family 2
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP: Hash tables configured (established 262144 bind 65536)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 8
NET: Registered protocol family 20
ACPI: (supports S0 S3 S4 S4bios S5)
ACPI wakeup devices:
C04E C0A0 C0A6 C0A9 C161 C162 C177 C11E
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 272k freed
ACPI: AC Adapter [C11A] (on-line)
ACPI: Battery Slot [C11C] (battery present)
ACPI: Battery Slot [C11B] (battery absent)
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [C11E]
ACPI: Lid Switch [C11D]
ACPI: Fan [C1D4] (off)
ACPI: Fan [C1D5] (off)
ACPI: Fan [C1D6] (off)
ACPI: Fan [C1D7] (off)
ACPI: Processor [C000] (supports C1 C2 C3, 8 throttling states)
ACPI: Thermal Zone [TZ1] (50 C)
ACPI: Thermal Zone [TZ2] (45 C)
ACPI: Thermal Zone [TZ3] (16 C)
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.0: NEC Corporation USB
ohci_hcd 0000:02:0e.0: irq 10, pci mem 0x40180000
ohci_hcd 0000:02:0e.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.1: NEC Corporation USB (#2)
ohci_hcd 0000:02:0e.1: irq 10, pci mem 0x40200000
ohci_hcd 0000:02:0e.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
device-mapper: 4.1.0-ioctl (2003-12-10) initialised: [email protected]
Adding 4192956k swap on /dev/hda2. Priority:-1 extents:1
IA-32 Microcode Update Driver: v1.14 <[email protected]>
microcode: No suitable data for CPU0
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.1 (8190 buckets, 65520 max) - 364 bytes per conntrack
e100: Intel(R) PRO/100 Network Driver, 3.0.27-k2-NAPI
e100: Copyright(c) 1999-2004 Intel Corporation
ACPI: PCI interrupt 0000:02:08.0[A] -> GSI 10 (level, low) -> IRQ 10
divert: allocating divert_blk for eth0
e100: eth0: e100_probe: addr 0x40100000, irq 10, MAC addr 00:08:02:62:81:9D
Linux Kernel Card Services
options: [pci] [cardbus] [pm]
ACPI: PCI interrupt 0000:02:06.0[A] -> GSI 11 (level, low) -> IRQ 11
Yenta: CardBus bridge found at 0000:02:06.0 [0e11:004a]
Yenta: Enabling burst memory read transactions
Yenta: Using CSCINT to route CSC interrupts to PCI
Yenta: Routing CardBus interrupts to PCI
Yenta TI: socket 0000:02:06.0, mfunc 0x012c1202, devctl 0x64
Yenta: ISA IRQ mask 0x00d8, PCI irq 11
Socket status: 30000020
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x378-0x37f 0x3e8-0x3ff 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
Loaded prism54 driver, version 1.2
PCI: Enabling device 0000:03:00.0 (0000 -> 0002)
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 11 (level, low) -> IRQ 11
divert: allocating divert_blk for eth1
eth1: resetting device...
eth1: uploading firmware...
eth1: firmware upload complete
eth1: interface reset complete
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
divert: not allocating divert_blk for non-ethernet device sit0
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
divert: not allocating divert_blk for non-ethernet device tun0
eth1: no IPv6 routers present
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected an Intel i845 Chipset.
agpgart: Maximum main memory to use for agp memory: 941M
agpgart: AGP aperture is 256M @ 0x60000000
Synaptics Touchpad, model: 1
Firmware: 5.9
Sensor: 51
new absolute packet format
Touchpad has extended capability bits
-> 4 multi-buttons, i.e. besides standard buttons
-> multifinger detection
-> palm detection
input: SynPS/2 Synaptics TouchPad on isa0060/serio4
ts: Compaq touchscreen protocol output
[drm] Initialized radeon 1.11.0 20020828 on minor 0: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 5 (level, low) -> IRQ 5
PCI: Setting latency timer of device 0000:00:1f.5 to 64
intel8x0_measure_ac97_clock: measured 49964 usecs
intel8x0: clocking to 48000
CPU0
0: 536228 XT-PIC timer
1: 3462 XT-PIC i8042
2: 0 XT-PIC cascade
5: 43 XT-PIC Intel 82801CA-ICH3
8: 1 XT-PIC rtc
9: 940 XT-PIC acpi
10: 0 XT-PIC ohci_hcd, ohci_hcd
11: 35120 XT-PIC yenta, eth1, radeon@PCI:1:0:0
12: 16161 XT-PIC i8042
14: 20551 XT-PIC ide0
15: 1 XT-PIC ide1
NMI: 0
LOC: 0
ERR: 0
MIS: 0
eth1: islpci_close ()
ohci_hcd 0000:02:0e.0: remove, state 1
usb usb1: USB disconnect, address 1
ohci_hcd 0000:02:0e.0: USB bus 1 deregistered
ohci_hcd 0000:02:0e.1: remove, state 1
usb usb2: USB disconnect, address 1
ohci_hcd 0000:02:0e.1: USB bus 2 deregistered
usbcore: deregistering driver usbfs
usbcore: deregistering driver hub
eth1: removing device
divert: freeing divert_blk for eth1
Unloaded prism54 driver
Stopping tasks: ========================================================================================|
Freeing memory... -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|done (75903 pages freed)
.................................swsusp: Need to copy 41588 pages
swsusp: Restoring Highmem
ACPI: PCI interrupt 0000:00:1f.1[A] -> GSI 11 (level, low) -> IRQ 11
ACPI: PCI interrupt 0000:00:1f.5[B] -> GSI 5 (level, low) -> IRQ 5
PCI: Setting latency timer of device 0000:00:1f.5 to 64
ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
Restarting tasks... done
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI interrupt 0000:02:0e.0[A] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.0: NEC Corporation USB
ohci_hcd 0000:02:0e.0: irq 10, pci mem 0x40180000
ohci_hcd 0000:02:0e.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ACPI: PCI interrupt 0000:02:0e.1[B] -> GSI 10 (level, low) -> IRQ 10
ohci_hcd 0000:02:0e.1: NEC Corporation USB (#2)
ohci_hcd 0000:02:0e.1: irq 10, pci mem 0x40200000
ohci_hcd 0000:02:0e.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Loaded prism54 driver, version 1.2
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 11 (level, low) -> IRQ 11
divert: allocating divert_blk for eth1
eth1: resetting device...
eth1: uploading firmware...
eth1: firmware upload complete
eth1: interface reset complete
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x378-0x37f 0x3e8-0x3ff 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
eth1: no IPv6 routers present
CPU0
0: 601383 XT-PIC timer
1: 3636 XT-PIC i8042
2: 0 XT-PIC cascade
5: 43 XT-PIC Intel 82801CA-ICH3
8: 3 XT-PIC rtc
9: 996 XT-PIC acpi
10: 0 XT-PIC ohci_hcd, ohci_hcd
11: 39001 XT-PIC yenta, radeon@PCI:1:0:0, eth1
12: 16255 XT-PIC i8042
14: 22617 XT-PIC ide0
15: 1 XT-PIC ide1
NMI: 0
LOC: 0
ERR: 0
MIS: 0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFBQ0kX3imCezTjY0ERAkh+AJ47Zdih9BqCUa20NtSnDWdRGwimFQCff+2j
dNFuvLoFpoohGwh9933tbDg=
=WKLe
-----END PGP SIGNATURE-----

2004-09-11 18:55:36

by Kevin Fenzi

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Stefan" == Stefan Seyfried <[email protected]> writes:

Stefan> Bjorn Helgaas wrote:

>> I'm completely ignorant about how swsusp works; I guess this is my
>> chance to learn. "pci=routeirq" just causes us to do all the PCI
>> ACPI IRQ routing at boot-time, before the drivers start up. This
>> happens in pci_acpi_init(), which is a subsys_initcall that is run
>> at initial boot-time, but (I assume) not during a resume.

Stefan> a resume is basically a fresh boot, including hardware
Stefan> initialization by the compiled-in drivers (but not modules)
Stefan> but before starting init / entering initrd, the old system
Stefan> state is read from swap, copied back and somehow we continue
Stefan> where we left off at suspend time. Now the resume methods of
Stefan> all device drivers are called, processes are restarted and we
Stefan> are back in the game. (At least this is how i understood it
Stefan> all :-)

Stefan> I can easily imagine that a driver with a slightly broken
Stefan> suspend / resume method may fail without pci=routeirq if it
Stefan> does not do the irq routing correctly during resume. It may
Stefan> work with pci=routeirq since then everything is prepared for
Stefan> it before the resume actually happens.

Yeah, that seems to be the case... the prism54 and usb-hcd drivers
might expect the irq to already be allocated, and when it's not on
resume they freak out.

Stefan> Kevin may get away with unloading the usb host controller and
Stefan> the prism54 drivers before suspend and reloading them after
Stefan> resume.

alas, no.

Unloading and reloading doesn't help.
It looks like they don't re-allocate their irq resources on reload, so
they freak out.

See the dmesg output I just posted showing the issue.

kevin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFBQ0oS3imCezTjY0ERAsMoAJ0dtIycXmMd82WZNMNlHzbDj8/mDwCbBALz
USBJwZfMKB9W+GA3sVZQHgk=
=j0ZJ
-----END PGP SIGNATURE-----

2004-09-12 08:54:49

by Stefan Schweizer

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

Hi,
I get an oops if I try to switch to console after resume. I suspended
with LeaveXBeforeSuspend yes
dmesg attached.


Stefan


Attachments:
(No filename) (129.00 B)
swsusp_oops (14.84 kB)
Download all attachments

2004-09-12 09:24:05

by Stefan Seyfried

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

Stefan Schweizer wrote:
> Hi,
> I get an oops if I try to switch to console after resume. I suspended
> with LeaveXBeforeSuspend yes
> dmesg attached.

What is "LeaveXBeforeSuspend"?

just "echo 4 > /proc/acpi/sleep" or "echo disk > /sys/power/state".

Stefan

2004-09-12 09:32:37

by Stefan Schweizer

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

On Sun, 12 Sep 2004 11:23:54 +0200, Stefan Seyfried <seife<at>suse.de> wrote:
> What is "LeaveXBeforeSuspend"?
>
> just "echo 4 > /proc/acpi/sleep" or "echo disk > /sys/power/state".
>
> Stefan
>

It is an option in the hibernate-script of Bernard Blackham.
You can find the latest Version at http://dagobah.ucc.asn.au/swsusp/script2/

The config is attached.

LeaveXbeforesuspend just does a chvt15 before and chvt 7 after suspend.


Attachments:
(No filename) (444.00 B)
hibernate-disk.conf (2.20 kB)
Download all attachments

2004-09-12 11:44:25

by Stefan Seyfried

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

Stefan Schweizer wrote:

> LeaveXbeforesuspend just does a chvt15 before and chvt 7 after suspend.

swsusp does a chvt to a console so this should not be needed.

Stefan

2004-09-12 21:03:28

by Pavel Machek

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

Hi!

> I get an oops if I try to switch to console after resume. I suspended
> with LeaveXBeforeSuspend yes
> dmesg attached.

Your kernel has a lot more taints than I'd like... And I have no idea
what "LeaveXBeforeSuspend" is.
Pavel

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

2004-09-13 22:06:51

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: FYI: my current bigdiff

On Thursday 09 September 2004 10:13 pm, Kevin Fenzi wrote:
> After booting with the pci=routeirq as suggested wireless and usb
> played nice on suspend resume again.

Kevin, can you try the attached patch, please?

===== drivers/pcmcia/yenta_socket.c 1.59 vs edited =====
--- 1.59/drivers/pcmcia/yenta_socket.c 2004-08-22 08:39:15 -06:00
+++ edited/drivers/pcmcia/yenta_socket.c 2004-09-13 16:01:48 -06:00
@@ -1036,11 +1036,17 @@
static int yenta_dev_resume (struct pci_dev *dev)
{
struct yenta_socket *socket = pci_get_drvdata(dev);
+ int ret;

if (socket) {
- pci_set_power_state(dev, 0);
/* FIXME: pci_restore_state needs to have a better interface */
pci_restore_state(dev, socket->saved_state);
+ ret = pci_enable_device(dev);
+ if (ret < 0) {
+ printk(KERN_ERR "yenta %s: couldn't enable device (%d)\n",
+ pci_name(dev), ret);
+ return ret;
+ }
pci_write_config_dword(dev, 16*4, socket->saved_state[16]);
pci_write_config_dword(dev, 17*4, socket->saved_state[17]);

===== drivers/usb/core/hcd-pci.c 1.33 vs edited =====
--- 1.33/drivers/usb/core/hcd-pci.c 2004-06-30 11:06:30 -06:00
+++ edited/drivers/usb/core/hcd-pci.c 2004-09-13 15:54:54 -06:00
@@ -354,8 +354,14 @@
}
hcd->state = USB_STATE_RESUMING;

- if (has_pci_pm)
- pci_set_power_state (dev, 0);
+ pci_restore_state (dev, hcd->pci_state);
+ retval = pci_enable_device (dev);
+ if (retval < 0) {
+ dev_err (hcd->self.controller, "can't enable device! (%d)\n",
+ retval);
+ return retval;
+ }
+
dev->dev.power.power_state = 0;
retval = request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ,
hcd->description, hcd);
@@ -365,7 +371,6 @@
return retval;
}
pci_set_master (dev);
- pci_restore_state (dev, hcd->pci_state);
#ifdef CONFIG_USB_SUSPEND
pci_enable_wake (dev, dev->current_state, 0);
pci_enable_wake (dev, 4, 0);