Subject: Building the kernel for a Broadcom SB1

From: Jonathan Day <[email-masked]>
Date: Thu, 15 Sep 2005 13:59:04 -0700 (PDT)

Hi,

I'm having a few issues building the current
2.6.14-rc1 for a Broadcom SB1 MIPS64 processor. (No
huge surprise there, building anything for that
processor is a pain.)

Anyway, there are a few symbols undefined, which is
causing problems. First off the bat is TO_PHYS_MASK.
There is no set of definitions in
include/asm-mips/addrspace.h for the SB1 processor.
(For that matter, there's no set of definitions for
the MIPS64_R2, so I'm guessing those using _R2 chips
probably have the same problem.)

For the time-being, I've simply grouped the SB1 with
the MIPS64_R1 as the SiByte documentation is rather
limited on what the SB1 actually is.

Next off, if you enable processor threading, it looks
for IRQ_PER_CPU. A grep reveals that this needs
ARCH_HAS_IRQ_PER_CPU defined in the architecture's
irq.h file, but that no such definition exists for any
MIPS processor.

A Google shows that the processor threading was
recently added in (or back in, or something). Is the
change to irq.h not present for a reason (eg:
something is broken, so the code shouldn't be used
anyway), something that should have been checked out
but wasn't (ie: my computer has turned traitor) or got
forgotten somewhere else in the chain?

For the time-being, I've simply added a #define for it
in the include/asm-mips/irq.h file, but it would be
good to know what the "correct" solution was.

Any help would be much appreciated.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

---

From: "Mark Mason" <[email-masked]>
Date: Thu, 15 Sep 2005 14:52:36 -0700

Hello,

>probably have the same problem.)
Here's the patch for that particular problem.  There's also a few other 
patches for the SB1 floating around (check the email archives), but 
there appears to be a backlog with getting them committed to the CVS 
repository.

HTH,
Mark

Index: include/asm-mips/addrspace.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/addrspace.h,v
retrieving revision 1.18
diff -u -p -r1.18 addrspace.h
--- include/asm-mips/addrspace.h    14 Jul 2005 12:05:08 -0000    1.18
+++ include/asm-mips/addrspace.h    15 Sep 2005 21:46:56 -0000
@@ -131,6 +131,8 @@
     || defined (CONFIG_CPU_R5000)                    \
     || defined (CONFIG_CPU_NEVADA)                    \
     || defined (CONFIG_CPU_TX49XX)                    \
+    || defined (CONFIG_CPU_SB1)                        \
+    || defined (CONFIG_CPU_SB1A)                    \
     || defined (CONFIG_CPU_MIPS64_R1)
 #define KUSIZE        _LLCONST_(0x0000010000000000)    /* 2^^40 */
 #define KUSIZE_64    _LLCONST_(0x0000010000000000)    /* 2^^40 */
.