summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2022-07-02 08:50:43 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2022-07-02 08:50:43 +0000
commitba9e2da185db87b907ce5e5ab973261b6b71b8d3 (patch)
treec794dbe2375ac56389d511a6ec35c4e9f244ac82 /sys/arch/sparc64/dev
parentf487f43fd3d05d932c6483c4cbeed9667ffcfdf2 (diff)
Remove unused device poll functions.
Also remove unneeded includes of <sys/poll.h> and <sys/select.h>. Some addenda from jsg@. OK miod@ mpi@
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/vldcp.c46
1 files changed, 1 insertions, 45 deletions
diff --git a/sys/arch/sparc64/dev/vldcp.c b/sys/arch/sparc64/dev/vldcp.c
index 1dea00796e8..6d686388f8e 100644
--- a/sys/arch/sparc64/dev/vldcp.c
+++ b/sys/arch/sparc64/dev/vldcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vldcp.c,v 1.22 2021/10/24 17:05:04 mpi Exp $ */
+/* $OpenBSD: vldcp.c,v 1.23 2022/07/02 08:50:41 visa Exp $ */
/*
* Copyright (c) 2009, 2012 Mark Kettenis
*
@@ -19,7 +19,6 @@
#include <sys/conf.h>
#include <sys/device.h>
#include <sys/malloc.h>
-#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/systm.h>
@@ -578,49 +577,6 @@ vldcpioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
return (0);
}
-int
-vldcppoll(dev_t dev, int events, struct proc *p)
-{
- struct vldcp_softc *sc;
- struct ldc_conn *lc;
- uint64_t head, tail, state;
- int revents = 0;
- int s, err;
-
- sc = vldcp_lookup(dev);
- if (sc == NULL)
- return (POLLERR);
- lc = &sc->sc_lc;
-
- s = spltty();
- if (events & (POLLIN | POLLRDNORM)) {
- err = hv_ldc_rx_get_state(lc->lc_id, &head, &tail, &state);
-
- if (err == 0 && state == LDC_CHANNEL_UP && head != tail)
- revents |= events & (POLLIN | POLLRDNORM);
- }
- if (events & (POLLOUT | POLLWRNORM)) {
- err = hv_ldc_tx_get_state(lc->lc_id, &head, &tail, &state);
-
- if (err == 0 && state == LDC_CHANNEL_UP && head != tail)
- revents |= events & (POLLOUT | POLLWRNORM);
- }
- if (revents == 0) {
- if (events & (POLLIN | POLLRDNORM)) {
- cbus_intr_setenabled(sc->sc_bustag, sc->sc_rx_ino,
- INTR_ENABLED);
- selrecord(p, &sc->sc_rsel);
- }
- if (events & (POLLOUT | POLLWRNORM)) {
- cbus_intr_setenabled(sc->sc_bustag, sc->sc_tx_ino,
- INTR_ENABLED);
- selrecord(p, &sc->sc_wsel);
- }
- }
- splx(s);
- return revents;
-}
-
void
filt_vldcprdetach(struct knote *kn)
{