[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: invalidate caches before going into suspend

* H. Peter Anvin <> wrote:

> Ingo Molnar wrote:
>> also, we might be safer if the wbinvd(), the CLI and the halt was in a
>> single assembly sequence:
>> if (cpu >= i486)
>> asm ("cli; wbinvd; cli; 1: hlt; jmp 1b")
>> else
>> asm ("cli; 1: hlt; jmp 1b")
>> to make sure the compiler doesnt ever insert something into this
>> codepath? [ And note the double cli which would be further
>> robustification - in theory we could get a spurious interrupt straight
>> after the wbinvd. ] Hm?
> Spurious interrupt of what kind? The only things that could come in
> would not be non-INT type interrupts, and those aren't affected by
> CLI.

nothing should come in really at that point - but say IRQ#7 on older
platforms used to trigger at various points in time, even unprompted. Or
an APIC error interrupt in the last moment? All device irqs should
indeed be turned off at this stage, but since it costs us nothing to add
another cli, and because the failure mode is subtle memory corruption,
does it hurt to have it?


 \ /
  Last update: 2008-08-13 19:05    [W:0.107 / U:4.572 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site