Inlining of certain functions prevent R3000 kernel from booting...
Hello.
While trying to compile the latest CVS kernel, I notice that by not inlining certain functions my kernel boots fine. If I put the inlines back in, the kernel hangs and does not boot. Below are the three functions that I am unable to inline:
****************************************************************
diff -urN -X cvs-exc.txt nino-linux/arch/mips/kernel/traps.c /opt/sgi-cvs/linux- 2.4/linux/arch/mips/kernel/traps.c
--- nino-linux/arch/mips/kernel/traps.c Wed Dec 12 17:42:53 2001
+++ /opt/sgi-cvs/linux-2.4/linux/arch/mips/kernel/traps.c Sun Dec 2 05:34
:38 2001
@@ -100,7 +100,7 @@
static struct task_struct *ll_task = NULL;
-static void simulate_ll(struct pt_regs *regp, unsigned int opcode) +static inline void simulate_ll(struct pt_regs *regp, unsigned int opcode)
{
unsigned long value, *vaddr;
long offset;
@@ -141,7 +141,7 @@
send_sig(signal, current, 1);}
-static void simulate_sc(struct pt_regs *regp, unsigned int opcode) +static inline void simulate_sc(struct pt_regs *regp, unsigned int opcode)
{
unsigned long *vaddr, reg;
long offset;diff -urN -X cvs-exc.txt nino-linux/arch/mips/kernel/unaligned.c /opt/sgi-cvs/li nux-2.4/linux/arch/mips/kernel/unaligned.c
--- nino-linux/arch/mips/kernel/unaligned.c Wed Dec 12 17:47:27 2001
+++ /opt/sgi-cvs/linux-2.4/linux/arch/mips/kernel/unaligned.c Sat Dec 1 00:04
:49 2001
@@ -96,7 +96,7 @@
if ((long)(~(pc) & ((a) | ((a)+(s)))) < 0) \
goto sigbus;-static void emulate_load_store_insn(struct pt_regs *regs,
+static inline void emulate_load_store_insn(struct pt_regs *regs,
unsigned long addr, unsigned long pc
)
{
union mips_instruction insn;****************************************************************
I attempted to do a 'objdump -d' on the kernels with and without the inline statements to see if any registers might be getting hammered. I was not able to see anything obvious, but I did find it difficult to decipher things once inlining was enabled. I have placed the unstripped kernels in a tarball at:
ftp://ftp.cotw.com/MIPS/mips-r3k-inline-kernels.tar.bz2
The cross toolchain was made up of:
binutils-2.11.92.0.10
gcc-3.0.2
glibc-2.2.3Is anyone else having problems like this? I am doing the Philips Nino port which has a PR31700 (R3000A core) chip in it. Thanks.
-Steve
Signature · 1 line
Steven J. Hill - Embedded SW Engineer
Quoted 4 lines · Steven J. Hill
The cross toolchain was made up of:
binutils-2.11.92.0.10 gcc-3.0.2
^^^^^
Ralf