Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm Add separate IPI routines for IPI_AST and IPI_K...
details: https://anonhg.NetBSD.org/src/rev/f15a1f9aabe2
branches: trunk
changeset: 337471:f15a1f9aabe2
user: matt <matt%NetBSD.org@localhost>
date: Wed Apr 15 15:45:06 2015 +0000
description:
Add separate IPI routines for IPI_AST and IPI_KPREEMPT.
diffstat:
sys/arch/arm/cortex/gic.c | 8 ++++----
sys/arch/arm/pic/pic.c | 20 ++++++++++++++++++--
sys/arch/arm/pic/picvar.h | 6 ++++--
3 files changed, 26 insertions(+), 8 deletions(-)
diffs (109 lines):
diff -r 990f65b3c593 -r f15a1f9aabe2 sys/arch/arm/cortex/gic.c
--- a/sys/arch/arm/cortex/gic.c Wed Apr 15 15:44:19 2015 +0000
+++ b/sys/arch/arm/cortex/gic.c Wed Apr 15 15:45:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic.c,v 1.18 2015/04/11 16:47:47 matt Exp $ */
+/* $NetBSD: gic.c,v 1.19 2015/04/15 15:45:06 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,7 +34,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.18 2015/04/11 16:47:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.19 2015/04/15 15:45:06 matt Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -611,7 +611,7 @@
#endif
#ifdef MULTIPROCESSOR
intr_establish(ARMGIC_SGI_IPIBASE + IPI_AST, IPL_VM,
- IST_MPSAFE | IST_EDGE, pic_ipi_nop, (void *)-1);
+ IST_MPSAFE | IST_EDGE, pic_ipi_ast, (void *)-1);
intr_establish(ARMGIC_SGI_IPIBASE + IPI_XCALL, IPL_VM,
IST_MPSAFE | IST_EDGE, pic_ipi_xcall, (void *)-1);
intr_establish(ARMGIC_SGI_IPIBASE + IPI_GENERIC, IPL_VM,
@@ -626,7 +626,7 @@
#endif
#ifdef __HAVE_PREEMPTION
intr_establish(ARMGIC_SGI_IPIBASE + IPI_KPREEMPT, IPL_VM,
- IST_MPSAFE | IST_EDGE, pic_ipi_nop, (void *)-1);
+ IST_MPSAFE | IST_EDGE, pic_ipi_kpreempt, (void *)-1);
#endif
armgic_cpu_init(&sc->sc_pic, curcpu());
#endif
diff -r 990f65b3c593 -r f15a1f9aabe2 sys/arch/arm/pic/pic.c
--- a/sys/arch/arm/pic/pic.c Wed Apr 15 15:44:19 2015 +0000
+++ b/sys/arch/arm/pic/pic.c Wed Apr 15 15:45:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pic.c,v 1.33 2015/04/14 22:36:54 jmcneill Exp $ */
+/* $NetBSD: pic.c,v 1.34 2015/04/15 15:45:06 matt Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -33,7 +33,7 @@
#include "opt_multiprocessor.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.33 2015/04/14 22:36:54 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.34 2015/04/15 15:45:06 matt Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -118,6 +118,13 @@
#ifdef MULTIPROCESSOR
int
+pic_ipi_ast(void *arg)
+{
+ setsoftast(curcpu());
+ return 1;
+}
+
+int
pic_ipi_nop(void *arg)
{
/* do nothing */
@@ -146,7 +153,16 @@
kdb_trap(-1, arg);
return 1;
}
+
+#ifdef __HAVE_PREEMPTION
+int
+pic_ipi_kpreempt(void *arg)
+{
+ atomic_or_uint(&curcpu()->ci_astpending, __BIT(1));
+ return 1;
+}
#endif
+#endif /* MULTIPROCESSOR */
void
intr_cpu_init(struct cpu_info *ci)
diff -r 990f65b3c593 -r f15a1f9aabe2 sys/arch/arm/pic/picvar.h
--- a/sys/arch/arm/pic/picvar.h Wed Apr 15 15:44:19 2015 +0000
+++ b/sys/arch/arm/pic/picvar.h Wed Apr 15 15:45:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: picvar.h,v 1.14 2015/04/11 16:47:47 matt Exp $ */
+/* $NetBSD: picvar.h,v 1.15 2015/04/15 15:45:06 matt Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -172,11 +172,13 @@
void pic_add(struct pic_softc *, int);
void pic_do_pending_int(void);
#ifdef MULTIPROCESSOR
-int pic_ipi_nop(void *); // IPI_KPREEMPT tto
+int pic_ipi_ast(void *);
+int pic_ipi_nop(void *);
int pic_ipi_xcall(void *);
int pic_ipi_generic(void *);
int pic_ipi_shootdown(void *);
int pic_ipi_ddb(void *);
+int pic_ipi_kpreempt(void *);
#endif
#ifdef __HAVE_PIC_FAST_SOFTINTS
int pic_handle_softint(void *);
Home |
Main Index |
Thread Index |
Old Index