Update of /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250
In directory usw-pr-cvs1:/tmp/cvs-serv11462
Modified Files:
Makefile bcm1250_tbprof.c irq.c irq_handler.S smp.c
Log Message:
Sb1250 updates.
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile 2001/11/19 17:42:38 1.2
+++ Makefile 2001/11/20 18:14:35 1.3
@@ -5,7 +5,7 @@
O_TARGET := sb1250.o
-obj-y := setup.o irq.o irq_handler.o time.o pci.o lib_hssubr.o
+obj-y := setup.o irq.o irq_handler.o time.o pci.o # lib_hssubr.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_BCM1250_TBPROF) += bcm1250_tbprof.o
Index: bcm1250_tbprof.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250/bcm1250_tbprof.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bcm1250_tbprof.c 2001/11/08 17:42:08 1.1
+++ bcm1250_tbprof.c 2001/11/20 18:14:35 1.2
@@ -33,7 +33,6 @@
#include <asm/sibyte/sb1250_regs.h>
#include <asm/sibyte/sb1250_scd.h>
#include <asm/sibyte/sb1250_int.h>
-#include <asm/sibyte/sbmips.h>
#include <asm/sibyte/64bit.h>
#include "bcm1250_tbprof.h"
Index: irq.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250/irq.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- irq.c 2001/11/08 17:42:08 1.1
+++ irq.c 2001/11/20 18:14:35 1.2
@@ -73,8 +73,6 @@
NULL
};
-
-spinlock_t global_irq_lock = SPIN_LOCK_UNLOCKED;
spinlock_t sb1250_imr_lock = SPIN_LOCK_UNLOCKED;
void sb1250_mask_irq(int cpu, int irq)
Index: irq_handler.S
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250/irq_handler.S,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- irq_handler.S 2001/11/08 17:42:08 1.1
+++ irq_handler.S 2001/11/20 18:14:35 1.2
@@ -38,7 +38,6 @@
#include <asm/sibyte/sb1250_defs.h>
#include <asm/sibyte/sb1250_regs.h>
#include <asm/sibyte/sb1250_int.h>
-#include "asm/sibyte/sbmips.h"
/*
* What a pain. We have to be really careful saving
@@ -68,11 +67,11 @@
#ifdef CONFIG_SIBYTE_SB1250_PROF
/* Set compare to count to silence count/compare timer interrupts */
- mfc0 t1, C0_COUNT
- mtc0 t1, C0_COMPARE /* pause to clear IP[7] bit of cause ? */
+ mfc0 t1, CP0_COUNT
+ mtc0 t1, CP0_COMPARE /* pause to clear IP[7] bit of cause ? */
#endif
/* Read cause */
- mfc0 s0, C0_CAUSE
+ mfc0 s0, CP0_CAUSE
#ifdef CONFIG_SIBYTE_SB1250_PROF
/* Cpu performance counter interrupt is routed to IP[7] */
@@ -80,7 +79,7 @@
beqz t1, 0f
srl t1, s0, (CAUSEB_BD-2) /* Shift BD bit to bit 2 */
and t1, t1, 0x4 /* mask to get just BD bit */
- mfc0 a0, C0_EPC
+ mfc0 a0, CP0_EPC
jal sbprof_cpu_intr
addu a0, a0, t1 /* a0 = EPC + (BD ? 4 : 0) */
j ret_from_irq
Index: smp.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250/smp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- smp.c 2001/11/08 17:42:08 1.1
+++ smp.c 2001/11/20 18:14:35 1.2
@@ -63,16 +63,24 @@
static void sb1250_smp_call_function(void)
{
- void (*func) (void *info) = smp_fn_call.fn;
- void *data = smp_fn_call.data;
- int wait = smp_fn_call.wait;
+ void (*func) (void *info) = call_data->func;
+ void *info = call_data->info;
+ int wait = call_data->wait;
- /* Notify initiating CPU that I've grabbed the data
- * and am about to execute the function */
- atomic_inc(&smp_fn_call.started);
- (*func)(data);
- if (wait)
- atomic_inc(&smp_fn_call.finished);
+ /*
+ * Notify initiating CPU that I've grabbed the data
+ * and am about to execute the function
+ */
+ mb();
+ atomic_inc(&call_data->started);
+ (*func)(info);
+ /*
+ * At this point the info structure may be out of scope unless wait==1
+ */
+ if (wait) {
+ mb();
+ atomic_inc(&call_data->finished);
+ }
}
|