summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2019-12-20 13:34:42 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2019-12-20 13:34:42 +0000
commit9c1b590066ff0ac808905bb77b6b9d904992be10 (patch)
treeabda18ec13bcdce6a649721c4d9f5cd900509b99 /sys/arch/loongson
parent83f8d12962f5f94ae7bdae5c701f61734971980d (diff)
Convert various boolean_t/TRUE/FALSE to int/1/0 in mips64 memory code.
OK mpi@
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r--sys/arch/loongson/loongson/bus_dma.c4
-rw-r--r--sys/arch/loongson/loongson/loongson2_machdep.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/loongson/loongson/bus_dma.c b/sys/arch/loongson/loongson/bus_dma.c
index fbd52133cdb..a7754dbde85 100644
--- a/sys/arch/loongson/loongson/bus_dma.c
+++ b/sys/arch/loongson/loongson/bus_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_dma.c,v 1.20 2018/01/11 15:49:34 visa Exp $ */
+/* $OpenBSD: bus_dma.c,v 1.21 2019/12/20 13:34:41 visa Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -583,7 +583,7 @@ _dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf,
/*
* Get the physical address for this segment.
*/
- if (pmap_extract(pmap, vaddr, &curaddr) == FALSE)
+ if (pmap_extract(pmap, vaddr, &curaddr) == 0)
panic("_dmapmap_load_buffer: pmap_extract(%p, %lx) "
"failed!", pmap, vaddr);
diff --git a/sys/arch/loongson/loongson/loongson2_machdep.c b/sys/arch/loongson/loongson/loongson2_machdep.c
index bd4f8397ad0..17a19f08c07 100644
--- a/sys/arch/loongson/loongson/loongson2_machdep.c
+++ b/sys/arch/loongson/loongson/loongson2_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: loongson2_machdep.c,v 1.16 2016/09/28 14:03:19 visa Exp $ */
+/* $OpenBSD: loongson2_machdep.c,v 1.17 2019/12/20 13:34:41 visa Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -39,7 +39,7 @@
extern struct phys_mem_desc mem_layout[MAXMEMSEGS];
extern paddr_t loongson_memlo_alias;
-boolean_t is_memory_range(paddr_t, psize_t, psize_t);
+int is_memory_range(paddr_t, psize_t, psize_t);
void loongson2e_setup(u_long, u_long);
void loongson2f_setup(u_long, u_long);
void loongson2f_setup_window(uint, uint, uint64_t, uint64_t, uint64_t, uint);
@@ -248,7 +248,7 @@ loongson2f_setup_window(uint master, uint window, uint64_t base, uint64_t mask,
* (used by /dev/mem)
*/
-boolean_t
+int
is_memory_range(paddr_t pa, psize_t len, psize_t limit)
{
struct phys_mem_desc *seg;
@@ -259,7 +259,7 @@ is_memory_range(paddr_t pa, psize_t len, psize_t limit)
lp = atop(round_page(pa + len));
if (limit != 0 && lp > atop(limit))
- return FALSE;
+ return 0;
/*
* Allow access to the low 256MB aliased region on 2F systems,
@@ -272,9 +272,9 @@ is_memory_range(paddr_t pa, psize_t len, psize_t limit)
for (i = 0, seg = mem_layout; i < MAXMEMSEGS; i++, seg++)
if (fp >= seg->mem_first_page && lp <= seg->mem_last_page)
- return TRUE;
+ return 1;
- return FALSE;
+ return 0;
}
int