Skip to contentSkip to conversation

disable PIC/APIC/IOAPIC at S3 suspend

PATCH In review Shaohua Li 2 participants 2 messages Nov 9, 2005 – Nov 25, 2005 1 message not in the archive ACPI

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 disable PIC/APIC/IOAPIC at S3 suspend

Hi,
Zwane submitted a patch for reboot bug here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=113098129126352&w=2
I guess we need the same thing for S3 suspend/resume, as S3 also jumps to BIOS. Could anybody with S3 failure try below patch?

Thanks,
Shaohua

---

 linux-2.6.14-root/arch/i386/kernel/apic.c    |    4 +++-
 linux-2.6.14-root/arch/i386/kernel/i8259.c   |    2 ++
 linux-2.6.14-root/arch/i386/kernel/io_apic.c |    1 +
 3 files changed, 6 insertions(+), 1 deletion(-)
arch/i386/kernel/i8259.c renamed from arch/i386/kernel/i8259.c~disalbe_some_devices +2 -0
diff -puN arch/i386/kernel/i8259.c~disalbe_some_devices arch/i386/kernel/i8259.c
@@ -262,6 +262,8 @@ static int i8259A_resume(struct sys_devi
 static int i8259A_suspend(struct sys_device *dev, pm_message_t state)
 {
 	save_ELCR(irq_trigger);
+	outb(0xff, 0x21);	/* mask all of 8259A-1 */
+	outb(0xff, 0xA1);	/* mask all of 8259A-1 */
 	return 0;
 }
 
arch/i386/kernel/io_apic.c renamed from arch/i386/kernel/io_apic.c~disalbe_some_devices +1 -0
diff -puN arch/i386/kernel/io_apic.c~disalbe_some_devices arch/i386/kernel/io_apic.c
@@ -2350,6 +2350,7 @@ static int ioapic_suspend(struct sys_dev
 		*(((int *)entry) + 0) = io_apic_read(dev->id, 0x10 + 2 * i);
 	}
 	spin_unlock_irqrestore(&ioapic_lock, flags);
+	disable_IO_APIC();
 	return 0;
 }
 
arch/i386/kernel/apic.c renamed from arch/i386/kernel/apic.c~disalbe_some_devices +3 -1
diff -puN arch/i386/kernel/apic.c~disalbe_some_devices arch/i386/kernel/apic.c
@@ -612,7 +612,9 @@ static int lapic_suspend(struct sys_devi
 	apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR);
 
 	local_irq_save(flags);
-	disable_local_APIC();
+	clear_local_APIC();
+	if (enabled_via_apicbase)
+		disable_local_APIC();
 	local_irq_restore(flags);
 	return 0;
 }

_

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php

A message that is not in the archive (sent off-list or not yet received): 1131518431.4594.10.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org

#2 lore raw
Quoted 5 lines · Shaohua Li

Hi,
Zwane submitted a patch for reboot bug here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=113098129126352&w=2
I guess we need the same thing for S3 suspend/resume, as S3 also jumps to BIOS. Could anybody with S3 failure try below patch?

What kind of S3 failure? Failure to suspend or failure to resume?

Signature · 9 lines
Stefan Seyfried



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click