diff options
author | zbb <zbb@FreeBSD.org> | 2016-05-05 17:51:14 +0000 |
---|---|---|
committer | zbb <zbb@FreeBSD.org> | 2016-05-05 17:51:14 +0000 |
commit | 726fcfebaba27d4673ab531ae33234ce097787cc (patch) | |
tree | 4209e9553301be2dd013993584dd079f3fb072a5 /sys/arm64 | |
parent | b01f61207a7838e23d83e03418d45f45d0374dcd (diff) | |
download | FreeBSD-src-726fcfebaba27d4673ab531ae33234ce097787cc.zip FreeBSD-src-726fcfebaba27d4673ab531ae33234ce097787cc.tar.gz |
Fix GICv3 build after r299090
Obtained from: Semihalf
Sponsored by: Cavium
Diffstat (limited to 'sys/arm64')
-rw-r--r-- | sys/arm64/arm64/gic_v3.c | 1 | ||||
-rw-r--r-- | sys/arm64/arm64/gic_v3_fdt.c | 1 | ||||
-rw-r--r-- | sys/arm64/arm64/gic_v3_its.c | 9 | ||||
-rw-r--r-- | sys/arm64/arm64/gic_v3_var.h | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index d8434cf..15a51a3 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> +#include <sys/bitstring.h> #include <sys/bus.h> #include <sys/kernel.h> #include <sys/ktr.h> diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c index e5d75c3..3f21fee 100644 --- a/sys/arm64/arm64/gic_v3_fdt.c +++ b/sys/arm64/arm64/gic_v3_fdt.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> +#include <sys/bitstring.h> #include <sys/bus.h> #include <sys/kernel.h> #include <sys/module.h> diff --git a/sys/arm64/arm64/gic_v3_its.c b/sys/arm64/arm64/gic_v3_its.c index c830c99..5dd56cf 100644 --- a/sys/arm64/arm64/gic_v3_its.c +++ b/sys/arm64/arm64/gic_v3_its.c @@ -852,7 +852,7 @@ lpi_alloc_chunk(struct gic_v3_its_softc *sc, struct lpi_chunk *lpic, { u_int *col_ids; int fclr; /* First cleared bit */ - uint8_t *bitmap; + bitstr_t *bitmap; size_t nb, i; col_ids = malloc(sizeof(*col_ids) * nvecs, M_GIC_V3_ITS, @@ -861,7 +861,7 @@ lpi_alloc_chunk(struct gic_v3_its_softc *sc, struct lpi_chunk *lpic, return (ENOMEM); mtx_lock_spin(&sc->its_dev_lock); - bitmap = (uint8_t *)sc->its_lpi_bitmap; + bitmap = sc->its_lpi_bitmap; fclr = 0; retry: @@ -901,9 +901,6 @@ static void lpi_free_chunk(struct gic_v3_its_softc *sc, struct lpi_chunk *lpic) { int start, end; - uint8_t *bitmap; - - bitmap = (uint8_t *)sc->its_lpi_bitmap; KASSERT((lpic->lpi_free == lpic->lpi_num), ("Trying to free LPI chunk that is still in use.\n")); @@ -915,7 +912,7 @@ lpi_free_chunk(struct gic_v3_its_softc *sc, struct lpi_chunk *lpic) end = start + lpic->lpi_num - 1; /* Finally free this chunk */ - bit_nclear(bitmap, start, end); + bit_nclear(sc->its_lpi_bitmap, start, end); mtx_unlock_spin(&sc->its_dev_lock); free(lpic->lpi_col_ids, M_GIC_V3_ITS); diff --git a/sys/arm64/arm64/gic_v3_var.h b/sys/arm64/arm64/gic_v3_var.h index b3c0e52..2e780c3 100644 --- a/sys/arm64/arm64/gic_v3_var.h +++ b/sys/arm64/arm64/gic_v3_var.h @@ -236,7 +236,7 @@ struct gic_v3_its_softc { struct its_dev_list its_dev_list; - unsigned long * its_lpi_bitmap; + bitstr_t * its_lpi_bitmap; uint32_t its_lpi_maxid; struct mtx its_dev_lock; |