Skip to content

Commit bbf1103

Browse files
Replay "Add bus_dmamem_alloc_range(9) to riscv64, now required by [...]"
Unbreaks build for at least IP30.mp, otherwise kernel build breaks due to `-Werror`: ``` [...] cc -g -Werror -Wall -Wimplicit-function-declaration -Wno-uninitialized -Wno-pointer-sign -Wframe-larger-than=2047 -mno-abicalls -msoft-float -G 0 -ffreestanding -O2 -pipe -nostdinc -I/sys -I/sys/arch/sgi/compile/GENERIC-IP30.MP/obj -I/sys/arch -DDDB -DDIAGNOSTIC -DKTRACE -DACCOUNTING -DKMEMSTATS -DPTRACE -DPOOL_DEBUG -DCRYPTO -DSYSVMSG -DSYSVSEM -DSYSVSHM -DUVM_SWAP_ENCRYPT -DFFS -DFFS2 -DUFS_DIRHASH -DQUOTA -DEXT2FS -DMFS -DNFSCLIENT -DNFSSERVER -DCD9660 -DUDF -DMSDOSFS -DFIFO -DFUSE -DSOCKET_SPLICE -DTCP_ECN -DTCP_SIGNATURE -DINET6 -DIPSEC -DPPP_BSDCOMP -DPPP_DEFLATE -DPIPEX -DMROUTING -DMPLS -DBOOT_CONFIG -DKERNBASE="0xa800000020000000" -DPCIVERBOSE -DUSER_PCICONF -DUSBVERBOSE -DTGT_OCTANE -DTGT_COHERENT -DARCBIOS -DCPU_R10000 -DONEWIREVERBOSE -DMULTIPROCESSOR -DMAXUSERS=32 -D_KERNEL -D__sgi__ -MD -MP -c /sys/dev/pci/envy.c [...] cc1: warnings being treated as errors /sys/dev/pci/envy.c: In function 'envy_allocm': /sys/dev/pci/envy.c:1828: warning: implicit declaration of function 'bus_dmamem_alloc_range' *** Error 1 in /sys/arch/sgi/compile/GENERIC-IP30.MP (Makefile:664 'envy.o') *** Error 1 in target 'envy.o' 14m27.69s real 23m58.74s user 3m20.45s system 2 ``` See 925808a.
1 parent a49b4ca commit bbf1103

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

sys/arch/sgi/include/bus.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ struct machine_bus_dma_tag {
385385
*/
386386
int (*_dmamem_alloc)(bus_dma_tag_t, bus_size_t, bus_size_t,
387387
bus_size_t, bus_dma_segment_t *, int, int *, int);
388+
int (*_dmamem_alloc_range)(bus_dma_tag_t, bus_size_t, bus_size_t,
389+
bus_size_t, bus_dma_segment_t *, int, int *, int,
390+
paddr_t, paddr_t);
388391
void (*_dmamem_free)(bus_dma_tag_t, bus_dma_segment_t *, int);
389392
int (*_dmamem_map)(bus_dma_tag_t, bus_dma_segment_t *,
390393
int, size_t, caddr_t *, int);
@@ -419,6 +422,9 @@ struct machine_bus_dma_tag {
419422

420423
#define bus_dmamem_alloc(t, s, a, b, sg, n, r, f) \
421424
(*(t)->_dmamem_alloc)((t), (s), (a), (b), (sg), (n), (r), (f))
425+
#define bus_dmamem_alloc_range(t, s, a, b, sg, n, r, f, l, h) \
426+
(*(t)->_dmamem_alloc_range)((t), (s), (a), (b), (sg), \
427+
(n), (r), (f), (l), (h))
422428
#define bus_dmamem_free(t, sg, n) \
423429
(*(t)->_dmamem_free)((t), (sg), (n))
424430
#define bus_dmamem_map(t, sg, n, s, k, f) \

sys/arch/sgi/localbus/imc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ struct machine_bus_dma_tag imc_bus_dma_tag = {
172172
_dmamap_unload,
173173
_dmamap_sync,
174174
_dmamem_alloc,
175+
_dmamem_alloc_range,
175176
_dmamem_free,
176177
_dmamem_map,
177178
_dmamem_unmap,

sys/arch/sgi/localbus/macebus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ struct machine_bus_dma_tag mace_bus_dma_tag = {
152152
_dmamap_unload,
153153
_dmamap_sync,
154154
_dmamem_alloc,
155+
_dmamem_alloc_range,
155156
_dmamem_free,
156157
_dmamem_map,
157158
_dmamem_unmap,

sys/arch/sgi/pci/macepcibridge.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ struct machine_bus_dma_tag mace_pci_bus_dma_tag = {
187187
_dmamap_unload,
188188
_dmamap_sync,
189189
_dmamem_alloc,
190+
_dmamem_alloc_range,
190191
_dmamem_free,
191192
_dmamem_map,
192193
_dmamem_unmap,

sys/arch/sgi/xbow/xbridge.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ static const struct machine_bus_dma_tag xbridge_dma_tag = {
547547
_dmamap_unload,
548548
_dmamap_sync,
549549
_dmamem_alloc,
550+
_dmamem_alloc_range,
550551
_dmamem_free,
551552
_dmamem_map,
552553
_dmamem_unmap,

0 commit comments

Comments
 (0)