summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-03-15 20:39:54 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-03-15 20:39:54 +0000
commit696ab5f08e3725e54a7b87f6c7f732871cea9473 (patch)
tree7b7b4aabacc34b41996ac576125a369d66fe2745 /sys/arch/mvme88k
parentabb057e2ebdbe264ef7de85bffff2cb3aab73ac2 (diff)
Generic softinterrupt support for m88k based platforms, adapted from arm
with different locking mechanism. 88110 soft ipi are replaced with an ipi callback which is checked upon return from exception (it can not be kept as a softintr, as the generic softinterrupt code doesn't have per-cpu pending softintr queues).
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/include/cpu.h6
-rw-r--r--sys/arch/mvme88k/include/intr.h5
-rw-r--r--sys/arch/mvme88k/mvme88k/autoconf.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/m187_machdep.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/m188_machdep.c10
-rw-r--r--sys/arch/mvme88k/mvme88k/m197_machdep.c7
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c9
7 files changed, 18 insertions, 28 deletions
diff --git a/sys/arch/mvme88k/include/cpu.h b/sys/arch/mvme88k/include/cpu.h
index c7154245a40..b824f8c6b3a 100644
--- a/sys/arch/mvme88k/include/cpu.h
+++ b/sys/arch/mvme88k/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.43 2009/02/27 05:19:34 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.44 2009/03/15 20:39:53 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Copyright (c) 1992, 1993
@@ -40,11 +40,12 @@
#ifndef _MVME88K_CPU_H_
#define _MVME88K_CPU_H_
-#include <sys/evcount.h>
#include <m88k/cpu.h>
#ifdef _KERNEL
+#include <sys/evcount.h>
+
/* board dependent pointers */
extern void (*md_interrupt_func_ptr)(struct trapframe *);
#define md_interrupt_func (*md_interrupt_func_ptr)
@@ -58,7 +59,6 @@ extern u_int (*md_raiseipl)(u_int);
extern void (*md_init_clocks)(void);
extern void (*md_send_ipi)(int, cpuid_t);
extern void (*md_delay)(int);
-extern void (*md_soft_ipi)(void);
extern void (*md_smp_setup)(struct cpu_info *);
struct intrhand {
diff --git a/sys/arch/mvme88k/include/intr.h b/sys/arch/mvme88k/include/intr.h
index 1df681e0826..93b8f804d4e 100644
--- a/sys/arch/mvme88k/include/intr.h
+++ b/sys/arch/mvme88k/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.19 2007/12/27 23:17:55 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.20 2009/03/15 20:39:53 miod Exp $ */
/*
* Copyright (C) 2000 Steve Murphree, Jr.
* All rights reserved.
@@ -37,8 +37,7 @@
*/
#define IPL_NONE 0
-#define IPL_SOFTCLOCK 1
-#define IPL_SOFTNET 1
+#define IPL_SOFTINT 1
#define IPL_BIO 2
#define IPL_NET 3
#define IPL_TTY 3
diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c
index 789731a164b..9d52536ec49 100644
--- a/sys/arch/mvme88k/mvme88k/autoconf.c
+++ b/sys/arch/mvme88k/mvme88k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.43 2009/03/05 21:55:15 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.44 2009/03/15 20:39:53 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -72,6 +72,8 @@ struct device *bootdv; /* set by device drivers (if found) */
void
cpu_configure()
{
+ softintr_init();
+
if (config_rootfound("mainbus", "mainbus") == 0)
panic("no mainbus found");
diff --git a/sys/arch/mvme88k/mvme88k/m187_machdep.c b/sys/arch/mvme88k/mvme88k/m187_machdep.c
index 8e5e953b00d..7f1643c3968 100644
--- a/sys/arch/mvme88k/mvme88k/m187_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m187_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m187_machdep.c,v 1.19 2009/02/16 22:55:03 miod Exp $ */
+/* $OpenBSD: m187_machdep.c,v 1.20 2009/03/15 20:39:53 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -257,4 +257,7 @@ m187_bootstrap()
md_raiseipl = m187_raiseipl;
md_init_clocks = m1x7_init_clocks;
md_delay = m1x7_delay;
+#ifdef MULTIPROCESSOR
+ md_smp_setup = m88100_smp_setup;
+#endif
}
diff --git a/sys/arch/mvme88k/mvme88k/m188_machdep.c b/sys/arch/mvme88k/mvme88k/m188_machdep.c
index 097580a2086..64b1b697231 100644
--- a/sys/arch/mvme88k/mvme88k/m188_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m188_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m188_machdep.c,v 1.52 2009/03/09 19:51:18 miod Exp $ */
+/* $OpenBSD: m188_machdep.c,v 1.53 2009/03/15 20:39:53 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
*
@@ -163,7 +163,6 @@ vaddr_t m188_memsize(void);
u_int m188_raiseipl(u_int);
void m188_send_ipi(int, cpuid_t);
u_int m188_setipl(u_int);
-void m188_soft_ipi(void);
void m188_startup(void);
/*
@@ -238,7 +237,6 @@ m188_bootstrap()
md_init_clocks = m188_init_clocks;
#ifdef MULTIPROCESSOR
md_send_ipi = m188_send_ipi;
- md_soft_ipi = m188_soft_ipi;
#endif
md_delay = m188_delay;
#ifdef MULTIPROCESSOR
@@ -451,12 +449,6 @@ m188_clock_ipi_handler(struct trapframe *eframe)
statclock((struct clockframe *)eframe);
}
-void
-m188_soft_ipi()
-{
- /* this function is not used on MVME188 */
-}
-
#endif
/*
diff --git a/sys/arch/mvme88k/mvme88k/m197_machdep.c b/sys/arch/mvme88k/mvme88k/m197_machdep.c
index 5ded305193f..17bf913991f 100644
--- a/sys/arch/mvme88k/mvme88k/m197_machdep.c
+++ b/sys/arch/mvme88k/mvme88k/m197_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m197_machdep.c,v 1.39 2009/03/04 19:39:41 miod Exp $ */
+/* $OpenBSD: m197_machdep.c,v 1.40 2009/03/15 20:39:53 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -424,7 +424,6 @@ m197_bootstrap()
md_init_clocks = m1x7_init_clocks;
#ifdef MULTIPROCESSOR
md_send_ipi = m197_send_ipi;
- md_soft_ipi = m197_soft_ipi;
md_delay = m197_delay;
md_smp_setup = m197_smp_setup;
#else
@@ -648,7 +647,9 @@ m197_ipi_handler(struct trapframe *eframe)
ci->ci_s_sxip = eframe->tf_sxip;
ci->ci_s_epsr = eframe->tf_epsr;
}
- setsoftipi(ci);
+
+ /* inflict ourselves a soft ipi */
+ ci->ci_softipi_cb = m197_soft_ipi;
}
if (ipi & CI_IPI_DDB) {
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 419b5ad545c..66e4d0ae524 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.227 2009/03/05 21:55:15 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.228 2009/03/15 20:39:53 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -135,7 +135,6 @@ u_int (*md_setipl)(u_int);
u_int (*md_raiseipl)(u_int);
#ifdef MULTIPROCESSOR
void (*md_send_ipi)(int, cpuid_t);
-void (*md_soft_ipi)(void);
#endif
void (*md_delay)(int) = dumb_delay;
#ifdef MULTIPROCESSOR
@@ -1206,12 +1205,6 @@ m88k_broadcast_ipi(int ipi)
}
}
-void
-softipi()
-{
- (*md_soft_ipi)();
-}
-
#endif
void