lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: invalidate caches before going into suspend
From
Date
Mark Langsdorf <mark.langsdorf@amd.com> writes:
> @@ -93,11 +93,11 @@ static inline void play_dead(void)
> static inline void play_dead(void)
> {
> idle_task_exit();
> - wbinvd();
> mb();
> /* Ack it */
> __get_cpu_var(cpu_state) = CPU_DEAD;
>
> + wbinvd();

You should put the mb() (or just a barrier()) directly above the wbinvd(),
otherwise the compiler is free to reorder this behind your back again
and move the store down after the wbinvd.

-Andi


\
 
 \ /
  Last update: 2008-08-13 21:41    [W:0.066 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site