Module Name: src Committed By: skrll Date: Mon Jan 6 08:29:08 UTC 2020
Modified Files: src/sys/arch/aarch64/include: pmap.h src/sys/arch/arm/fdt: arm_platform.c Log Message: Fix DEVMAP build losage by reducing diffs between arm and aarch64 *sigh* To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/aarch64/include/pmap.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/fdt/arm_platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/aarch64/include/pmap.h diff -u src/sys/arch/aarch64/include/pmap.h:1.29 src/sys/arch/aarch64/include/pmap.h:1.30 --- src/sys/arch/aarch64/include/pmap.h:1.29 Mon Dec 30 16:05:15 2019 +++ src/sys/arch/aarch64/include/pmap.h Mon Jan 6 08:29:08 2020 @@ -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 @@ paddr_t pmap_alloc_pdp(struct pmap *, st #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 \ } Index: src/sys/arch/arm/fdt/arm_platform.c diff -u src/sys/arch/arm/fdt/arm_platform.c:1.1 src/sys/arch/arm/fdt/arm_platform.c:1.2 --- src/sys/arch/arm/fdt/arm_platform.c:1.1 Sun Jan 5 17:26:31 2020 +++ src/sys/arch/arm/fdt/arm_platform.c Mon Jan 6 08:29:08 2020 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: arm_platform #include <uvm/uvm_extern.h> #include <machine/bootconfig.h> + #include <arm/cpufunc.h> #include <arm/cortex/gtmr_var.h> @@ -85,7 +86,7 @@ arm_platform_devmap(void) 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 @@ arm_platform_devmap(void) 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; }