From: Bhavna Sarathy <bnagendr@redhat.com> Date: Thu, 9 Jul 2009 11:45:00 -0400 Subject: [x86] fix suspend/resume issue on SB800 chipset Message-id: 20090709154633.9518.50596.sendpatchset@localhost.localdomain O-Subject: [RHEL5.4 PATCH] Fix suspend/resume issue on SB800 chipset Bugzilla: 498135 RH-Acked-by: Prarit Bhargava <prarit@redhat.com> RH-Acked-by: Matthew Garrett <mjg@redhat.com> RH-Acked-by: Stefan Assmann <sassmann@redhat.com> RH-Acked-by: Andy Gospodarek <gospo@redhat.com> Resolves BZ 498135. This patch fixes an SB800 chipset bug related to suspend/resume. Rebooting after suspending to ram/disk causes the Sb800 system to hang in the reboot process. This patch fixes paranoia about using BIOS quickboot mechanism. Testing: SB800 Croaker system: i386, and x86_64 pass Sb800 Tarpon system: i386, and x86_64 pass SB700 Shiner system: regression testing no issues found nVidia MCP61: i386 and x86_64 no issues Intel ICH9: no regressions due to SB800 patch found Upstream git commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=63d38198a0f57dca87e6cb79931c7bedbb7ab069 Brew build: https://brewweb.devel.redhat.com/taskinfo?taskID=1879095 Please review and provide ACK for RHEL5.4. Bhavna diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 86fd346..adf9295 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -1019,6 +1019,11 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) /* mark "stuck" area as not stuck */ *((volatile unsigned long *)trampoline_base) = 0; + /* + * Cleanup possible dangling ends... + */ + smpboot_restore_warm_reset_vector(); + return boot_error; } @@ -1259,11 +1264,6 @@ static void __init smp_boot_cpus(unsigned int max_cpus) } /* - * Cleanup possible dangling ends... - */ - smpboot_restore_warm_reset_vector(); - - /* * Allow the user to impress friends. */ Dprintk("Before bogomips.\n"); diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 568a378..7c6ced7 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c @@ -927,6 +927,19 @@ do_rest: return -EIO; } + /* + * Install writable page 0 entry to set BIOS data area. + */ + local_flush_tlb(); + + /* + * Paranoid: Set warm reset code and vector here back + * to default values. + */ + CMOS_WRITE(0, 0xf); + + *((volatile long *) phys_to_virt(0x467)) = 0; + return 0; }