sh: move fpu_counter into ARCH specific thread_struct
[linux-2.6-block.git] / arch / sh / include / asm / processor_32.h
index e699a12cdcca0da391ee072797c74208fa93eddb..18e0377f72bbb9ad8f559b00fc2452532d0ad312 100644 (file)
@@ -111,6 +111,16 @@ struct thread_struct {
 
        /* Extended processor state */
        union thread_xstate *xstate;
+
+       /*
+        * fpu_counter contains the number of consecutive context switches
+        * that the FPU is used. If this is over a threshold, the lazy fpu
+        * saving becomes unlazy to save the trap. This is an unsigned char
+        * so that after 256 times the counter wraps and the behavior turns
+        * lazy again; this to deal with bursty apps that only use FPU for
+        * a short time
+        */
+       unsigned char fpu_counter;
 };
 
 #define INIT_THREAD  {                                         \