summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/processor_32.h
diff options
context:
space:
mode:
authorVineet Gupta <Vineet.Gupta1@synopsys.com>2013-11-12 15:08:45 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 12:09:13 +0900
commit616c05d110bb4ef8203f49c9d2476874077c2f6a (patch)
treeeb5bc88a430509fcdb8afe8ee9f344c903d1894d /arch/sh/include/asm/processor_32.h
parent261adc9a609dbfde815337889b9e2c8728959ab8 (diff)
downloadblackbird-op-linux-616c05d110bb4ef8203f49c9d2476874077c2f6a.tar.gz
blackbird-op-linux-616c05d110bb4ef8203f49c9d2476874077c2f6a.zip
sh: move fpu_counter into ARCH specific thread_struct
Only a couple of arches (sh/x86) use fpu_counter in task_struct so it can be moved out into ARCH specific thread_struct, reducing the size of task_struct for other arches. Compile tested sh defconfig + sh4-linux-gcc (4.6.3) Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Paul Mundt <paul.mundt@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sh/include/asm/processor_32.h')
-rw-r--r--arch/sh/include/asm/processor_32.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index e699a12cdcca..18e0377f72bb 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -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 { \
OpenPOWER on IntegriCloud