]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: Don't unconditionally bloat thread_info
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 29 Aug 2012 10:16:59 +0000 (11:16 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 29 Aug 2012 10:18:17 +0000 (11:18 +0100)
There is no point reserving space at the bottom of the kernel stack for
per-thread crunch state, and per-thread VFP state if these are not being
supported by the kernel being built.  Remove these members from the
thread union when these features are disabled.

Reported-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/thread_info.h
arch/arm/kernel/asm-offsets.c

index b79f8e97f7755f22d82ae20ee00442cd11f7af02..7b0a8f5f66fabd2ddf71ff10773f9aa1aafe590e 100644 (file)
@@ -59,7 +59,9 @@ struct thread_info {
        __u32                   syscall;        /* syscall number */
        __u8                    used_cp[16];    /* thread used copro */
        unsigned long           tp_value;
+#ifdef CONFIG_CRUNCH
        struct crunch_state     crunchstate;
+#endif
        union fp_state          fpstate __attribute__((aligned(8)));
        union vfp_state         vfpstate;
 #ifdef CONFIG_ARM_THUMBEE
index 1429d8989fb90defcd8ba22fb18493a2206f658d..c985b481192c2643e938425a57e3e6fc9866ba90 100644 (file)
@@ -59,10 +59,12 @@ int main(void)
   DEFINE(TI_USED_CP,           offsetof(struct thread_info, used_cp));
   DEFINE(TI_TP_VALUE,          offsetof(struct thread_info, tp_value));
   DEFINE(TI_FPSTATE,           offsetof(struct thread_info, fpstate));
+#ifdef CONFIG_VFP
   DEFINE(TI_VFPSTATE,          offsetof(struct thread_info, vfpstate));
 #ifdef CONFIG_SMP
   DEFINE(VFP_CPU,              offsetof(union vfp_state, hard.cpu));
 #endif
+#endif
 #ifdef CONFIG_ARM_THUMBEE
   DEFINE(TI_THUMBEE_STATE,     offsetof(struct thread_info, thumbee_state));
 #endif