Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips Add an IPI for xcalls.
details: https://anonhg.NetBSD.org/src/rev/ed5d7990ff65
branches: trunk
changeset: 764714:ed5d7990ff65
user: matt <matt%NetBSD.org@localhost>
date: Mon May 02 00:17:35 2011 +0000
description:
Add an IPI for xcalls.
diffstat:
sys/arch/mips/include/intr.h | 5 +++--
sys/arch/mips/mips/cpu_subr.c | 6 +++---
sys/arch/mips/mips/ipifuncs.c | 10 ++++++++--
3 files changed, 14 insertions(+), 7 deletions(-)
diffs (89 lines):
diff -r 55e36aaaf405 -r ed5d7990ff65 sys/arch/mips/include/intr.h
--- a/sys/arch/mips/include/intr.h Sun May 01 18:52:29 2011 +0000
+++ b/sys/arch/mips/include/intr.h Mon May 02 00:17:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.4 2011/02/20 07:45:47 matt Exp $ */
+/* $NetBSD: intr.h,v 1.5 2011/05/02 00:17:35 matt Exp $ */
/*-
* Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -68,7 +68,8 @@
#define IPI_KPREEMPT 4 /* schedule a kernel preemption */
#define IPI_SUSPEND 5 /* DDB suspend signaling */
#define IPI_HALT 6 /* halt cpu */
-#define NIPIS 7
+#define IPI_XCALL 7 /* xcall */
+#define NIPIS 8
#ifdef __INTR_PRIVATE
struct splsw {
diff -r 55e36aaaf405 -r ed5d7990ff65 sys/arch/mips/mips/cpu_subr.c
--- a/sys/arch/mips/mips/cpu_subr.c Sun May 01 18:52:29 2011 +0000
+++ b/sys/arch/mips/mips/cpu_subr.c Mon May 02 00:17:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.11 2011/04/29 22:13:49 matt Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.12 2011/05/02 00:17:35 matt Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.11 2011/04/29 22:13:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.12 2011/05/02 00:17:35 matt Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -974,7 +974,7 @@
xc_send_ipi(struct cpu_info *ci)
{
- (*mips_locoresw.lsw_send_ipi)(ci, IPI_NOP);
+ (*mips_locoresw.lsw_send_ipi)(ci, IPI_XCALL);
}
#endif /* MULTIPROCESSOR */
diff -r 55e36aaaf405 -r ed5d7990ff65 sys/arch/mips/mips/ipifuncs.c
--- a/sys/arch/mips/mips/ipifuncs.c Sun May 01 18:52:29 2011 +0000
+++ b/sys/arch/mips/mips/ipifuncs.c Mon May 02 00:17:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipifuncs.c,v 1.5 2011/04/14 17:42:00 matt Exp $ */
+/* $NetBSD: ipifuncs.c,v 1.6 2011/05/02 00:17:35 matt Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -32,12 +32,13 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.5 2011/04/14 17:42:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.6 2011/05/02 00:17:35 matt Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
#include <sys/device.h>
#include <sys/intr.h>
+#include <sys/xcall.h>
#include <uvm/uvm_extern.h>
@@ -57,6 +58,7 @@
[IPI_KPREEMPT] = "ipi kpreempt",
[IPI_SUSPEND] = "ipi suspend",
[IPI_HALT] = "ipi halt",
+ [IPI_XCALL] = "ipi xcall",
};
static void
@@ -133,6 +135,10 @@
ci->ci_evcnt_per_ipi[IPI_HALT].ev_count++;
ipi_halt();
}
+ if (ipi_mask & __BIT(IPI_XCALL)) {
+ ci->ci_evcnt_per_ipi[IPI_XCALL].ev_count++;
+ xc_ipi_handler();
+ }
}
void
Home |
Main Index |
Thread Index |
Old Index