The following is needed to get an SB1250 to compile & boot in 64bit
mode (briefly tested).
Signed-off-by: Tom Rini <trini@kernel.crashing.org>
--- linux-2.6.9.orig/arch/mips/sibyte/sb1250/irq_handler.S
+++ linux-2.6.9/arch/mips/sibyte/sb1250/irq_handler.S
@@ -121,9 +121,14 @@
/*
* Default...we've hit an IP[2] interrupt, which means we've got to
* check the 1250 interrupt registers to figure out what to do
- * Need to detect which CPU we're on, now that smp_affinity is
supported.
+ * Need to detect which CPU we're on, now that smp_affinity is
+ * supported.
*/
+#ifdef CONFIG_MIPS64
+ PTR_LA v0, CKSEG1 + A_IMR_CPU0_BASE
+#else
PTR_LA v0, KSEG1 + A_IMR_CPU0_BASE
+#endif
#ifdef CONFIG_SMP
lw t1, TI_CPU($28)
sll t1, IMR_REGISTER_SPACING_SHIFT
--- linux-2.6.9.orig/arch/mips/mm/c-sb1.c
+++ linux-2.6.9/arch/mips/mm/c-sb1.c
@@ -488,7 +488,11 @@ void ld_mmu_sb1(void)
/* Special cache error handler for SB1 */
memcpy((void *)(CAC_BASE + 0x100), &except_vec2_sb1, 0x80);
memcpy((void *)(UNCAC_BASE + 0x100), &except_vec2_sb1, 0x80);
+#ifdef CONFIG_MIPS64
+ memcpy((void *)CKSEG1ADDR(&handle_vec2_sb1), &handle_vec2_sb1, 0x80);
+#else
memcpy((void *)KSEG1ADDR(&handle_vec2_sb1), &handle_vec2_sb1, 0x80);
+#endif
probe_cache_sizes();
--- linux-2.6.9.orig/drivers/net/sb1250-mac.c
+++ linux-2.6.9/drivers/net/sb1250-mac.c
@@ -2879,8 +2879,13 @@ sbmac_init_module(void)
dev->mem_end = 0;
if (sbmac_init(dev, idx)) {
port = A_MAC_CHANNEL_BASE(idx);
+#ifdef CONFIG_MIPS64
+ SBMAC_WRITECSR(CKSEG1ADDR(port+R_MAC_ETHERNET_ADDR),
+ sbmac_orig_hwaddr[idx] );
+#else
SBMAC_WRITECSR(KSEG1ADDR(port+R_MAC_ETHERNET_ADDR),
sbmac_orig_hwaddr[idx] );
+#endif
free_netdev(dev);
continue;
}
--- linux-2.6.9.orig/arch/mips/mm/tlb-sb1.c
+++ linux-2.6.9/arch/mips/mm/tlb-sb1.c
@@ -26,14 +26,14 @@
#ifdef CONFIG_MIPS32
extern void except_vec0_sb1(void);
extern void except_vec1_generic(void);
+#define UNIQUE_ENTRYHI(idx) (KSEG0 + ((idx) << (PAGE_SHIFT + 1)))
#endif
#ifdef CONFIG_MIPS64
extern void except_vec0_generic(void);
extern void except_vec1_sb1(void);
+#define UNIQUE_ENTRYHI(idx) (CKSEG0 + ((idx) << (PAGE_SHIFT + 1)))
#endif
-#define UNIQUE_ENTRYHI(idx) (KSEG0 + ((idx) << (PAGE_SHIFT + 1)))
-
/* Dump the current entry* and pagemask registers */
static inline void dump_cur_tlb_regs(void)
{
--
Tom Rini
http://gate.crashing.org/~trini/
|