summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/cpu.c5
-rw-r--r--sys/arch/alpha/alpha/genassym.cf4
-rw-r--r--sys/arch/alpha/alpha/locore.s4
-rw-r--r--sys/arch/alpha/alpha/pmap.c7
-rw-r--r--sys/arch/alpha/include/cpu.h20
-rw-r--r--sys/arch/alpha/include/intr.h3
-rw-r--r--sys/arch/alpha/include/pmap.h4
7 files changed, 26 insertions, 21 deletions
diff --git a/sys/arch/alpha/alpha/cpu.c b/sys/arch/alpha/alpha/cpu.c
index a8045be3246..6d5c8a9d347 100644
--- a/sys/arch/alpha/alpha/cpu.c
+++ b/sys/arch/alpha/alpha/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.18 2004/06/08 20:13:21 miod Exp $ */
+/* $OpenBSD: cpu.c,v 1.19 2004/06/13 21:49:11 niklas Exp $ */
/* $NetBSD: cpu.c,v 1.44 2000/05/23 05:12:53 thorpej Exp $ */
/*-
@@ -565,7 +565,8 @@ cpu_iccb_send(cpu_id, msg)
strlcpy(pcsp->pcs_iccb.iccb_rxbuf, msg,
sizeof pcsp->pcs_iccb.iccb_rxbuf);
pcsp->pcs_iccb.iccb_rxlen = strlen(msg);
- atomic_setbits_ulong(&hwrpb->rpb_rxrdy, cpumask);
+ /* XXX cast to __volatile */
+ atomic_setbits_ulong((__volatile u_long *)&hwrpb->rpb_rxrdy, cpumask);
/* Wait for the message to be received. */
for (timeout = 10000; timeout != 0; timeout--) {
diff --git a/sys/arch/alpha/alpha/genassym.cf b/sys/arch/alpha/alpha/genassym.cf
index 27d0faa330b..2a8802256f3 100644
--- a/sys/arch/alpha/alpha/genassym.cf
+++ b/sys/arch/alpha/alpha/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.5 2003/06/02 23:27:43 millert Exp $
+# $OpenBSD: genassym.cf,v 1.6 2004/06/13 21:49:11 niklas Exp $
# Copyright (c) 1994, 1995 Gordon W. Ross
# Copyright (c) 1993 Adam Glass
@@ -120,6 +120,8 @@ struct prochd
member ph_link
member ph_rlink
+export SONPROC
+
# offsets needed by cpu_switch() to switch mappings.
define VM_MAP_PMAP offsetof(struct vmspace, vm_map.pmap)
diff --git a/sys/arch/alpha/alpha/locore.s b/sys/arch/alpha/alpha/locore.s
index d30e1f646f1..48849130727 100644
--- a/sys/arch/alpha/alpha/locore.s
+++ b/sys/arch/alpha/alpha/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.21 2003/10/18 20:14:40 jmc Exp $ */
+/* $OpenBSD: locore.s,v 1.22 2004/06/13 21:49:11 niklas Exp $ */
/* $NetBSD: locore.s,v 1.94 2001/04/26 03:10:44 ross Exp $ */
/*-
@@ -891,7 +891,6 @@ cpu_switch_queuescan:
*
* Note: GET_CPUINFO clobbers v0, t0, t8...t11.
*/
-#if 0
#ifdef __alpha_bwx__
ldiq t0, SONPROC /* p->p_stat = SONPROC */
stb t0, P_STAT(s2)
@@ -904,7 +903,6 @@ cpu_switch_queuescan:
or t0, t1, t0
stq_u t0, 0(t3)
#endif /* __alpha_bwx__ */
-#endif
GET_CPUINFO
/* p->p_cpu initialized in fork1() for single-processor */
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c
index d8860e84b38..484eb661c93 100644
--- a/sys/arch/alpha/alpha/pmap.c
+++ b/sys/arch/alpha/alpha/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.41 2004/06/08 20:13:21 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.42 2004/06/13 21:49:11 niklas Exp $ */
/* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */
/*-
@@ -388,11 +388,6 @@ struct lock pmap_main_lock;
struct simplelock pmap_all_pmaps_slock;
struct simplelock pmap_growkernel_slock;
-#ifdef __OpenBSD__
-#define spinlockinit(lock, name, flags) lockinit(lock, 0, name, 0, flags)
-#define spinlockmgr(lock, flags, slock) lockmgr(lock, flags, slock, curproc)
-#endif
-
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
#define PMAP_MAP_TO_HEAD_LOCK() \
spinlockmgr(&pmap_main_lock, LK_SHARED, NULL)
diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h
index 7bfc81c4624..c793d217035 100644
--- a/sys/arch/alpha/include/cpu.h
+++ b/sys/arch/alpha/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.24 2004/06/08 20:13:23 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.25 2004/06/13 21:49:12 niklas Exp $ */
/* $NetBSD: cpu.h,v 1.45 2000/08/21 02:03:12 thorpej Exp $ */
/*-
@@ -105,6 +105,7 @@ typedef union alpha_t_float {
#ifdef _KERNEL
#include <machine/bus.h>
+#include <sys/device.h>
struct pcb;
struct proc;
@@ -177,6 +178,7 @@ struct mchkinfo {
};
struct cpu_info {
+ struct device *ci_dev; /* pointer to our device */
/*
* Public members.
*/
@@ -185,12 +187,13 @@ struct cpu_info {
u_long ci_simple_locks; /* # of simple locks held */
#endif
struct proc *ci_curproc; /* current owner of the processor */
+ struct simplelock ci_slock; /* lock on this data structure */
+ cpuid_t ci_cpuid; /* our CPU ID */
/*
* Private members.
*/
struct mchkinfo ci_mcinfo; /* machine check info */
- cpuid_t ci_cpuid; /* our CPU ID */
struct proc *ci_fpcurproc; /* current owner of the FPU */
paddr_t ci_curpcb; /* PA of current HW PCB */
struct pcb *ci_idle_pcb; /* our idle PCB */
@@ -265,15 +268,20 @@ struct clockframe {
/*
* Preempt the current process if in interrupt from user mode,
* or after the current trap/syscall if in system mode.
- *
- * XXXSMP
- * need_resched() needs to take a cpu_info *.
*/
-#define need_resched() \
+#ifdef MULTIPROCESSOR
+#define need_resched(ci) \
+do { \
+ ci->ci_want_resched = 1; \
+ aston(curcpu()); \
+} while (/*CONSTCOND*/0)
+#else
+#define need_resched(ci) \
do { \
curcpu()->ci_want_resched = 1; \
aston(curcpu()); \
} while (/*CONSTCOND*/0)
+#endif
/*
* Give a profiling tick to the current process when the user profiling
diff --git a/sys/arch/alpha/include/intr.h b/sys/arch/alpha/include/intr.h
index a5813c6e1bf..25fdcba079d 100644
--- a/sys/arch/alpha/include/intr.h
+++ b/sys/arch/alpha/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.16 2004/04/16 04:52:05 pvalchev Exp $ */
+/* $OpenBSD: intr.h,v 1.17 2004/06/13 21:49:12 niklas Exp $ */
/* $NetBSD: intr.h,v 1.26 2000/06/03 20:47:41 thorpej Exp $ */
/*-
@@ -159,6 +159,7 @@ extern ipifunc_t ipifuncs[ALPHA_NIPIS];
void alpha_send_ipi(unsigned long, unsigned long);
void alpha_broadcast_ipi(unsigned long);
+void alpha_multicast_ipi(unsigned long, unsigned long);
/*
* Alpha shared-interrupt-line common code.
diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h
index e61bba6497d..1a5c4784915 100644
--- a/sys/arch/alpha/include/pmap.h
+++ b/sys/arch/alpha/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.17 2004/06/09 20:17:23 tedu Exp $ */
+/* $OpenBSD: pmap.h,v 1.18 2004/06/13 21:49:12 niklas Exp $ */
/* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */
/*-
@@ -178,7 +178,7 @@ struct pv_head {
#if defined(MULTIPROCESSOR)
void pmap_tlb_shootdown(pmap_t, vaddr_t, pt_entry_t);
-void pmap_do_tlb_shootdown(void);
+void pmap_do_tlb_shootdown(struct cpu_info *, struct trapframe *);
void pmap_tlb_shootdown_q_drain(u_long, boolean_t);
#define PMAP_TLB_SHOOTDOWN(pm, va, pte) \
pmap_tlb_shootdown((pm), (va), (pte))