All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: vfp: Remote obsolete fpmx_state field from vfp_hard_struct
@ 2011-03-30 12:46 Dave Martin
  2011-03-30 12:46 ` Dave Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Martin @ 2011-03-30 12:46 UTC (permalink / raw)
  To: linux-arm-kernel

The fpmx_state field was presumably used in the past, when
FSTMX/FLDMX were used to save and resture the VFP state.

This was been deprecated since ARMv6, the context switch code
has been ported to use the double-precision load/store variants
many years ago, and now it appears that nothing in the kernel
references this field any more.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
 arch/arm/include/asm/fpstate.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/fpstate.h b/arch/arm/include/asm/fpstate.h
index ee5e03e..08bb836 100644
--- a/arch/arm/include/asm/fpstate.h
+++ b/arch/arm/include/asm/fpstate.h
@@ -18,7 +18,6 @@
  * VFP storage area has:
  *  - FPEXC, FPSCR, FPINST and FPINST2.
  *  - 16 or 32 double precision data registers
- *  - an implementation-dependant word of state for FLDMX/FSTMX (pre-ARMv6)
  * 
  *  FPEXC will always be non-zero once the VFP has been used in this process.
  */
@@ -29,9 +28,6 @@ struct vfp_hard_struct {
 #else
 	__u64 fpregs[16];
 #endif
-#if __LINUX_ARM_ARCH__ < 6
-	__u32 fpmx_state;
-#endif
 	__u32 fpexc;
 	__u32 fpscr;
 	/*
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: vfp: Remote obsolete fpmx_state field from vfp_hard_struct
  2011-03-30 12:46 [PATCH] ARM: vfp: Remote obsolete fpmx_state field from vfp_hard_struct Dave Martin
@ 2011-03-30 12:46 ` Dave Martin
  2011-03-30 17:52   ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Martin @ 2011-03-30 12:46 UTC (permalink / raw)
  To: linux-arm-kernel

The fpmx_state field was presumably used in the past, when
FSTMX/FLDMX were used to save and resture the VFP state.

This was been deprecated since ARMv6, the context switch code
has been ported to use the double-precision load/store variants
many years ago, and now it appears that nothing in the kernel
references this field any more.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
 arch/arm/include/asm/fpstate.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/fpstate.h b/arch/arm/include/asm/fpstate.h
index ee5e03e..08bb836 100644
--- a/arch/arm/include/asm/fpstate.h
+++ b/arch/arm/include/asm/fpstate.h
@@ -18,7 +18,6 @@
  * VFP storage area has:
  *  - FPEXC, FPSCR, FPINST and FPINST2.
  *  - 16 or 32 double precision data registers
- *  - an implementation-dependant word of state for FLDMX/FSTMX (pre-ARMv6)
  * 
  *  FPEXC will always be non-zero once the VFP has been used in this process.
  */
@@ -29,9 +28,6 @@ struct vfp_hard_struct {
 #else
 	__u64 fpregs[16];
 #endif
-#if __LINUX_ARM_ARCH__ < 6
-	__u32 fpmx_state;
-#endif
 	__u32 fpexc;
 	__u32 fpscr;
 	/*
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: vfp: Remote obsolete fpmx_state field from vfp_hard_struct
  2011-03-30 12:46 ` Dave Martin
@ 2011-03-30 17:52   ` Russell King - ARM Linux
  2011-03-31  9:17     ` Dave Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2011-03-30 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 30, 2011 at 01:46:24PM +0100, Dave Martin wrote:
> The fpmx_state field was presumably used in the past, when
> FSTMX/FLDMX were used to save and resture the VFP state.
> 
> This was been deprecated since ARMv6, the context switch code
> has been ported to use the double-precision load/store variants
> many years ago, and now it appears that nothing in the kernel
> references this field any more.

Wrong.

        .macro  VFPFSTMIA, base, tmp
#if __LINUX_ARM_ARCH__ < 6
        STC     p11, cr0, [\base],#33*4             @ FSTMIAX \base!, {d0-d15}
#else
        STC     p11, cr0, [\base],#32*4             @ FSTMIAD \base!, {d0-d15}
#endif

So, building for pre-ARMv6, it's still used.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: vfp: Remote obsolete fpmx_state field from vfp_hard_struct
  2011-03-30 17:52   ` Russell King - ARM Linux
@ 2011-03-31  9:17     ` Dave Martin
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Martin @ 2011-03-31  9:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 30, 2011 at 6:52 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Wed, Mar 30, 2011 at 01:46:24PM +0100, Dave Martin wrote:
>> The fpmx_state field was presumably used in the past, when
>> FSTMX/FLDMX were used to save and resture the VFP state.
>>
>> This was been deprecated since ARMv6, the context switch code
>> has been ported to use the double-precision load/store variants
>> many years ago, and now it appears that nothing in the kernel
>> references this field any more.
>
> Wrong.
>
> ? ? ? ?.macro ?VFPFSTMIA, base, tmp
> #if __LINUX_ARM_ARCH__ < 6
> ? ? ? ?STC ? ? p11, cr0, [\base],#33*4 ? ? ? ? ? ? @ FSTMIAX \base!, {d0-d15}
> #else
> ? ? ? ?STC ? ? p11, cr0, [\base],#32*4 ? ? ? ? ? ? @ FSTMIAD \base!, {d0-d15}
> #endif
>
> So, building for pre-ARMv6, it's still used.
>

Fair point -- looks like my grepping missed those.  Oops.

While I'm looking at this file though...  vfpmacros.h starts with:

@ Macros to allow building with old toolkits (with no VFP support)

I don't think we support building the kernel with such old binutils
any more.  Maybe this file could be simplified?  arch/arm/vfp/ seems
to be built with -mfpu=softvfp+vfp, which appears to enable most of
the affected mnemonics.

vfpmacros.h also contains some oddities such as:

#ifdef CONFIG_VFPv3
#if __LINUX_ARM_ARCH__ <= 6
    /*...*/

Since we don't support building a single kernel across ARMv5 and
ARMv7, are these blocks effectively dead code?

Cheers
---Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-31  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-30 12:46 [PATCH] ARM: vfp: Remote obsolete fpmx_state field from vfp_hard_struct Dave Martin
2011-03-30 12:46 ` Dave Martin
2011-03-30 17:52   ` Russell King - ARM Linux
2011-03-31  9:17     ` Dave Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.