summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2018-04-02 15:22:41 +0000
committerkettenis <kettenis@openbsd.org>2018-04-02 15:22:41 +0000
commit895dad3347c01dc043caa82576ef663dd0ff324f (patch)
tree510d0677743a8250253af6166a65334cff08bd6c /sys
parentAdd size to free() (diff)
downloadwireguard-openbsd-895dad3347c01dc043caa82576ef663dd0ff324f.tar.xz
wireguard-openbsd-895dad3347c01dc043caa82576ef663dd0ff324f.zip
Do not add 32 to the "base" SPI number. Apparently the offset of the first
SPI is already included and adding 32 means we skip the first 32 available MSI vectors, which is quite disastous if we only have 32 vectors like on the Marvell Armada 8040. ok patrick@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm64/dev/ampintc.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/arch/arm64/dev/ampintc.c b/sys/arch/arm64/dev/ampintc.c
index 2091031902c..2c4ce63a150 100644
--- a/sys/arch/arm64/dev/ampintc.c
+++ b/sys/arch/arm64/dev/ampintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ampintc.c,v 1.13 2018/02/02 09:32:11 kettenis Exp $ */
+/* $OpenBSD: ampintc.c,v 1.14 2018/04/02 15:22:41 kettenis Exp $ */
/*
* Copyright (c) 2007,2009,2011 Dale Rahn <drahn@openbsd.org>
*
@@ -176,8 +176,6 @@ void ampintc_setipl(int);
void ampintc_calc_mask(void);
void *ampintc_intr_establish(int, int, int, int (*)(void *),
void *, char *);
-void *ampintc_intr_establish_ext(int, int, int, int (*)(void *),
- void *, char *);
void *ampintc_intr_establish_fdt(void *, int *, int,
int (*)(void *), void *, char *);
void ampintc_intr_disestablish(void *);
@@ -685,13 +683,6 @@ ampintc_irq_handler(void *frame)
}
void *
-ampintc_intr_establish_ext(int irqno, int type, int level, int (*func)(void *),
- void *arg, char *name)
-{
- return ampintc_intr_establish(irqno+32, type, level, func, arg, name);
-}
-
-void *
ampintc_intr_establish_fdt(void *cookie, int *cell, int level,
int (*func)(void *), void *arg, char *name)
{
@@ -892,13 +883,13 @@ ampintc_intr_establish_msi(void *self, uint64_t *addr, uint64_t *data,
if (sc->sc_spi[i] != NULL)
continue;
- cookie = ampintc_intr_establish_ext(sc->sc_bspi + i,
+ cookie = ampintc_intr_establish(sc->sc_bspi + i,
IST_EDGE_RISING, level, func, arg, name);
if (cookie == NULL)
return NULL;
*addr = sc->sc_addr + GICV2M_SETSPI_NS;
- *data = sc->sc_bspi + i + 32;
+ *data = sc->sc_bspi + i;
sc->sc_spi[i] = cookie;
return &sc->sc_spi[i];
}