summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-28 20:35:42 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-28 20:35:42 +0000
commitbfd6b9d73e44db0b171b323c6f175238b3b493b2 (patch)
treeaaa294b85077cea103c99ba8d6aa742a5f5548d3
parent1106afd9fe10370da68d5eed9a5fa6364cf3ed43 (diff)
[kernel] inform users when the in-kernel mips FPU emulator is disabled (#5774)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17794 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/generic-2.6/patches-2.6.27/024-mips_disable_fpu.patch4
-rw-r--r--target/linux/generic-2.6/patches-2.6.28/024-mips_disable_fpu.patch4
-rw-r--r--target/linux/generic-2.6/patches-2.6.30/025-mips_disable_fpu.patch44
-rw-r--r--target/linux/generic-2.6/patches-2.6.31/025-mips_disable_fpu.patch4
4 files changed, 37 insertions, 19 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.27/024-mips_disable_fpu.patch b/target/linux/generic-2.6/patches-2.6.27/024-mips_disable_fpu.patch
index 60e844b27..91fbb9f14 100644
--- a/target/linux/generic-2.6/patches-2.6.27/024-mips_disable_fpu.patch
+++ b/target/linux/generic-2.6/patches-2.6.27/024-mips_disable_fpu.patch
@@ -115,7 +115,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
void fpu_emulator_init_fpu(void)
{
static int first = 1;
-@@ -112,4 +113,34 @@ int fpu_emulator_restore_context32(struc
+@@ -112,4 +113,36 @@ int fpu_emulator_restore_context32(struc
return err;
}
@@ -125,6 +125,8 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
+
+void fpu_emulator_init_fpu(void)
+{
++ printk(KERN_INFO "FPU emulator disabled, make sure your toolchain"
++ "was compiled with software floating point support (soft-float)\n");
+ return;
+}
+
diff --git a/target/linux/generic-2.6/patches-2.6.28/024-mips_disable_fpu.patch b/target/linux/generic-2.6/patches-2.6.28/024-mips_disable_fpu.patch
index ded4b2125..dfa4ba2e0 100644
--- a/target/linux/generic-2.6/patches-2.6.28/024-mips_disable_fpu.patch
+++ b/target/linux/generic-2.6/patches-2.6.28/024-mips_disable_fpu.patch
@@ -115,7 +115,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
void fpu_emulator_init_fpu(void)
{
static int first = 1;
-@@ -112,4 +113,34 @@ int fpu_emulator_restore_context32(struc
+@@ -112,4 +113,36 @@ int fpu_emulator_restore_context32(struc
return err;
}
@@ -125,6 +125,8 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
+
+void fpu_emulator_init_fpu(void)
+{
++ printk(KERN_INFO "FPU emulator disabled, make sure your toolchain"
++ "was compiled with software floating point support (soft-float)\n");
+ return;
+}
+
diff --git a/target/linux/generic-2.6/patches-2.6.30/025-mips_disable_fpu.patch b/target/linux/generic-2.6/patches-2.6.30/025-mips_disable_fpu.patch
index ffd0af5f1..eb6c6e13d 100644
--- a/target/linux/generic-2.6/patches-2.6.30/025-mips_disable_fpu.patch
+++ b/target/linux/generic-2.6/patches-2.6.30/025-mips_disable_fpu.patch
@@ -6,9 +6,11 @@ precious blocks on an embedded system.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
--
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -791,6 +791,17 @@ config I8259
+Index: linux-2.6.30.7/arch/mips/Kconfig
+===================================================================
+--- linux-2.6.30.7.orig/arch/mips/Kconfig 2009-09-28 08:21:26.000000000 +0200
++++ linux-2.6.30.7/arch/mips/Kconfig 2009-09-28 08:21:31.000000000 +0200
+@@ -791,6 +791,17 @@
config MIPS_BONITO64
bool
@@ -26,8 +28,10 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
config MIPS_MSC
bool
---- a/arch/mips/math-emu/Makefile
-+++ b/arch/mips/math-emu/Makefile
+Index: linux-2.6.30.7/arch/mips/math-emu/Makefile
+===================================================================
+--- linux-2.6.30.7.orig/arch/mips/math-emu/Makefile 2009-09-28 08:21:26.000000000 +0200
++++ linux-2.6.30.7/arch/mips/math-emu/Makefile 2009-09-28 08:21:31.000000000 +0200
@@ -2,12 +2,14 @@
# Makefile for the Linux/MIPS kernel FPU emulation.
#
@@ -45,8 +49,10 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
+ dp_sqrt.o sp_sqrt.o
EXTRA_CFLAGS += -Werror
---- a/arch/mips/math-emu/cp1emu.c
-+++ b/arch/mips/math-emu/cp1emu.c
+Index: linux-2.6.30.7/arch/mips/math-emu/cp1emu.c
+===================================================================
+--- linux-2.6.30.7.orig/arch/mips/math-emu/cp1emu.c 2009-09-28 08:21:26.000000000 +0200
++++ linux-2.6.30.7/arch/mips/math-emu/cp1emu.c 2009-09-28 08:21:31.000000000 +0200
@@ -56,6 +56,12 @@
#endif
#define __mips 4
@@ -60,7 +66,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
/* Function which emulates a floating point instruction. */
static int fpu_emu(struct pt_regs *, struct mips_fpu_struct *,
-@@ -66,10 +72,6 @@ static int fpux_emu(struct pt_regs *,
+@@ -66,10 +72,6 @@
struct mips_fpu_struct *, mips_instruction);
#endif
@@ -71,7 +77,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
/* Control registers */
#define FPCREG_RID 0 /* $0 = revision id */
-@@ -1273,6 +1275,13 @@ int fpu_emulator_cop1Handler(struct pt_r
+@@ -1273,6 +1275,13 @@
return sig;
}
@@ -85,9 +91,11 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
#ifdef CONFIG_DEBUG_FS
extern struct dentry *mips_debugfs_dir;
---- a/arch/mips/math-emu/dsemul.c
-+++ b/arch/mips/math-emu/dsemul.c
-@@ -109,6 +109,7 @@ int mips_dsemul(struct pt_regs *regs, mi
+Index: linux-2.6.30.7/arch/mips/math-emu/dsemul.c
+===================================================================
+--- linux-2.6.30.7.orig/arch/mips/math-emu/dsemul.c 2009-09-28 08:21:26.000000000 +0200
++++ linux-2.6.30.7/arch/mips/math-emu/dsemul.c 2009-09-28 08:21:31.000000000 +0200
+@@ -109,6 +109,7 @@
return SIGILL; /* force out of emulation loop */
}
@@ -95,7 +103,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
int do_dsemulret(struct pt_regs *xcp)
{
struct emuframe __user *fr;
-@@ -165,3 +166,9 @@ int do_dsemulret(struct pt_regs *xcp)
+@@ -165,3 +166,9 @@
return 1;
}
@@ -105,8 +113,10 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
+ return 0;
+}
+#endif /* CONFIG_MIPS_FPU_EMU */
---- a/arch/mips/math-emu/kernel_linkage.c
-+++ b/arch/mips/math-emu/kernel_linkage.c
+Index: linux-2.6.30.7/arch/mips/math-emu/kernel_linkage.c
+===================================================================
+--- linux-2.6.30.7.orig/arch/mips/math-emu/kernel_linkage.c 2009-09-28 08:21:26.000000000 +0200
++++ linux-2.6.30.7/arch/mips/math-emu/kernel_linkage.c 2009-09-28 08:22:36.000000000 +0200
@@ -29,6 +29,7 @@
#define SIGNALLING_NAN 0x7ff800007ff80000LL
@@ -115,7 +125,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
void fpu_emulator_init_fpu(void)
{
static int first = 1;
-@@ -112,4 +113,34 @@ int fpu_emulator_restore_context32(struc
+@@ -112,4 +113,36 @@
return err;
}
@@ -125,6 +135,8 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
+
+void fpu_emulator_init_fpu(void)
+{
++ printk(KERN_INFO "FPU emulator disabled, make sure your toolchain"
++ "was compiled with software floating point support (soft-float)\n");
+ return;
+}
+
diff --git a/target/linux/generic-2.6/patches-2.6.31/025-mips_disable_fpu.patch b/target/linux/generic-2.6/patches-2.6.31/025-mips_disable_fpu.patch
index 98a321093..6a52adafe 100644
--- a/target/linux/generic-2.6/patches-2.6.31/025-mips_disable_fpu.patch
+++ b/target/linux/generic-2.6/patches-2.6.31/025-mips_disable_fpu.patch
@@ -115,7 +115,7 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
void fpu_emulator_init_fpu(void)
{
static int first = 1;
-@@ -112,4 +113,34 @@ int fpu_emulator_restore_context32(struc
+@@ -112,4 +113,36 @@ int fpu_emulator_restore_context32(struc
return err;
}
@@ -125,6 +125,8 @@ Signed-off-by: Florian Fainelli <florian@openwrt.org>
+
+void fpu_emulator_init_fpu(void)
+{
++ printk(KERN_INFO "FPU emulator disabled, make sure your toolchain"
++ "was compiled with software floating point support (soft-float)\n");
+ return;
+}
+