Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d4cae5fe2ea1a0974962e2c49dca5c9c4b14cc0
Commit:     5d4cae5fe2ea1a0974962e2c49dca5c9c4b14cc0
Parent:     845a2fdcbd5bc5b9f652201ee95c825827a1d521
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Sun Jun 10 12:22:20 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Sun Jun 10 12:22:20 2007 +0100

    [ARM] VFP: fix section mismatch error
    
    Fix a real section mismatch issue; the test code is thrown away after
    initialisation, but if we do not detect the VFP hardware, it is left
    hooked into the exception handler.  Any VFP instructions which are
    subsequently executed risk calling the discarded exception handler.
    
    Introduce a new "null" handler which returns to the "unrecognised
    fault" return address.
    
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/vfp/entry.S      |    4 ++++
 arch/arm/vfp/vfpmodule.c  |    5 ++++-
 include/asm-arm/linkage.h |    4 ++++
 3 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index ca2a5ad..806ce26 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -29,6 +29,10 @@ do_vfp:
        add     r10, r10, #TI_VFPSTATE  @ r10 = workspace
        ldr     pc, [r4]                @ call VFP entry point
 
+ENTRY(vfp_null_entry)
+       mov     pc, lr
+ENDPROC(vfp_null_entry)
+
 .LCvfp:
        .word   vfp_vector
 
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index f1e5951..1106b5f 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -26,8 +26,9 @@
  */
 void vfp_testing_entry(void);
 void vfp_support_entry(void);
+void vfp_null_entry(void);
 
-void (*vfp_vector)(void) = vfp_testing_entry;
+void (*vfp_vector)(void) = vfp_null_entry;
 union vfp_state *last_VFP_context[NR_CPUS];
 
 /*
@@ -321,8 +322,10 @@ static int __init vfp_init(void)
         * The handler is already setup to just log calls, so
         * we just need to read the VFPSID register.
         */
+       vfp_vector = vfp_testing_entry;
        vfpsid = fmrx(FPSID);
        barrier();
+       vfp_vector = vfp_null_entry;
 
        printk(KERN_INFO "VFP support v0.3: ");
        if (VFP_arch) {
diff --git a/include/asm-arm/linkage.h b/include/asm-arm/linkage.h
index dbe4b4e..5a25632 100644
--- a/include/asm-arm/linkage.h
+++ b/include/asm-arm/linkage.h
@@ -4,4 +4,8 @@
 #define __ALIGN .align 0
 #define __ALIGN_STR ".align 0"
 
+#define ENDPROC(name) \
+  .type name, %function; \
+  END(name)
+
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to