Messages in this thread | | | Subject | Re: invalidate caches before going into suspend | From | Andi Kleen <> | Date | Wed, 13 Aug 2008 21:39:28 +0200 |
| |
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
| |