Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2019 13:41:47 +0000 (UTC)
From:      Ruslan Bukin <br@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346633 - head/sys/riscv/riscv
Message-ID:  <201904241341.x3ODflaT051825@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: br
Date: Wed Apr 24 13:41:46 2019
New Revision: 346633
URL: https://svnweb.freebsd.org/changeset/base/346633

Log:
  Implement pic_pre_ithread(), pic_post_ithread().
  
  Reviewed by:	markj
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D19819

Modified:
  head/sys/riscv/riscv/plic.c

Modified: head/sys/riscv/riscv/plic.c
==============================================================================
--- head/sys/riscv/riscv/plic.c	Wed Apr 24 13:32:04 2019	(r346632)
+++ head/sys/riscv/riscv/plic.c	Wed Apr 24 13:41:46 2019	(r346633)
@@ -249,6 +249,30 @@ plic_attach(device_t dev)
 	return (intr_pic_claim_root(sc->dev, xref, plic_intr, sc, 0));
 }
 
+static void
+plic_pre_ithread(device_t dev, struct intr_irqsrc *isrc)
+{
+	struct plic_softc *sc;
+	struct plic_irqsrc *src;
+
+	sc = device_get_softc(dev);
+	src = (struct plic_irqsrc *)isrc;
+
+	WR4(sc, PLIC_PRIORITY(src->irq), 0);
+}
+
+static void
+plic_post_ithread(device_t dev, struct intr_irqsrc *isrc)
+{
+	struct plic_softc *sc;
+	struct plic_irqsrc *src;
+
+	sc = device_get_softc(dev);
+	src = (struct plic_irqsrc *)isrc;
+
+	WR4(sc, PLIC_PRIORITY(src->irq), 1);
+}
+
 static device_method_t plic_methods[] = {
 	DEVMETHOD(device_probe,		plic_probe),
 	DEVMETHOD(device_attach,	plic_attach),
@@ -256,6 +280,8 @@ static device_method_t plic_methods[] = {
 	DEVMETHOD(pic_disable_intr,	plic_disable_intr),
 	DEVMETHOD(pic_enable_intr,	plic_enable_intr),
 	DEVMETHOD(pic_map_intr,		plic_map_intr),
+	DEVMETHOD(pic_pre_ithread,	plic_pre_ithread),
+	DEVMETHOD(pic_post_ithread,	plic_post_ithread),
 
 	DEVMETHOD_END
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904241341.x3ODflaT051825>