patch-2.4.22 linux-2.4.22/arch/mips/sibyte/cfe/smp.c

Next file: linux-2.4.22/arch/mips/sibyte/sb1/Makefile
Previous file: linux-2.4.22/arch/mips/sibyte/cfe/setup.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/sibyte/cfe/smp.c linux-2.4.22/arch/mips/sibyte/cfe/smp.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2000, 2001 Broadcom Corporation
+ * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,7 +21,6 @@
 
 #include <asm/mipsregs.h>
 
-#include "cfe_xiocb.h"
 #include "cfe_api.h"
 #include "cfe_error.h"
 
@@ -32,8 +31,8 @@
 int prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp)
 {
 	int retval;
-
-	retval = cfe_start_cpu(cpu, &smp_bootstrap, sp, gp, 0);
+	
+	retval = cfe_cpu_start(cpu, &smp_bootstrap, sp, gp, 0);
 	if (retval != 0) {
 		printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval);
 		return 0;
@@ -44,13 +43,16 @@
 
 void prom_init_secondary(void)
 {
-	/* Set up kseg0 to be cachable coherent */
-	clear_cp0_config(CONF_CM_CMASK);
-	set_cp0_config(0x5);
-
-	/* Enable interrupts for lines 0-4 */
-	clear_cp0_status(0xe000);
-	set_cp0_status(0x1f01);
+	extern void load_mmu(void);
+	unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 |
+		STATUSF_IP1 | STATUSF_IP0;
+
+	/* Enable basic interrupts */
+	change_c0_status(ST0_IM, imask);
+	set_c0_status(ST0_IE);
+
+	/* cache and TLB setup */
+	load_mmu();
 }
 
 /*
@@ -64,7 +66,7 @@
 
 	/* Use CFE to find out how many CPUs are available */
 	for (i=1; i<NR_CPUS; i++) {
-		if (cfe_stop_cpu(i) == 0) {
+		if (cfe_cpu_stop(i) == 0) {
 			num_cpus++;
 		}
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)