Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Fix DEVMAP build losage by reducing diffs between a...
details: https://anonhg.NetBSD.org/src/rev/fc0e462b3fc9
branches: trunk
changeset: 466908:fc0e462b3fc9
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Jan 06 08:29:08 2020 +0000
description:
Fix DEVMAP build losage by reducing diffs between arm and aarch64
*sigh*
diffstat:
sys/arch/aarch64/include/pmap.h | 12 ++++++------
sys/arch/arm/fdt/arm_platform.c | 9 +++++----
2 files changed, 11 insertions(+), 10 deletions(-)
diffs (73 lines):
diff -r 37b89abc18f9 -r fc0e462b3fc9 sys/arch/aarch64/include/pmap.h
--- a/sys/arch/aarch64/include/pmap.h Mon Jan 06 07:57:06 2020 +0000
+++ b/sys/arch/aarch64/include/pmap.h Mon Jan 06 08:29:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.29 2019/12/30 16:05:15 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.30 2020/01/06 08:29:08 skrll Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -201,14 +201,14 @@
#define L3_TRUNC_BLOCK(x) ((x) & L3_FRAME)
#define L3_ROUND_BLOCK(x) L3_TRUNC_BLOCK((x) + L3_SIZE - 1)
-#define DEVMAP_TRUNC_ADDR(x) L3_TRUNC_BLOCK((x))
-#define DEVMAP_ROUND_SIZE(x) L3_ROUND_BLOCK((x))
+#define DEVMAP_ALIGN(x) L3_TRUNC_BLOCK((x))
+#define DEVMAP_SIZE(x) L3_ROUND_BLOCK((x))
#define DEVMAP_ENTRY(va, pa, sz) \
{ \
- .pd_va = DEVMAP_TRUNC_ADDR(va), \
- .pd_pa = DEVMAP_TRUNC_ADDR(pa), \
- .pd_size = DEVMAP_ROUND_SIZE(sz), \
+ .pd_va = DEVMAP_ALIGN(va), \
+ .pd_pa = DEVMAP_ALIGN(pa), \
+ .pd_size = DEVMAP_SIZE(sz), \
.pd_prot = VM_PROT_READ|VM_PROT_WRITE, \
.pd_flags = PMAP_DEV \
}
diff -r 37b89abc18f9 -r fc0e462b3fc9 sys/arch/arm/fdt/arm_platform.c
--- a/sys/arch/arm/fdt/arm_platform.c Mon Jan 06 07:57:06 2020 +0000
+++ b/sys/arch/arm/fdt/arm_platform.c Mon Jan 06 08:29:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm_platform.c,v 1.1 2020/01/05 17:26:31 jmcneill Exp $ */
+/* $NetBSD: arm_platform.c,v 1.2 2020/01/06 08:29:08 skrll Exp $ */
/*-
* Copyright (c) 2020 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm_platform.c,v 1.1 2020/01/05 17:26:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm_platform.c,v 1.2 2020/01/06 08:29:08 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -50,6 +50,7 @@
#include <uvm/uvm_extern.h>
#include <machine/bootconfig.h>
+
#include <arm/cpufunc.h>
#include <arm/cortex/gtmr_var.h>
@@ -85,7 +86,7 @@
DEVMAP_ENTRY_END
};
static struct pmap_devmap devmap_uart[] = {
- DEVMAP_ENTRY(KERNEL_IO_VBASE, 0, L3_SIZE),
+ DEVMAP_ENTRY(KERNEL_IO_VBASE, 0, PAGE_SIZE),
DEVMAP_ENTRY_END
};
bus_addr_t uart_base;
@@ -97,7 +98,7 @@
if (fdtbus_get_reg(phandle, 0, &uart_base, NULL) != 0)
return devmap_empty;
- devmap_uart[0].pd_pa = DEVMAP_TRUNC_ADDR(uart_base);
+ devmap_uart[0].pd_pa = DEVMAP_ALIGN(uart_base);
return devmap_uart;
}
Home |
Main Index |
Thread Index |
Old Index