Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753642Ab0FEBpn (ORCPT ); Fri, 4 Jun 2010 21:45:43 -0400 Received: from netrider.rowland.org ([192.131.102.5]:49428 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752731Ab0FEBpm (ORCPT ); Fri, 4 Jun 2010 21:45:42 -0400 Date: Fri, 4 Jun 2010 21:45:40 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Ondrej Zary cc: "H. Peter Anvin" , Linux-pm mailing list , Kernel development list Subject: Re: [PATCH] Re: [linux-pm] Invalid opcode on resume from STR on Asus P4P800-VM In-Reply-To: <201006050029.25819.linux@rainbow-software.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2327 Lines: 57 On Sat, 5 Jun 2010, Ondrej Zary wrote: > Here's a patch that fixes the problem. I don't know how many machines will > it break... > > > diff -urp linux-2.6.35-rc1-git2-orig/arch/x86/include/asm/suspend_32.h linux-2.6.35-rc1-git2/arch/x86/include/asm/suspend_32.h > --- linux-2.6.35-rc1-git2-orig/arch/x86/include/asm/suspend_32.h 2010-05-30 22:21:02.000000000 +0200 > +++ linux-2.6.35-rc1-git2/arch/x86/include/asm/suspend_32.h 2010-06-04 23:52:22.000000000 +0200 > @@ -15,6 +15,7 @@ static inline int arch_prepare_suspend(v > struct saved_context { > u16 es, fs, gs, ss; > unsigned long cr0, cr2, cr3, cr4; > + unsigned long misc_enable; > struct desc_ptr gdt; > struct desc_ptr idt; > u16 ldt; > diff -urp linux-2.6.35-rc1-git2-orig/arch/x86/include/asm/suspend_64.h linux-2.6.35-rc1-git2/arch/x86/include/asm/suspend_64.h > --- linux-2.6.35-rc1-git2-orig/arch/x86/include/asm/suspend_64.h 2010-05-30 22:21:02.000000000 +0200 > +++ linux-2.6.35-rc1-git2/arch/x86/include/asm/suspend_64.h 2010-06-04 23:52:21.000000000 +0200 > @@ -27,6 +27,7 @@ struct saved_context { > u16 ds, es, fs, gs, ss; > unsigned long gs_base, gs_kernel_base, fs_base; > unsigned long cr0, cr2, cr3, cr4, cr8; > + unsigned long misc_enable; > unsigned long efer; > u16 gdt_pad; > u16 gdt_limit; > diff -urp linux-2.6.35-rc1-git2-orig/arch/x86/power/cpu.c linux-2.6.35-rc1-git2/arch/x86/power/cpu.c > --- linux-2.6.35-rc1-git2-orig/arch/x86/power/cpu.c 2010-05-30 22:21:02.000000000 +0200 > +++ linux-2.6.35-rc1-git2/arch/x86/power/cpu.c 2010-06-04 23:50:52.000000000 +0200 > @@ -105,6 +105,7 @@ static void __save_processor_state(struc > ctxt->cr4 = read_cr4(); > ctxt->cr8 = read_cr8(); > #endif > + rdmsrl(MSR_IA32_MISC_ENABLE, ctxt->misc_enable); > } > > /* Needed by apm.c */ > @@ -152,6 +153,7 @@ static void fix_processor_context(void) > */ > static void __restore_processor_state(struct saved_context *ctxt) > { > + wrmsrl(MSR_IA32_MISC_ENABLE, ctxt->misc_enable); > /* > * control registers > */ Great! I'll try it out early next week. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/